2019-02-27 18:51:46 +01:00
|
|
|
# Copyright 1999-2019 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2019-02-28 14:50:40 +01:00
|
|
|
EAPI=7
|
|
|
|
|
|
|
|
inherit git-r3
|
2019-02-27 18:51:46 +01:00
|
|
|
|
|
|
|
DESCRIPTION="Gentoo System and Image Builder"
|
|
|
|
HOMEPAGE="https://github.com/IBT-FMI/gebuilder"
|
|
|
|
SRC_URI=""
|
2019-02-28 14:57:14 +01:00
|
|
|
EGIT_REPO_URI="https://github.com/IBT-FMI/gebuilder.git"
|
2019-02-27 18:51:46 +01:00
|
|
|
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
2019-10-03 15:52:30 +02:00
|
|
|
KEYWORDS=""
|
2019-10-26 18:32:43 +02:00
|
|
|
IUSE="autoupdate btrfs docker openstack test"
|
2019-02-27 18:51:46 +01:00
|
|
|
|
2019-10-26 18:03:16 +02:00
|
|
|
COMMON_DEPEND="
|
2019-02-27 18:51:46 +01:00
|
|
|
>=app-shells/bash-4.2:*
|
|
|
|
net-misc/rsync
|
|
|
|
sys-apps/portage
|
|
|
|
sys-apps/util-linux
|
|
|
|
sys-boot/syslinux
|
|
|
|
sys-fs/duperemove
|
|
|
|
sys-kernel/dracut
|
|
|
|
"
|
2019-10-26 18:03:16 +02:00
|
|
|
DEPEND="${COMMON_DEPEND}
|
|
|
|
sys-devel/m4
|
|
|
|
"
|
|
|
|
RDEPEND="${COMMON_DEPEND}
|
2019-02-27 18:51:46 +01:00
|
|
|
sys-process/lsof
|
|
|
|
autoupdate? ( virtual/cron )
|
2019-10-26 18:03:16 +02:00
|
|
|
btrfs? ( sys-fs/btrfs-progs )
|
|
|
|
docker? ( >=app-emulation/docker-18.05.0 )
|
|
|
|
openstack? ( dev-python/python-glanceclient )
|
2019-02-27 18:51:46 +01:00
|
|
|
"
|
|
|
|
|
2019-10-26 18:03:16 +02:00
|
|
|
src_prepare(){
|
|
|
|
if use !docker; then
|
|
|
|
rm -rf gebuilder/scripts/*docker* || die
|
|
|
|
rm gebuilder/tests/*docker* || die
|
|
|
|
fi
|
|
|
|
if use !openstack; then
|
|
|
|
rm -rf gebuilder/scripts/*openstack* || die
|
|
|
|
rm gebuilder/tests/*openstack* || die
|
|
|
|
fi
|
|
|
|
default
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile(){
|
|
|
|
emake
|
|
|
|
}
|
2019-02-27 18:51:46 +01:00
|
|
|
|
2019-10-26 18:03:16 +02:00
|
|
|
src_install() {
|
|
|
|
default
|
2019-02-27 18:51:46 +01:00
|
|
|
if use autoupdate; then
|
|
|
|
einfo "Installing weekly cron job:"
|
|
|
|
insinto /etc/cron.weekly
|
|
|
|
doins "${FILESDIR}/gebuilder_global_update"
|
|
|
|
fi
|
|
|
|
}
|
2019-10-26 18:03:16 +02:00
|
|
|
|
|
|
|
src_test() {
|
|
|
|
TMPDIR="${WORKDIR}/test_results"
|
|
|
|
mkdir ${TMPDIR}
|
|
|
|
cd gebuilder
|
|
|
|
./tests.sh || die
|
|
|
|
}
|