| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/etckeeper/etckeeper-0.63.ebuild,v 1.10 2012/08/11 16:05:37 hasufell Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
PYTHON_DEPEND="bazaar? 2:2.6"
|
| 8 |
SUPPORT_PYTHON_ABIS="1"
|
| 9 |
RESTRICT_PYTHON_ABIS="2.[45] 3.* 2.7-pypy-*"
|
| 10 |
|
| 11 |
inherit eutils bash-completion-r1 prefix python
|
| 12 |
|
| 13 |
DESCRIPTION="A collection of tools to let /etc be stored in a repository"
|
| 14 |
HOMEPAGE="http://kitenet.net/~joey/code/etckeeper/"
|
| 15 |
SRC_URI="http://git.kitenet.net/?p=${PN}.git;a=snapshot;h=refs/tags/${PV};sf=tgz -> ${P}.tar.gz"
|
| 16 |
|
| 17 |
LICENSE="GPL-2"
|
| 18 |
IUSE="bazaar cron"
|
| 19 |
KEYWORDS="amd64 ~x86"
|
| 20 |
SLOT="0"
|
| 21 |
|
| 22 |
VCS_DEPEND="
|
| 23 |
dev-vcs/git
|
| 24 |
dev-vcs/mercurial
|
| 25 |
dev-vcs/darcs"
|
| 26 |
DEPEND="bazaar? ( dev-vcs/bzr )"
|
| 27 |
RDEPEND="${DEPEND}
|
| 28 |
app-portage/portage-utils
|
| 29 |
cron? ( virtual/cron )
|
| 30 |
!bazaar? ( || ( ${VCS_DEPEND} ) )"
|
| 31 |
|
| 32 |
src_prepare(){
|
| 33 |
epatch "${FILESDIR}"/${P}-gentoo.patch
|
| 34 |
}
|
| 35 |
|
| 36 |
src_compile() {
|
| 37 |
use bazaar && emake
|
| 38 |
}
|
| 39 |
|
| 40 |
src_install(){
|
| 41 |
emake DESTDIR="${ED}" install
|
| 42 |
|
| 43 |
bzr_install() {
|
| 44 |
$(PYTHON) ./${PN}-bzr/__init__.py install --root="${ED}" ||
|
| 45 |
die "bzr support installation failed!"
|
| 46 |
}
|
| 47 |
use bazaar && python_execute_function bzr_install
|
| 48 |
|
| 49 |
if use prefix; then
|
| 50 |
doenvd "${FILESDIR}"/99${PN}
|
| 51 |
eprefixify "${ED}"/etc/env.d/99${PN}
|
| 52 |
fi
|
| 53 |
|
| 54 |
newbashcomp bash_completion ${PN}
|
| 55 |
dodoc README TODO
|
| 56 |
docinto examples
|
| 57 |
dodoc "${FILESDIR}"/bashrc
|
| 58 |
|
| 59 |
if use cron ; then
|
| 60 |
exeinto /etc/cron.daily
|
| 61 |
newexe debian/cron.daily etckeeper
|
| 62 |
fi
|
| 63 |
}
|
| 64 |
|
| 65 |
pkg_postinst(){
|
| 66 |
elog "${PN} supports the following VCS: ${VCS_DEPEND}"
|
| 67 |
elog " dev-vcs/bzr"
|
| 68 |
elog "This ebuild just ensures at least one is installed!"
|
| 69 |
elog "For dev-vcs/bzr you need to enable 'bazaar' useflag."
|
| 70 |
elog
|
| 71 |
elog "You may want to adjust your /etc/portage/bashrc"
|
| 72 |
elog "see the example file in /usr/share/doc/${P}/examples"
|
| 73 |
elog
|
| 74 |
elog "To initialise your etc-dir as a repository run:"
|
| 75 |
elog "${PN} init -d /etc"
|
| 76 |
}
|