1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools base eutils pam versionator
12 DESCRIPTION="Utility to execute commands in a chroot environment"
13 HOMEPAGE="http://packages.debian.org/source/sid/schroot"
14 SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.xz
15 mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}-${DEB_REL}.debian.tar.gz"
19 KEYWORDS="~amd64 ~arm ~x86"
20 IUSE="btrfs +dchroot debug doc lvm nls pam test"
23 >=dev-libs/boost-1.42.0
25 >=sys-apps/util-linux-2.16
26 btrfs? ( >=sys-fs/btrfs-progs-0.19-r2 )
31 DEPEND="${COMMON_DEPEND}
42 test? ( >=dev-util/cppunit-1.10.0 )
44 RDEPEND="${COMMON_DEPEND}
46 dchroot? ( !sys-apps/dchroot )
47 nls? ( virtual/libintl )
51 "${FILESDIR}/${PN}-1.6.3-tests.patch"
55 unpack ${MY_P}.orig.tar.xz
57 unpack ${MY_P}-${DEB_REL}.debian.tar.gz
63 # Don't depend on cppunit unless we are testing
64 use test || sed -i '/AM_PATH_CPPUNIT/d' configure.ac
71 use test && (( EUID == 0 )) && root_tests=yes
72 use nls || export ac_cv_path_PO4A=
74 $(use_enable btrfs btrfs-snapshot) \
75 $(use_enable doc doxygen) \
76 $(use_enable dchroot) \
77 $(use_enable dchroot dchroot-dsa) \
79 $(use_enable lvm lvm-snapshot) \
82 --enable-block-device \
85 --enable-root-tests=$root_tests \
88 --localstatedir="${EPREFIX}"/var \
89 --with-bash-completion-dir="${EPREFIX}"/usr/share/bash-completion
97 if [[ $root_tests == yes && $EUID -ne 0 ]]; then
98 ewarn "Disabling tests because you are no longer root"
102 # Fix a bug in the tarball -- an empty directory was omitted
103 mkdir test/run-parts.ex2
110 insinto /usr/share/doc/${PF}/contrib/setup.d
111 doins contrib/setup.d/05customdir contrib/setup.d/09fsck contrib/setup.d/10mount-ssh
113 newdoc debian/schroot.NEWS NEWS.debian
115 newinitd "${FILESDIR}"/schroot.initd schroot
116 newconfd "${FILESDIR}"/schroot.confd schroot
120 dohtml doc/sbuild/html/*
122 dohtml doc/schroot/html/*
126 rm -f "${ED}"etc/pam.d/schroot
127 pamd_mimic_system schroot auth account session
131 find "${D}" -name "*.la" -exec rm {} + || die "removal of *.la files failed"
135 if [[ ${REPLACING_VERSIONS} == 1.[24]* ]]; then
136 elog "Please read /usr/share/doc/${PF}/NEWS.debian* for important"
137 elog "upgrade information."