diff options
Diffstat (limited to 'kernels/linux-libre-pae/PKGBUILD')
-rw-r--r-- | kernels/linux-libre-pae/PKGBUILD | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/kernels/linux-libre-pae/PKGBUILD b/kernels/linux-libre-pae/PKGBUILD index 2234a4d16..ec7336a48 100644 --- a/kernels/linux-libre-pae/PKGBUILD +++ b/kernels/linux-libre-pae/PKGBUILD @@ -1,4 +1,3 @@ -# $Id: PKGBUILD 219731 2014-08-14 06:02:01Z tpowa $ # Contributor (Arch): Tobias Powalowski <tpowa@archlinux.org> # Contributor (Arch): Thomas Baechler <thomas@archlinux.org> # Maintainer: André Silva <emulatorman@parabola.nu> @@ -8,45 +7,53 @@ # Contributor: Márcio Silva <coadde@parabola.nu> # Contributor: Luke Shumaker <lukeshu@sbcglobal.net> -pkgbase=linux-libre-pae # Build stock -libre-pae kernel -#pkgbase=linux-libre-custom # Build kernel with a different name -_basekernel=3.16 -pkgver=${_basekernel}.1 +pkgbase=linux-libre-pae # Build stock -pae kernel +_pkgbasever=3.16-gnu +_pkgver=3.16.1-gnu + +_replaces=('kernel26%' 'kernel26-libre%' 'linux%' 'linux-libre%-kmod-alx') # '%' gets replaced with _kernelname + +_srcname=linux-${_pkgbasever%-*} +pkgver=${_pkgver//-/.} pkgrel=1 arch=('i686') url="http://linux-libre.fsfla.org/" license=('GPL2') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc') options=('!strip') -source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" - "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-gnu/patch-${_basekernel}-gnu-${pkgver}-gnu.xz" +source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgbasekernel}/linux-libre-${_pkgbasekernel}.tar.xz" + "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}/patch-${_pkgbasekernel}-${_pkgver}.xz" # the main kernel config files 'config' # standard config files for mkinitcpio ramdisk - "${pkgbase}.preset" - 'boot-logo.patch' + 'linux.preset' + 'logo_linux_'{clut224.ppm,vga16.ppm,mono.pbm} 'change-default-console-loglevel.patch' 'compal-laptop-hwmon-fix.patch') sha256sums=('9c2a524c901febe0f0138f702bfdeb52d6f79f22c1fdbabaa37580bc70f16218' '3bbc78694d76b12b6229799d7c4daf5215b9dd731908d96b03603aceb54ad5c7' 'd7f16bb97225fc315cbe0bdf5fbc30ee8e387298bd53ba7cc623044b2f48c506' - '292d5c553f87246c8dc2d57cadfd2db92a3750173b4588d53c2919743171eca5' - '8303b426b1a6dce456b2350003558ae312d21cab0ae6c1f0d7b9d21395f4e177' + 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' + '074b67818582874146c389c029bc43648d145891a27e47aa2c5c42d3571f0264' + '2e87a8ec1cc0c91938cac24992d8a3d4362b3e9d939767e4c9d2ec8e6d969d53' + 'f67f60a30bcf2e9a2ba88ad97cace308da7a7f94919bb95c3dc030f5885a8015' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' 'f36f61a0a72bcb0a9c04264343503bfbf927c9ea0db819e66734a3933b060588') _kernelname=${pkgbase#linux-libre} -_localversionname=-libre-pae +_replaces=("${_replaces[@]/\%/${_kernelname}}") prepare() { - cd "${srcdir}/linux-${_basekernel}" + cd "${srcdir}/${_srcname}" - if [ "${_basekernel}" != "${pkgver}" ]; then - patch -p1 -i "${srcdir}/patch-${_basekernel}-gnu-${pkgver}-gnu" + # add upstream patch + if [ "${_pkgbasever}" != "${_pkgver}" ]; then + patch -p1 -i "${srcdir}/patch-${_pkgbasever}-${_pkgver}" fi # add freedo as boot logo - patch -p1 -i "${srcdir}/boot-logo.patch" + install -m644 -t drivers/video/logo \ + "${srcdir}/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm} # add latest fixes from stable queue, if needed # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git @@ -61,13 +68,8 @@ prepare() { cat "${srcdir}/config" > ./.config # simpler - if [ "${_kernelname}" != "" ]; then - sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" ./.config - sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config - fi - - # set extraversion to pkgrel - sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile + # append pkgrel to extraversion + sed -ri "s|^(EXTRAVERSION =.*\S).*|\1-${pkgrel}|" Makefile # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh @@ -88,7 +90,7 @@ prepare() { } build() { - cd "${srcdir}/linux-${_basekernel}" + cd "${srcdir}/${_srcname}" make ${MAKEFLAGS} LOCALVERSION= bzImage modules } @@ -96,15 +98,15 @@ build() { _package() { pkgdesc="The ${pkgbase^} kernel and modules with PAE support (HIGHMEM64G)" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'linux-libre-firmware' 'kmod' 'mkinitcpio>=0.7') + depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7') optdepends=('crda: to set the correct wireless channels of your country') - provides=("kernel26${_kernelname}=${pkgver}" "linux${_kernelname}=${pkgver}") - conflicts=("kernel26${_kernelname}" "kernel26-libre${_kernelname}" "linux${_kernelname}") - replaces=("kernel26${_kernelname}" "kernel26-libre${_kernelname}" "linux${_kernelname}") + provides=( "${_replaces[@]/%/=${pkgver}}") + conflicts=("${_replaces[@]}") + replaces=( "${_replaces[@]}") backup=("etc/mkinitcpio.d/${pkgbase}.preset") - install=${pkgbase}.install + install=linux.install - cd "${srcdir}/linux-${_basekernel}" + cd "${srcdir}/${_srcname}" KARCH=x86 @@ -126,9 +128,9 @@ _package() { -i "${startdir}/${install}" # install mkinitcpio preset file for kernel - install -D -m644 "${srcdir}/${pkgbase}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" sed \ - -e "1s|'linux*.*'|'${pkgbase}'|" \ + -e "1s|'linux.*'|'${pkgbase}'|" \ -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \ -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \ -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgbase}-fallback.img\"|" \ @@ -141,10 +143,10 @@ _package() { # 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}${_localversionname:--libre-pae}" "${pkgdir}/lib/modules/${_kernver}/extramodules" + ln -s "../extramodules-${_basekernel}${_kernelname}" "${pkgdir}/lib/modules/${_kernver}/extramodules" # add real version for building modules and running depmod from post_install/upgrade - mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--libre-pae}" - echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_localversionname:--libre-pae}/version" + mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}" + echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname}/version" # Now we call depmod... depmod -b "${pkgdir}" -F System.map "${_kernver}" @@ -159,13 +161,13 @@ _package() { _package-headers() { pkgdesc="Header files and scripts for building modules for ${pkgbase^} kernel" - provides=("kernel26${_kernelname}-headers=${pkgver}" "linux${_kernelname}-headers=${pkgver}") - conflicts=("kernel26${_kernelname}-headers" "kernel26-libre${_kernelname}-headers" "linux${_kernelname}-headers") - replaces=("kernel26${_kernelname}-headers" "kernel26-libre${_kernelname}-headers" "linux${_kernelname}-headers") + provides=( "${_replaces[@]/%/-headers=${pkgver}}") + conflicts=("${_replaces[@]/%/-headers}") + replaces=( "${_replaces[@]/%/-headers}") install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" - cd "${srcdir}/linux-${_basekernel}" + cd "${srcdir}/${_srcname}" install -D -m644 Makefile \ "${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile" install -D -m644 kernel/Makefile \ @@ -273,7 +275,7 @@ _package-headers() { done # remove unneeded architectures - rm -rf "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa} + find "${pkgdir}"/usr/lib/modules/${_kernver}/build/arch -mindepth 1 -maxdepth 1 -type d -not -name "x86" -exec rm -rf {} + } _package-docs() { |