From b744bf856be178817f6cefc2f0262a048db7f4c3 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sat, 6 Apr 2013 11:56:45 +0200 Subject: *-sources: handle compressed module and firmwares --- sys-kernel/stable-sources/Manifest | 4 +- .../stable-sources/stable-sources-3.6.11.ebuild | 56 +++++++++++++++------- .../stable-sources/stable-sources-3.7.10.ebuild | 56 +++++++++++++++------- .../stable-sources/stable-sources-3.8.6.ebuild | 56 +++++++++++++++------- 4 files changed, 122 insertions(+), 50 deletions(-) (limited to 'sys-kernel/stable-sources') diff --git a/sys-kernel/stable-sources/Manifest b/sys-kernel/stable-sources/Manifest index 307d75b4..69a920c8 100644 --- a/sys-kernel/stable-sources/Manifest +++ b/sys-kernel/stable-sources/Manifest @@ -4,6 +4,6 @@ DIST linux-3.8.tar.xz 70989468 SHA256 e070d1bdfbded5676a4f374721c63565f1c969466c DIST patch-3.6.11.xz 222492 SHA256 4bdc3822571a4a765bf6f347aad8b899730acef549ae4236813fd17f254f4327 SHA512 08423f145ee7aef49f50d95032595ee79250135b6ecfa72f802502a277f215b63c4dc04ed149fe4ed7cdaa5ef063b8003b7f72f41d8417e45efbe7e30e621387 WHIRLPOOL 490aa4abad6bb24ff12a657a32a8433694e8e60a2c0e86143fec7bfef56c5e887110d941ad09e296d9e1976a805e586d3c409df005cd53c04c8c514c34e3132a DIST patch-3.7.10.xz 212936 SHA256 e5db8a0f0fb0a7ad466b4673489c1a438fe7e6482203e34702e7180d6e2e515a SHA512 939e3290a0e3bc19c519ca05181f673bffc745aa69456b51872c5ea718b64c250dac6926b07f1a195f87ee4aab67c01f7bc746d8bfb9201a983937c12c72823d WHIRLPOOL cdc62c7fe819328356678c85eb6939d1b6281f8b8ceb684e7c7794ea0215f6acfc31f34126f3333c1d7dd982faed5aeebd24d2a1efcd5b3dd99e86a6b281435e DIST patch-3.8.6.xz 196952 SHA256 19b2748e9c11c6ca7672dc0b945725914a7481fad8c5f0fb5c1658115f04c72a SHA512 7e1a36d54f32534d434c9968d1ad7bb47e86fdca68abb227a20ac8faf88c39b3d32b710578de8af8f418997b02e3bac0a4ea446ce143e2eb9b7906b2031a000d WHIRLPOOL 6089228f47304bd7069af295d73fb3cd4b1b710ed3a3da3aebb8a578cec9d1af79eac3e9d0aa9998df6427856238c21b4862d6aa9b62a4173d3590e9e09a246e -EBUILD stable-sources-3.6.11.ebuild 3626 SHA256 7c94e6acb39709e4b7cc75e8aea73a93d51cfdf897d0c8f67bd8c57209bcbafd SHA512 dcfc6cafcdfcf7150f44e652ec30bd9197f8899f59d9bc2f34a656a379fea9f46dc98b8293af66ec381924e692cf2a517c5c834a1ffc622846203450585d5961 WHIRLPOOL ebefdf340a9a83de5eb2560d9945637a3ff527736289cfc238f58437da5f75cc7d006e9cbce4c79e32d8ef7a4c4555aaf1e37eae1bd65889749b211428b1ffb6 +EBUILD stable-sources-3.6.11.ebuild 4302 SHA256 85d0280a036ae3433da90a4c45f496041ac197cdaa083dd7e29c679f28f30bb4 SHA512 a0e1e957a4edd869de1a2034370aa7130ba503ac3377e67abf7ab87a4c02f657ad5c85c51408e91b081aee3d74bad1e8f371baa76abc93d7ea8f0e2c7c5779ed WHIRLPOOL 6f30a7e2ea321668acd7e4e4663576842015e111ff35efbbc51e1ffe6111e496636a2fb21310c95004b170681c4d764c5d51008de507d3ea39caeaf2162ab9bd EBUILD stable-sources-3.7.10.ebuild 4397 SHA256 2e9ded199996ac81aa59caab7b9567bb4ef2807f687803e1e6a3c303a6f4dbb6 SHA512 b838bfabbc67df487ae3660eb9c3a50c15bfcf0518e81d97e7853175fceddb7d7520ecdc051457ad27472da67fcd80fc71a37c16dcbb7b6525875498e065e3bc WHIRLPOOL 32c7b71122b8a865cfba182721d0820e1fe59e0086aac1d2984660c86c0ffd063a01fe230c7fce404b74b89f0b6354daf3280b9c99f92f8f34e50acd2c06dd0c -EBUILD stable-sources-3.8.6.ebuild 3628 SHA256 1ee834523a15fd7b439e51e1957adf056b428b5e8390a74d0c921ebbcbb66f39 SHA512 f2adb4cb8eecccadb6e5d38b75f2a987ef4bae091a1e29a5ea2d028709d351ec21dd53508f49c3091513baa942ced69e76e638865bb1583a3a17d93b534c9577 WHIRLPOOL 7711b2df4d61e4b2e28c3301a7cf6c56924988af9fcfe51cc5f2dc07a62e4912bbc70ca1e3681bc7cdb692172be3f792054108e6ef92828f5a3f49455af000d9 +EBUILD stable-sources-3.8.6.ebuild 4304 SHA256 5345bd9e4686f9f7cbbb3275fc1c055f66a31d67b1eabb8e241322511a427ec9 SHA512 0c7d5d07c7fc4a26be005c6727f00ed28befdf7c0155a4a851f07f920157e982663357653e41a9b8808c64a016966522b5ae2a513cb886057246935883e64079 WHIRLPOOL a1d0dd5881f8d2c739391b2122aa6daf42102d19e1d8fd112693581b31fc3a655effcc5f184dcdce5ae6031cba2114067d9a0d0bb4993e0fb156bfdf1286ea73 diff --git a/sys-kernel/stable-sources/stable-sources-3.6.11.ebuild b/sys-kernel/stable-sources/stable-sources-3.6.11.ebuild index 219b4ec7..75d037e7 100644 --- a/sys-kernel/stable-sources/stable-sources-3.6.11.ebuild +++ b/sys-kernel/stable-sources/stable-sources-3.6.11.ebuild @@ -23,15 +23,17 @@ BUILDDIR="${WORKDIR}/build" KV_EXTRA="${EXTRAVERSION}" S="${SRCDIR}" -IUSE="build sources" +IUSE="build sources zlib lzma" REQUIRED_USE=" - build? ( savedconfig ) + ?? ( zlib lzma ) + zlib? ( build ) + lzma? ( build ) symlink? ( sources ) " DEPEND=" || ( - sys-apps/kmod + sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools )" @@ -134,19 +136,6 @@ do_install_build () emake install "${myopt[@]}" \ INSTALL_PATH="${WORKDIR}/boot" - if configval MODULES ; then - info "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" - - einfo "Generate modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - fi - insinto /boot/${KV_FULL} newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg @@ -158,8 +147,43 @@ do_install_build () fi if configval MODULES ; then + einfo "Installing modules" + emake modules_install "${myopt[@]}" \ + INSTALL_MOD_PATH="${WORKDIR}" \ + INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" + + # kmod only support zlib and lzma + # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts + if use zlib || use lzma ; then + use zlib && { cmp="gzip -9c" ; ext="gz" ; } + use lzma && { cmp="xz -9c" ; ext="xz" ; } + + einfo "Compressing modules" + find "${WORKDIR}/lib/modules" \ + -type f -name "*.ko" \ + | while read ; do + $cmp < $REPLY > ${REPLY}.${ext} + rm $REPLY + done + fi + + einfo "Generating modules.dep" + depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ + || die "depmod failed" + + rm "${WORKDIR}/lib/modules/${KV_FULL}/build" + rm "${WORKDIR}/lib/modules/${KV_FULL}/source" + insinto /lib doins -r "${WORKDIR}/lib/modules" + + # No need to make firmware_install, make modules_install does + if [ -e "${WORKDIR}/lib/firmware" ] ; then + einfo "Installing firmwares" + + insinto /lib + doins -r "${WORKDIR}/lib/firmware" + fi fi } diff --git a/sys-kernel/stable-sources/stable-sources-3.7.10.ebuild b/sys-kernel/stable-sources/stable-sources-3.7.10.ebuild index 3aaa0b54..75d037e7 100644 --- a/sys-kernel/stable-sources/stable-sources-3.7.10.ebuild +++ b/sys-kernel/stable-sources/stable-sources-3.7.10.ebuild @@ -23,15 +23,17 @@ BUILDDIR="${WORKDIR}/build" KV_EXTRA="${EXTRAVERSION}" S="${SRCDIR}" -IUSE="build sources" +IUSE="build sources zlib lzma" REQUIRED_USE=" - build? ( savedconfig ) + ?? ( zlib lzma ) + zlib? ( build ) + lzma? ( build ) symlink? ( sources ) " DEPEND=" || ( - sys-apps/kmod + sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools )" @@ -134,19 +136,6 @@ do_install_build () emake install "${myopt[@]}" \ INSTALL_PATH="${WORKDIR}/boot" - if configval MODULES ; then - info "Installing modules" - emake modules_install ${myopt[@]} \ - INSTALL_MOD_PATH="${WORKDIR}" - - einfo "Generate modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - fi - insinto /boot/${KV_FULL} newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg @@ -158,8 +147,43 @@ do_install_build () fi if configval MODULES ; then + einfo "Installing modules" + emake modules_install "${myopt[@]}" \ + INSTALL_MOD_PATH="${WORKDIR}" \ + INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" + + # kmod only support zlib and lzma + # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts + if use zlib || use lzma ; then + use zlib && { cmp="gzip -9c" ; ext="gz" ; } + use lzma && { cmp="xz -9c" ; ext="xz" ; } + + einfo "Compressing modules" + find "${WORKDIR}/lib/modules" \ + -type f -name "*.ko" \ + | while read ; do + $cmp < $REPLY > ${REPLY}.${ext} + rm $REPLY + done + fi + + einfo "Generating modules.dep" + depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ + || die "depmod failed" + + rm "${WORKDIR}/lib/modules/${KV_FULL}/build" + rm "${WORKDIR}/lib/modules/${KV_FULL}/source" + insinto /lib doins -r "${WORKDIR}/lib/modules" + + # No need to make firmware_install, make modules_install does + if [ -e "${WORKDIR}/lib/firmware" ] ; then + einfo "Installing firmwares" + + insinto /lib + doins -r "${WORKDIR}/lib/firmware" + fi fi } diff --git a/sys-kernel/stable-sources/stable-sources-3.8.6.ebuild b/sys-kernel/stable-sources/stable-sources-3.8.6.ebuild index 18413d4e..9b3465d0 100644 --- a/sys-kernel/stable-sources/stable-sources-3.8.6.ebuild +++ b/sys-kernel/stable-sources/stable-sources-3.8.6.ebuild @@ -23,15 +23,17 @@ BUILDDIR="${WORKDIR}/build" KV_EXTRA="${EXTRAVERSION}" S="${SRCDIR}" -IUSE="build sources" +IUSE="build sources zlib lzma" REQUIRED_USE=" - build? ( savedconfig ) + ?? ( zlib lzma ) + zlib? ( build ) + lzma? ( build ) symlink? ( sources ) " DEPEND=" || ( - sys-apps/kmod + sys-apps/kmod[zlib?,lzma?] sys-apps/module-init-tools )" @@ -134,19 +136,6 @@ do_install_build () emake install "${myopt[@]}" \ INSTALL_PATH="${WORKDIR}/boot" - if configval MODULES ; then - info "Installing modules" - emake modules_install "${myopt[@]}" \ - INSTALL_MOD_PATH="${WORKDIR}" - - einfo "Generate modules.dep" - depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ - || die "depmod failed" - - rm "${WORKDIR}/lib/modules/${KV_FULL}/build" - rm "${WORKDIR}/lib/modules/${KV_FULL}/source" - fi - insinto /boot/${KV_FULL} newins "${WORKDIR}/boot/config-${KV_FULL}" kernel.cfg @@ -158,8 +147,43 @@ do_install_build () fi if configval MODULES ; then + einfo "Installing modules" + emake modules_install "${myopt[@]}" \ + INSTALL_MOD_PATH="${WORKDIR}" \ + INSTALL_MOD_STRIP="${PORTAGE_STRIP_FLAGS}" + + # kmod only support zlib and lzma + # See libkmod/libkmod-util.c / struct kmod_ext kmod_exts + if use zlib || use lzma ; then + use zlib && { cmp="gzip -9c" ; ext="gz" ; } + use lzma && { cmp="xz -9c" ; ext="xz" ; } + + einfo "Compressing modules" + find "${WORKDIR}/lib/modules" \ + -type f -name "*.ko" \ + | while read ; do + $cmp < $REPLY > ${REPLY}.${ext} + rm $REPLY + done + fi + + einfo "Generating modules.dep" + depmod -ae -F "${BUILDDIR}/System.map" -b "${WORKDIR}" "${KV_FULL}" \ + || die "depmod failed" + + rm "${WORKDIR}/lib/modules/${KV_FULL}/build" + rm "${WORKDIR}/lib/modules/${KV_FULL}/source" + insinto /lib doins -r "${WORKDIR}/lib/modules" + + # No need to make firmware_install, make modules_install does + if [ -e "${WORKDIR}/lib/firmware" ] ; then + einfo "Installing firmwares" + + insinto /lib + doins -r "${WORKDIR}/lib/firmware" + fi fi } -- cgit v1.2.3