summaryrefslogtreecommitdiff
path: root/sys-kernel
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-06-15 13:19:43 +0100
committerNick White <git@njw.me.uk>2009-06-15 13:19:43 +0100
commit4f8eb237724deb1748c8e7a6b489ef2149b0c8cf (patch)
treecaabbebe30c0476c9cd66c6c0a0e611141a9e83e /sys-kernel
parent90b25199c9fbd9669c3df0fbb97c3d8738f7a52d (diff)
downloadnjw-gentoo-local-4f8eb237724deb1748c8e7a6b489ef2149b0c8cf.tar.bz2
njw-gentoo-local-4f8eb237724deb1748c8e7a6b489ef2149b0c8cf.zip
Improve new libre-sources ebuild
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/libre-sources/libre-sources-2.6.30.ebuild30
1 files changed, 16 insertions, 14 deletions
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 6968b1c..846c20d 100644
--- a/sys-kernel/libre-sources/libre-sources-2.6.30.ebuild
+++ b/sys-kernel/libre-sources/libre-sources-2.6.30.ebuild
@@ -9,22 +9,24 @@ SRC_URI="http://www.linux-libre.fsfla.org/pub/linux-libre/releases/${PV}-libre/l
KEYWORDS="~amd64 x86"
-# use our own unpack function as tarball is laid out differently
-universal_unpack() {
- cd ${WORKDIR}
- unpack linux-${KV_FULL}.tar.bz2
- S=${WORKDIR}/linux-${KV_FULL}
- mv ${WORKDIR}/linux-${PV} ${WORKDIR}/linux-${KV_FULL} \
- || die "Unable to move source tree to ${KV_FULL}."
- cd ${S}
-
- # remove all backup files
- find . -iname "*~" -exec rm {} \; 2> /dev/null
-}
-
src_unpack() {
- # patches included in tarball
+ # kernel revision patches included in tarball
UNIPATCH_LIST_DEFAULT=""
+ # universal_unpack expects a different kernel tarball name
+ expected_tarball=${WORKDIR}/linux-${OKV}.tar.bz2
+
+ # temporarily move any preexisting kernel tarball
+ [[ -f $expected_tarball ]] && \
+ mv $expected_tarball ${expected_tarball}-original
+
+ ln -sf ${WORKDIR}/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
}