# genkernel-9999 -> latest Git branch "master"
# genkernel-VERSION -> normal genkernel release
-EAPI="5"
+EAPI=5 # approved 2012.09.11, required by all profiles since 2014.03.12
VERSION_BUSYBOX='1.20.2'
VERSION_DMRAID='1.0.0.rc16-3'
LICENSE="GPL-2"
SLOT="0"
RESTRICT=""
-IUSE="crypt cryptsetup ibm selinux" # Keep 'crypt' in to keep 'use crypt' below working!
+IUSE="cryptsetup ibm selinux"
DEPEND="sys-fs/e2fsprogs
selinux? ( sys-libs/libselinux )"
RDEPEND="${DEPEND}
- cryptsetup? ( sys-fs/cryptsetup )
- app-arch/cpio
- >=app-misc/pax-utils-0.2.1
- !<sys-apps/openrc-0.9.9"
+ cryptsetup? ( sys-fs/cryptsetup )
+ app-arch/cpio
+ >=app-misc/pax-utils-0.2.1
+ !<sys-apps/openrc-0.9.9"
# pax-utils is used for lddtree
if [[ ${PV} == 9999* ]]; then
DEPEND="${DEPEND} app-text/asciidoc"
fi
+pkg_pretend() {
+ if ! use cryptsetup && has_version "sys-kernel/genkernel[crypt]"; then
+ ewarn "Local use flag 'crypt' has been renamed to 'cryptsetup' (bug #414523)."
+ ewarn "Please set flag 'cryptsetup' for this very package if you would like"
+ ewarn "to have genkernel create an initramfs with LUKS support."
+ ewarn "Sorry for the inconvenience."
+ echo
+ fi
+}
+
src_unpack() {
if [[ ${PV} == 9999* ]] ; then
git-2_src_unpack
else
- default
+ unpack ${P}.tar.bz2
fi
}
git log > "${S}"/ChangeLog || die
popd >/dev/null || die
fi
- use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
+ if use selinux ; then
+ sed -i 's/###//g' "${S}"/gen_compile.sh || die
+ fi
# Update software.sh
sed -i \
"${S}"/defaults/software.sh \
|| die "Could not adjust versions"
- # sparc doesn't need crosscompiler anymore
- # remove this after >3.4.51.2
- sed -i -e "s:^DEFAULT_KERNEL_CC:#DEFAULT_KERNEL_CC:g" \
- "${S}"/arch/sparc64/config.sh \
- || die "Could not remove sparc64 crosscompiler config"
-
epatch_user
}
doman genkernel.8
dodoc AUTHORS ChangeLog README TODO
-
dobin genkernel
-
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
+ if use ibm ; then
+ cp "${S}"/arch/ppc64/kernel-2.6{-pSeries,} || die
+ else
+ cp "${S}"/arch/ppc64/kernel-2.6{.g5,} || die
+ fi
insinto /usr/share/genkernel
doins -r "${S}"/*
- use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
- cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
-
- # Copy files to /var/cache/genkernel/src
- GKDISTDIR=/usr/share/genkernel/distfiles/
- elog "Copying files to ${GKDISTDIR}..."
- insinto $GKDISTDIR
- doins "${DISTDIR}"/mdadm-${VERSION_MDADM}.tar.bz2
- doins "${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2
- doins "${DISTDIR}"/LVM2.${VERSION_LVM}.tgz
- doins "${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2
- doins "${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz
- doins "${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2
- doins "${DISTDIR}"/gnupg-${VERSION_GPG}.tar.bz2
- doins "${DISTDIR}"/open-iscsi-${VERSION_ISCSI}.tar.gz
newbashcomp "${FILESDIR}"/genkernel.bash "${PN}"
insinto /etc
doins "${FILESDIR}"/initramfs.mounts
+
+ cd "${DISTDIR}"
+ insinto /usr/share/genkernel/distfiles
+ doins ${A/${P}.tar.bz2/}
}
pkg_postinst() {
ewarn "This package is known to not work with reiser4. If you are running"
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
- ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
- ewarn "even reiser3."
+ ewarn "broken in this regard. Try using a sane filesystem like ext4."
echo
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
echo
- if use crypt && ! use cryptsetup ; then
- ewarn "Local use flag 'crypt' has been renamed to 'cryptsetup' (bug #414523)."
- ewarn "Please set flag 'cryptsetup' for this very package if you would like"
- ewarn "to have genkernel create an initramfs with LUKS support."
- ewarn "Sorry for the inconvenience."
- echo
- fi
}