From 21d6c9f32d1dca6e8149cdf8169d960cca7577d8 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 15 Jun 2009 17:52:16 +0100 Subject: Use eclass to handle libre-linux ebuilds --- eclass/kernel-libre.eclass | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 eclass/kernel-libre.eclass (limited to 'eclass') 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 +} -- cgit v1.2.3