summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-06-15 17:52:16 +0100
committerNick White <git@njw.me.uk>2009-06-15 17:52:16 +0100
commit21d6c9f32d1dca6e8149cdf8169d960cca7577d8 (patch)
tree49e20a3aa20ea07f8f44ccc26ae5a2a4c10d6e82
parent20110ff8f47b0ee82248283224f2b15a5da9c2e8 (diff)
downloadnjw-gentoo-local-21d6c9f32d1dca6e8149cdf8169d960cca7577d8.tar.bz2
njw-gentoo-local-21d6c9f32d1dca6e8149cdf8169d960cca7577d8.zip
Use eclass to handle libre-linux ebuilds
-rw-r--r--eclass/kernel-libre.eclass39
-rw-r--r--sys-kernel/libre-sources/libre-sources-2.6.30.ebuild27
-rw-r--r--sys-kernel/libregentoo-sources/libregentoo-sources-2.6.30-r1.ebuild46
3 files changed, 48 insertions, 64 deletions
diff --git a/eclass/kernel-libre.eclass b/eclass/kernel-libre.eclass
new file mode 100644
index 0000000..4e7dbc0
--- /dev/null
+++ b/eclass/kernel-libre.eclass
@@ -0,0 +1,39 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+#
+# Original Author: nick
+# Purpose: override of kernel-2.eclass for the linux-libre kernel
+#
+
+inherit kernel-2
+EXPORT_FUNCTIONS src_unpack
+
+DEBLOB_CHECK="deblob-check"
+LIBRE_URI_BASE="http://www.linux-libre.fsfla.org/pub/linux-libre/releases/${PV}-libre"
+LIBREKERNEL_URI="${LIBRE_URI_BASE}/linux-${PV}-libre.tar.bz2"
+DEBLOB_URI="${LIBRE_URI_BASE}/${DEBLOB_CHECK}"
+
+kernel-libre_src_unpack() {
+ # kernel revision patches included in tarball
+ UNIPATCH_LIST_DEFAULT=""
+
+ # universal_unpack expects a different kernel tarball name
+ expected_tarball=${DISTDIR}/linux-${OKV}.tar.bz2
+
+ # temporarily move any preexisting kernel tarball
+ moved_tarball=${expected_tarball}-original
+ [[ -f $expected_tarball ]] && \
+ mv $expected_tarball $moved_tarball
+
+ ln -sf ${DISTDIR}/linux-${OKV}-libre.tar.bz2 $expected_tarball
+
+ kernel-2_src_unpack
+
+ rm $expected_tarball
+
+ # put any preexisting tarball back in its original location
+ [[ -f $moved_tarball ]] && \
+ mv $moved_tarball $expected_tarball
+}
diff --git a/sys-kernel/libre-sources/libre-sources-2.6.30.ebuild b/sys-kernel/libre-sources/libre-sources-2.6.30.ebuild
index 25a9ef5..dfc113c 100644
--- a/sys-kernel/libre-sources/libre-sources-2.6.30.ebuild
+++ b/sys-kernel/libre-sources/libre-sources-2.6.30.ebuild
@@ -1,32 +1,11 @@
K_SECURITY_UNSUPPORTED="1"
ETYPE="sources"
-inherit kernel-2
+inherit kernel-libre
detect_version
DESCRIPTION="Full sources for the BLOB free version of the Linux kernel"
HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/"
-SRC_URI="http://www.linux-libre.fsfla.org/pub/linux-libre/releases/${PV}-libre/linux-${PV}-libre.tar.bz2"
+SRC_URI="${LIBREKERNEL_URI}"
KEYWORDS="~amd64 ~x86"
-
-src_unpack() {
- # kernel revision patches included in tarball
- UNIPATCH_LIST_DEFAULT=""
-
- # universal_unpack expects a different kernel tarball name
- expected_tarball=${DISTDIR}/linux-${OKV}.tar.bz2
-
- # temporarily move any preexisting kernel tarball
- [[ -f $expected_tarball ]] && \
- mv $expected_tarball ${expected_tarball}-original
-
- ln -sf ${DISTDIR}/linux-${KV_FULL}.tar.bz2 $expected_tarball
-
- kernel-2_src_unpack
-
- rm $expected_tarball
-
- # put any preexisting tarball back in its original location
- [[ -f ${expected_tarball}-original ]] && \
- mv ${expected_tarball}-original $expected_tarball
-}
+IUSE=""
diff --git a/sys-kernel/libregentoo-sources/libregentoo-sources-2.6.30-r1.ebuild b/sys-kernel/libregentoo-sources/libregentoo-sources-2.6.30-r1.ebuild
index 4e57cb8..d0f8ddf 100644
--- a/sys-kernel/libregentoo-sources/libregentoo-sources-2.6.30-r1.ebuild
+++ b/sys-kernel/libregentoo-sources/libregentoo-sources-2.6.30-r1.ebuild
@@ -2,49 +2,15 @@ K_SECURITY_UNSUPPORTED="1"
ETYPE="sources"
K_WANT_GENPATCHES="base extras"
K_GENPATCHES_VER="2"
-inherit kernel-2
+inherit kernel-libre
detect_version
detect_arch
-LIBRE_URI_BASE="http://www.linux-libre.fsfla.org/pub/linux-libre/releases/${PV}-libre"
-DEBLOB_CHECK="deblob-check"
-
-DESCRIPTION="Full sources including the Gentoo patchset for the
-${KV_MAJOR}.${KV_MINOR} BLOB free version of the Linux kernel tree"
-
+KEYWORDS="~x86"
+IUSE=""
HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/
http://dev.gentoo.org/~dsd/genpatches"
-SRC_URI="${LIBRE_URI_BASE}/linux-${PV}-libre.tar.bz2 ${LIBRE_URI_BASE}/${DEBLOB_CHECK} ${GENPATCHES_URI} ${ARCH_URI}"
-
-KEYWORDS="~x86"
-
-src_unpack() {
- # kernel revision patches included in tarball
- UNIPATCH_LIST_DEFAULT=""
- echo "Checking patches are clean of blobs"
- sh ${DISTDIR}/${DEBLOB_CHECK} ${UNIPATCH_LIST_GENPATCHES}
- if [ $? -ne 0 ]; then
- ewarn "Warning: gentoo patches appear to contain blobs,"
- ewarn "please report to bugs.gentoo.org/266157"
- ewarn "Disabling gentoo patches for now"
- UNIPATCH_LIST_GENPATCHES=""
- fi
-
- # universal_unpack expects a different kernel tarball name
- expected_tarball=${DISTDIR}/linux-${OKV}.tar.bz2
-
- # temporarily move any preexisting kernel tarball
- [[ -f $expected_tarball ]] && \
- mv $expected_tarball ${expected_tarball}-original
-
- ln -sf ${DISTDIR}/linux-${OKV}-libre.tar.bz2 $expected_tarball
-
- kernel-2_src_unpack
-
- rm $expected_tarball
-
- # put any preexisting tarball back in its original location
- [[ -f ${expected_tarball}-original ]] && \
- mv ${expected_tarball}-original $expected_tarball
-}
+DESCRIPTION="Full sources including the Gentoo patchset for the
+${KV_MAJOR}.${KV_MINOR} blob free version of the Linux kernel tree"
+SRC_URI="${LIBREKERNEL_URI} ${DEBLOB_URI} ${GENPATCHES_URI} ${ARCH_URI}"