diff options
author | Karel Kočí <cynerd@email.cz> | 2017-05-10 11:01:16 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-05-10 11:01:16 +0200 |
commit | 2d23b0c25bec153fb7725b259f4cf3cae1340f3e (patch) | |
tree | aac88c68cfa1801ca52099e3bf77f3a6a0546d41 /sys-kernel/linux | |
parent | ba4118b20a55a3d413f3802511ec42c692f0118f (diff) | |
download | gentoo-personal-overlay-2d23b0c25bec153fb7725b259f4cf3cae1340f3e.tar.gz gentoo-personal-overlay-2d23b0c25bec153fb7725b259f4cf3cae1340f3e.tar.bz2 gentoo-personal-overlay-2d23b0c25bec153fb7725b259f4cf3cae1340f3e.zip |
Linux 4.10.15-r1
Diffstat (limited to 'sys-kernel/linux')
-rw-r--r-- | sys-kernel/linux/Manifest | 1 | ||||
-rw-r--r-- | sys-kernel/linux/linux-4.10.15-r1.ebuild | 73 |
2 files changed, 74 insertions, 0 deletions
diff --git a/sys-kernel/linux/Manifest b/sys-kernel/linux/Manifest index 8b91de1..83b5fb1 100644 --- a/sys-kernel/linux/Manifest +++ b/sys-kernel/linux/Manifest @@ -1,2 +1,3 @@ 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 diff --git a/sys-kernel/linux/linux-4.10.15-r1.ebuild b/sys-kernel/linux/linux-4.10.15-r1.ebuild new file mode 100644 index 0000000..cece624 --- /dev/null +++ b/sys-kernel/linux/linux-4.10.15-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 +} |