1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools base pam versionator
11 DESCRIPTION="Utility to execute commands in a chroot environment"
12 HOMEPAGE="http://packages.debian.org/source/sid/schroot"
13 SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.xz"
18 IUSE="btrfs +dchroot debug doc lvm nls pam test"
21 >=dev-libs/boost-1.42.0
23 >=sys-apps/util-linux-2.16
24 btrfs? ( >=sys-fs/btrfs-progs-0.19-r2 )
29 DEPEND="${COMMON_DEPEND}
40 test? ( >=dev-util/cppunit-1.10.0 )
42 RDEPEND="${COMMON_DEPEND}
44 dchroot? ( !sys-apps/dchroot )
45 nls? ( virtual/libintl )
49 "${FILESDIR}/${PN}-1.6.3-tests.patch"
55 # Don't depend on cppunit unless we are testing
56 use test || sed -i '/AM_PATH_CPPUNIT/d' configure.ac
63 use test && (( EUID == 0 )) && root_tests=yes
64 use nls || export ac_cv_path_PO4A=
66 $(use_enable btrfs btrfs-snapshot) \
67 $(use_enable doc doxygen) \
68 $(use_enable dchroot) \
69 $(use_enable dchroot dchroot-dsa) \
71 $(use_enable lvm lvm-snapshot) \
74 --enable-block-device \
77 --enable-root-tests=$root_tests \
80 --localstatedir="${EPREFIX}"/var \
81 --with-bash-completion-dir="${EPREFIX}"/usr/share/bash-completion
89 if [[ $root_tests == yes && $EUID -ne 0 ]]; then
90 ewarn "Disabling tests because you are no longer root"
94 # Fix a bug in the tarball -- an empty directory was omitted
95 mkdir test/run-parts.ex2
102 insinto /usr/share/doc/${PF}/contrib/setup.d
103 doins contrib/setup.d/05customdir contrib/setup.d/09fsck contrib/setup.d/10mount-ssh
105 newdoc debian/schroot.NEWS NEWS.debian
107 newinitd "${FILESDIR}"/schroot.initd schroot
108 newconfd "${FILESDIR}"/schroot.confd schroot
112 dohtml doc/sbuild/html/*
114 dohtml doc/schroot/html/*
118 rm -f "${ED}"etc/pam.d/schroot
119 pamd_mimic_system schroot auth account session
123 find "${D}" -name "*.la" -exec rm {} + || die "removal of *.la files failed"
127 if [[ ${REPLACING_VERSIONS} == 1.[24]* ]]; then
128 elog "Please read /usr/share/doc/${PF}/NEWS.debian* for important"
129 elog "upgrade information."