/[gentoo-x86]/dev-vcs/monotone/monotone-0.99.1-r1.ebuild
Gentoo

Contents of /dev-vcs/monotone/monotone-0.99.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jun 7 22:13:04 2012 UTC (11 months, 1 week ago) by zmedico
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
inherit user for enewgroup and enewuser

(Portage version: 2.2.0_alpha110/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-vcs/monotone/monotone-0.99.1-r1.ebuild,v 1.2 2012/05/28 19:45:30 zmedico Exp $
4
5 EAPI="4"
6 inherit bash-completion elisp-common eutils toolchain-funcs user
7
8 DESCRIPTION="Monotone Distributed Version Control System"
9 HOMEPAGE="http://monotone.ca"
10 SRC_URI="http://monotone.ca/downloads/${PV}/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="1"
14 KEYWORDS="amd64 ~ia64 x86"
15 IUSE="doc emacs ipv6 nls"
16
17 RDEPEND="sys-libs/zlib
18 emacs? ( virtual/emacs )
19 >=dev-libs/libpcre-7.6
20 >=dev-libs/botan-1.8.0
21 <dev-libs/botan-1.10
22 >=dev-db/sqlite-3.3.8
23 >=dev-lang/lua-5.1
24 net-dns/libidn"
25 DEPEND="${RDEPEND}
26 >=dev-libs/boost-1.33.1
27 nls? ( >=sys-devel/gettext-0.11.5 )
28 doc? ( sys-apps/texinfo )"
29
30 pkg_setup() {
31 enewgroup monotone
32 enewuser monotone -1 -1 /var/lib/monotone monotone
33 }
34
35 src_prepare() {
36 if [[ $(gcc-major-version) -lt "3" ||
37 ( $(gcc-major-version) -eq "3" && $(gcc-minor-version) -le 3 ) ]]; then
38 die 'requires >=gcc-3.4'
39 fi
40 epatch "${FILESDIR}/monotone-1.0-glibc-2.14-file-handle.patch"
41 }
42
43 src_configure() {
44 econf \
45 $(use_enable nls) \
46 $(use_enable ipv6)
47 }
48
49 src_compile() {
50 emake || die
51
52 if use doc; then
53 emake html || die
54 fi
55
56 if use emacs; then
57 cd contrib
58 elisp-compile *.el || die
59 fi
60 }
61
62 src_test() {
63 if [ ${UID} != 0 ]; then
64 emake check || die "emake check failed"
65 else
66 ewarn "Tests will fail if ran as root, skipping."
67 fi
68 }
69
70 src_install() {
71 emake DESTDIR="${D}" install || die
72
73 mv "${ED}"/usr/share/doc/${PN} "${ED}"/usr/share/doc/${PF} || die
74
75 dobashcompletion contrib/monotone.bash_completion
76
77 if use doc; then
78 dohtml -r html/*
79 dohtml -r figures
80 fi
81
82 if use emacs; then
83 elisp-install ${PN} contrib/*.{el,elc} || die "elisp-install failed"
84 elisp-site-file-install "${FILESDIR}"/50${PN}-gentoo.el \
85 || die
86 fi
87
88 dodoc AUTHORS NEWS README* UPGRADE
89 docinto contrib
90 docompress -x /usr/share/doc/${PF}/contrib
91 dodoc -r contrib
92 newconfd "${FILESDIR}"/monotone.confd monotone
93 newinitd "${FILESDIR}"/${PN}-0.36.initd monotone
94
95 insinto /etc/monotone
96 newins "${FILESDIR}"/hooks.lua hooks.lua
97 newins "${FILESDIR}"/read-permissions read-permissions
98 newins "${FILESDIR}"/write-permissions write-permissions
99
100 keepdir /var/lib/monotone/keys/ /var/{log,run}/monotone
101 fowners monotone:monotone /var/lib/monotone{,/keys} /var/{log,run}/monotone
102 }
103
104 pkg_postinst() {
105 use emacs && elisp-site-regen
106 bash-completion_pkg_postinst
107
108 elog
109 elog "For details and instructions to upgrade from previous versions,"
110 elog "please read /usr/share/doc/${PF}/UPGRADE.bz2"
111 elog
112 elog " 1. edit /etc/conf.d/monotone"
113 elog " 2. import the first keys to enable access with"
114 elog " env HOME=\${homedir} mtn pubkey me@example.net | /etc/init.d/monotone import"
115 elog " Thereafter, those with write permission can add other keys via"
116 elog " netsync with 'monotone push --key-to-push=IDENT' and then IDENT"
117 elog " can be used in the read-permission and write-permission files."
118 elog " 3. adjust permisions in /etc/monotone/read-permissions"
119 elog " and /etc/monotone/write-permissions"
120 elog " 4. start the daemon: /etc/init.d/monotone start"
121 elog " 5. make persistent: rc-update add monotone default"
122 elog
123 }
124
125 pkg_postrm() {
126 use emacs && elisp-site-regen
127 }

  ViewVC Help
Powered by ViewVC 1.1.13