1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # genkernel-9999 -> latest Git branch "master"
6 # genkernel-VERSION -> normal genkernel release
8 EAPI=5 # approved 2012.09.11, required by all profiles since 2014.03.12
10 VERSION_BUSYBOX='1.20.2'
11 VERSION_DMRAID='1.0.0.rc16-3'
14 VERSION_ISCSI='2.0-872'
16 VERSION_UNIONFS_FUSE='0.24'
19 RH_HOME="ftp://sources.redhat.com/pub"
20 DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
21 BB_HOME="http://www.busybox.net/downloads"
23 COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
24 ${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
25 mirror://kernel/linux/utils/raid/mdadm/mdadm-${VERSION_MDADM}.tar.bz2
26 ${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
27 ${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
28 ${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
29 http://www.open-iscsi.org/bits/open-iscsi-${VERSION_ISCSI}.tar.gz
30 mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
31 http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2
32 mirror://gnupg/gnupg/gnupg-${VERSION_GPG}.tar.bz2"
34 if [[ ${PV} == 9999* ]]
36 EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git
37 http://anongit.gentoo.org/git/proj/${PN}.git"
38 inherit git-2 bash-completion-r1 eutils
40 SRC_URI="${COMMON_URI}"
43 inherit bash-completion-r1 eutils
44 SRC_URI="mirror://gentoo/${P}.tar.bz2
46 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
49 DESCRIPTION="Gentoo automatic kernel building scripts"
50 HOMEPAGE="https://www.gentoo.org"
55 IUSE="cryptsetup ibm selinux"
57 DEPEND="sys-fs/e2fsprogs
58 selinux? ( sys-libs/libselinux )"
60 cryptsetup? ( sys-fs/cryptsetup )
62 >=app-misc/pax-utils-0.2.1
63 !<sys-apps/openrc-0.9.9"
64 # pax-utils is used for lddtree
66 if [[ ${PV} == 9999* ]]; then
67 DEPEND="${DEPEND} app-text/asciidoc"
71 if ! use cryptsetup && has_version "sys-kernel/genkernel[crypt]"; then
72 ewarn "Local use flag 'crypt' has been renamed to 'cryptsetup' (bug #414523)."
73 ewarn "Please set flag 'cryptsetup' for this very package if you would like"
74 ewarn "to have genkernel create an initramfs with LUKS support."
75 ewarn "Sorry for the inconvenience."
81 if [[ ${PV} == 9999* ]] ; then
89 if [[ ${PV} == 9999* ]] ; then
90 einfo "Producing ChangeLog from Git history..."
91 pushd "${S}/.git" >/dev/null || die
92 git log > "${S}"/ChangeLog || die
93 popd >/dev/null || die
96 sed -i 's/###//g' "${S}"/gen_compile.sh || die
101 -e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
102 -e "s:VERSION_MDADM:$VERSION_MDADM:" \
103 -e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
104 -e "s:VERSION_FUSE:$VERSION_FUSE:" \
105 -e "s:VERSION_ISCSI:$VERSION_ISCSI:" \
106 -e "s:VERSION_LVM:$VERSION_LVM:" \
107 -e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
108 -e "s:VERSION_GPG:$VERSION_GPG:" \
109 "${S}"/defaults/software.sh \
110 || die "Could not adjust versions"
116 if [[ ${PV} == 9999* ]]; then
123 doins "${S}"/genkernel.conf
126 dodoc AUTHORS ChangeLog README TODO
128 rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
131 cp "${S}"/arch/ppc64/kernel-2.6{-pSeries,} || die
133 cp "${S}"/arch/ppc64/kernel-2.6{.g5,} || die
135 insinto /usr/share/genkernel
138 newbashcomp "${FILESDIR}"/genkernel.bash "${PN}"
140 doins "${FILESDIR}"/initramfs.mounts
143 insinto /usr/share/genkernel/distfiles
144 doins ${A/${P}.tar.xz/}
149 elog 'Documentation is available in the genkernel manual page'
150 elog 'as well as the following URL:'
152 elog 'https://www.gentoo.org/doc/en/genkernel.xml'
154 ewarn "This package is known to not work with reiser4. If you are running"
155 ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
156 ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
157 ewarn "broken in this regard. Try using a sane filesystem like ext4."
159 ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
160 ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."