diff options
Diffstat (limited to 'sys-kernel/linux')
-rw-r--r-- | sys-kernel/linux/Manifest | 1 | ||||
-rw-r--r-- | sys-kernel/linux/linux-4.11.1-r1.ebuild | 73 |
2 files changed, 74 insertions, 0 deletions
diff --git a/sys-kernel/linux/Manifest b/sys-kernel/linux/Manifest index 83b5fb1..a97cd89 100644 --- a/sys-kernel/linux/Manifest +++ b/sys-kernel/linux/Manifest @@ -1,3 +1,4 @@ DIST linux-4.10.13.tar.gz 145392303 SHA256 ecfa6422a7f0f8370f23e24cccba225b25e2d41c40a2245116ca341878d20ce1 SHA512 081854a8121f03d07f8989e87f072a3a9c9a4b626afe4c9d8c4369aac83ae7958c6640e0b1681b1b6e3a21de09d4a813b7dd9672192b9100fb6b9fb6094efdca WHIRLPOOL 6c9ffefc7ad6c28806a5e804acaad3ee1a3e5485fc99a81a103d9732e647f1f034b70e16da2eb33f8fdf210e8f35e6ebb319d6b738252ed45c93ee201e634d44 DIST linux-4.10.14.tar.gz 145390475 SHA256 5a743b21a246b6008f9fdd45f7a89c97514cc0cce2ecd18a08e645049a2a24f3 SHA512 1df613c8cbd5954903d53c18bd204e2573f473fc788b3b326fbe5890ac3b3273f117d4ca58c8a2b7a47f89e57319822bd4eea70d833b140440cbe6bf616ad35c WHIRLPOOL 9db32608557227939f58b7f7c4933fd1c65374766eaf15ccaf412b3b78bd84b04584992f53bc67ac66b34391bd2608a434213353a21dd8ac23afd62734fd3245 DIST linux-4.10.15.tar.gz 145388522 SHA256 14476bfb3e322d912d310bc30ad5b9b7cb6a59dc4ac376f6c2630a5bbac4ebeb SHA512 ec2aad5970aa520976015c98a1538e689af287521f5102f09abf3283e8555b1868246bf115a22d04af2f7530abc7631e74cf1111fdf995b19f02dc4d1b8f342f WHIRLPOOL 75ac92fc2e8ada3d1263fab70e4fbda84d561ae14eb95f35e919179ec34fc60ba73069766d147e6d621b65587909c0d545438e370ae979b428aee5ed2ba75938 +DIST linux-4.11.1.tar.gz 147143534 SHA256 a6a9cb35aa8b2d51b010ca4613e5b064683e6f8b8ccb6267ba880946d9686190 SHA512 b82b0b8658421e98e5566d2a19330f7ef8143f9584bd2abaddb0e7a707174b855b68c6d33e391faa75e1403687d9647fbbf5c18ba8484760c396db6f06af09ed WHIRLPOOL 121c41663ec2e2846fface87ce4a8e631d259c72da3d13d29e81a7f976a8fb2d2616599d33eacb20ac52c9be1cf5ceb0f82d7ab45111197dc8dd4035844a6bcb diff --git a/sys-kernel/linux/linux-4.11.1-r1.ebuild b/sys-kernel/linux/linux-4.11.1-r1.ebuild new file mode 100644 index 0000000..cece624 --- /dev/null +++ b/sys-kernel/linux/linux-4.11.1-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +VER="${PV%-r*}" +REV="r${PV##*-r}" + +DESCRIPTION="Linux kernel" +HOMEPAGE="http://kernel.org/" +SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/snapshot/linux-stable-${VER}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/linux-stable-${VER}" + +LICENSE="GPLv2" +SLOT="${PV}" +KEYWORDS="amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND} + sys-boot/myinitramfs" + +src_configure() { + # Fix ARCH variable + [ "$ARCH" = "amd64" ] && ARCH="x86" + + "${FILESDIR}"/config_prepare.sh || die "Configuration application failed" +} + +src_install() { + emake modules_install INSTALL_MOD_PATH="${D}" INSTALL_FW_PATH="${D}/lib/firmware/${PV}" + + dodir /boot + insinto /boot + newins "${S}/arch/$ARCH/boot/bzImage" "bzlinux-${PV}" + + # Package source (kind of annoying because of some packages expecting it) + emake clean + dodir /usr/src + cp -a "${S}" "${D}/usr/src/linux-${PV}" +} + +# Link /usr/src/linux to newest kernel +src_link() { + ( + cd "${ROOT}/usr/src" + rm -f linux + ln -s $(ls | grep "linux-" | sort | tail -1) linux + ) +} + +pkg_postinst() { + # Add label to syslinux config if there is non yet + SYSLINUX="${ROOT}/boot/syslinux/syslinux.cfg" + if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then + ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" + if [ -n "$ARGS" ]; then + sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ../bzlinux-${PV}\n\tAPPEND ${ARGS}\n\tINITRD ../initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" + else + eerror "Adding label to syslinux configuration failed as there are no arguments" + fi + fi + src_link +} + +pkg_prerm() { + # Remove label from syslinux config + sed -i "/^LABEL gentoo-${PV}$/,/^$/d" /boot/syslinux/syslinux.cfg || eerror "Removing label from syslinux fonfiguration failed!" +} + +pkg_postrm() { + src_link +} |