summaryrefslogtreecommitdiff
blob: 1c8d0bf8c3677f1bda1382cd12c51b4ec5eec625 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2019 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit gnome2-utils

DESCRIPTION="Zeroinstall Injector allows regular users to install software themselves"
HOMEPAGE="http://0install.net/"
SRC_URI="https://sourceforge.net/projects/zero-install/files/${PN}/${PV}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="gtk +ocamlopt test +dbus"

COMMEN_DEPEND="<dev-lang/ocaml-4.07[ocamlopt?]
		<dev-ml/lwt-4.0.0
		dev-ml/lwt_react[ocamlopt?]
		>=dev-ml/ocurl-0.7.9
		>=dev-ml/ocaml-sha-1.9
		dev-ml/xmlm
		dev-ml/yojson
		gtk? ( dev-ml/lablgtk[ocamlopt?]
			   dev-ml/lwt_glib[ocamlopt?] )
		dbus? ( dev-ml/obus[ocamlopt?] )"
DEPEND="${COMMEN_DEPEND}
		dev-ml/cppo[ocamlopt?]
		dev-ml/ocamlbuild[ocamlopt?]
		test? ( dev-ml/ounit[ocamlopt?] )"
RDEPEND="${COMMEN_DEPEND}
		app-crypt/gnupg
		app-arch/xz-utils"

# Disable test phase when test USE flag is disabled
RESTRICT="!test? ( test )"

src_compile() {
	emake -j1 all
}

src_test() {
	emake -j1 test
}

src_install() {
	emake DESTDIR="${D}" install_system
	rm -rf "${D}/usr/share/0install.net"
	einstalldocs
}

pkg_postinst()
{
	 gnome2_icon_cache_update
}

pkg_postrm()
{
	gnome2_icon_cache_update
}