summaryrefslogtreecommitdiff
path: root/libre/kernel26-libre-lts/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/kernel26-libre-lts/PKGBUILD')
-rw-r--r--libre/kernel26-libre-lts/PKGBUILD59
1 files changed, 29 insertions, 30 deletions
diff --git a/libre/kernel26-libre-lts/PKGBUILD b/libre/kernel26-libre-lts/PKGBUILD
index acbdde5ad..7c444e8ff 100644
--- a/libre/kernel26-libre-lts/PKGBUILD
+++ b/libre/kernel26-libre-lts/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: PKGBUILD 142426 2011-11-09 13:05:04Z tpowa $
# Maintainer: Andreas Radke <andyrtr at archlinux.org>
# Maintainer (Parabola): fauno <fauno@kiwwwi.com.ar>
@@ -6,35 +6,34 @@ pkgbase=kernel26-libre-lts
pkgname=('kernel26-libre-lts' 'kernel26-libre-lts-headers') # Build stock -lts kernel
_kernelname=${pkgname#kernel26-libre}
_basekernel=2.6.32
-_preset=kernel26-lts.preset
-pkgver=${_basekernel}.42
+pkgver=${_basekernel}.52
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL2')
url="http://linux-libre.fsfla.org"
-source=(http://www.fsfla.org/svnwiki/selibre/linux-libre/download/releases/${pkgver}-libre2/linux-${pkgver}-libre2.tar.bz2
+source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz"
+ "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz"
# the main kernel config files
config.i686 config.x86_64
# standard config files for mkinitcpio ramdisk
- ${_preset}
- ${pkgname}.install)
+ ${pkgname}.preset)
options=(!strip)
build() {
- cd ${srcdir}/linux-$pkgver
+ cd ${srcdir}/linux-$_basekernel
+ if [ "$_basekernel" != "$pkgver" ]; then
+ # add latest kernel stable patch
+ patch -Np1 -i ${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre
+ fi
cat ../config.$CARCH >./.config
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
fi
+ # set extraversion to pkgrel
+ sed -ri "s|^(EXTRAVERSION =).*|\1 ${pkgver#$_basekernel}-${pkgrel}|" Makefile
+
- for this_doesnt_build in CONFIG_RT2860 CONFIG_RT2870 CONFIG_RT3090; do
- sed -i "s|^${this_doesnt_build}=.*|# ${this_doesnt_build} is not set|g" ./.config
- done
- # remove the extraversion from Makefile
- # this ensures our kernel version is always 2.6.XX-lts
- # this way, minor kernel updates will not break external modules
- sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION = |g' Makefile
# get kernel version
make prepare
# load configuration
@@ -56,15 +55,15 @@ build() {
package_kernel26-libre-lts() {
pkgdesc="The Linux-libre Kernel and modules - stable longtime supported kernel package suitable for servers"
- backup=(etc/mkinitcpio.d/${_preset})
- depends=('coreutils' 'module-init-tools' 'mkinitcpio>=0.6.4')
+ backup=(etc/mkinitcpio.d/${pkgname}.preset)
+ depends=('coreutils' 'module-init-tools>=3.12-2' 'mkinitcpio>=0.6.8-2')
install=${pkgname}.install
provides=("kernel26-lts=$pkgver")
replaces=('kernel26-lts')
conflicts=('kernel26-lts')
KARCH=x86
- cd ${srcdir}/linux-$pkgver
+ cd ${srcdir}/linux-$_basekernel
# get kernel version
_kernver="$(make kernelrelease)"
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
@@ -75,7 +74,7 @@ package_kernel26-libre-lts() {
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
# install fallback mkinitcpio.conf file and preset file for kernel
- install -m644 -D ${srcdir}/${_preset} ${pkgdir}/etc/mkinitcpio.d/${_preset}
+ install -m644 -D ${srcdir}/${pkgname}.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
# set correct depmod command for install
sed \
-e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
@@ -83,17 +82,22 @@ package_kernel26-libre-lts() {
-i $startdir/${pkgname}.install
sed \
-e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
- -e "s|default_image=.*|default_image=\"/boot/kernel26${_kernelname}.img\"|g" \
- -e "s|fallback_image=.*|fallback_image=\"/boot/kernel26${_kernelname}-fallback.img\"|g" \
- -i ${pkgdir}/etc/mkinitcpio.d/${_preset}
+ -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
+ -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
+ -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
- echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/kernel26${_kernelname}.kver
+ echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
# remove build and source links
rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf ${pkgdir}/lib/firmware
- # gzip -9 all modules to safe 100MB of space
+ # gzip -9 all modules to save 100MB of space
find "$pkgdir" -name '*.ko' -exec gzip -9 {} \;
+ # make room for external modules
+ ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
+ # add real version for building the kernel
+ mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
+ echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
}
package_kernel26-libre-lts-headers() {
@@ -104,7 +108,7 @@ package_kernel26-libre-lts-headers() {
mkdir -p ${pkgdir}/lib/modules/${_kernver}
cd ${pkgdir}/lib/modules/${_kernver}
ln -sf ../../../usr/src/linux-${_kernver} build
- cd ${srcdir}/linux-$pkgver
+ cd ${srcdir}/linux-$_basekernel
install -D -m644 Makefile \
${pkgdir}/usr/src/linux-${_kernver}/Makefile
install -D -m644 kernel/Makefile \
@@ -193,7 +197,7 @@ package_kernel26-libre-lts-headers() {
cd ${pkgdir}/usr/src/linux-${_kernver}/include && ln -s asm-$KARCH asm
# add header for aufs2-util
- cp -a ${srcdir}/linux-$pkgver/include/asm-generic/bitsperlong.h ${pkgdir}/usr/src/linux-${_kernver}/include/asm/
+ cp -a ${srcdir}/linux-$_basekernel/include/asm-generic/bitsperlong.h ${pkgdir}/usr/src/linux-${_kernver}/include/asm/
chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
@@ -211,8 +215,3 @@ package_kernel26-libre-lts-headers() {
# remove unneeded architectures
rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
}
-md5sums=('4344dc9016b73a4910566e4a45087465'
- '3298f542840c52a8b8abc1b3795e455b'
- '9990806b3bf3cec6f8bd419249903613'
- '2cbfeb3e2a18d45f82f613e97fc23355'
- 'a03a56a3cd700f0c9004b17e7391f8ff')