]> Pileus Git - ~andy/sunrise/blob - sys-apps/etckeeper/etckeeper-0.63.ebuild
net-nntp/sabnzbd: Version bump for sabnzbd
[~andy/sunrise] / sys-apps / etckeeper / etckeeper-0.63.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=4
6
7 inherit eutils bash-completion-r1 python
8
9 DESCRIPTION="a collection of tools to let /etc be stored in a repository"
10 HOMEPAGE="http://kitenet.net/~joey/code/etckeeper/"
11 COMMIT="cdca967f6f041e79970c1392e74fffac9ce49885"
12 SRC_URI="http://git.kitenet.net/?p=etckeeper.git;a=snapshot;h=${COMMIT};sf=tgz
13 -> ${P}.tar.gz"
14
15 LICENSE="GPL-2"
16 IUSE="bazaar"
17 KEYWORDS="~amd64"
18 SLOT="0"
19
20 DEPEND="bazaar? ( || ( dev-lang/python:2.7 dev-lang/python:2.6 ) )"
21 RDEPEND="app-portage/portage-utils
22         bazaar? ( dev-vcs/bzr )"
23
24 S="${WORKDIR}"/${PN}-${COMMIT:0:7}
25
26 SHAREDIR="/usr/share/${PN}"
27
28 src_prepare(){
29         epatch "${FILESDIR}"/${PN}-0.62-gentoo.patch
30         if use bazaar; then
31                 python_convert_shebangs 2 "${S}"/etckeeper-bzr/__init__.py
32         fi
33 }
34 src_compile(){
35         if use bazaar; then
36                 emake
37         fi
38 }
39 src_install(){
40         emake DESTDIR="${D}" install
41         newbashcomp bash_completion etckeeper
42         if use bazaar; then
43                 ./etckeeper-bzr/__init__.py install --root="${D}" || die "Error: bzr support installation"
44         fi
45         insinto ${SHAREDIR}
46         doins "${FILESDIR}"/bashrc
47 }
48 pkg_postinst(){
49         elog "You need to use either bzr, git or mercurial."
50         elog "If you want dev-vcs/bzr, enable bzr useflag."
51         elog "Run this command to add etckeeper to your /etc/portage/bashrc"
52         elog ""
53         elog "echo \"source ${SHAREDIR}/bashrc\" >> /etc/portage/bashrc"
54         elog ""
55         elog "or just put the content with your fancy feature additions into it directly"
56         elog "Remember to fit /etc/etckeeper/etckeeper.conf to your needs!"
57         elog "To initialise your etc-dir as a repository run:"
58         elog ""
59         elog "etckeeper init -d /etc"
60         elog ""
61 }