diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 54 |
1 files changed, 42 insertions, 12 deletions
@@ -1,16 +1,19 @@ -# Maintainer: James Bunton <jamesbunton@delx.net.au> +# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com +# Contributor: James Bunton <jamesbunton@delx.net.au> # Contributor: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> +set -u pkgbase=linux-lts316 _srcname=linux-3.16 -pkgver=3.16.49 +pkgver=3.16.53 pkgrel=1 arch=('i686' 'x86_64') url="https://www.kernel.org/" license=('GPL2') makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'gcc5') options=('!strip') +_verwatch=('https://www.kernel.org/pub/linux/kernel/v3.x/' '.*patch-\(3\.16\.[0-9]\+\)\.xz.*' 'f') source=("https://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz" "https://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz" # the main kernel config files @@ -20,18 +23,21 @@ source=("https://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz" # standard config files for mkinitcpio ramdisk 'linux.preset' 'change-default-console-loglevel.patch' + 'update.sh' ) sha256sums=('4813ad7927a7d92e5339a873ab16201b242b2748934f12cb5df9ba2cfe1d77a0' - '6cac095f27e2dc714d1fd17b904c600179b042f904f0586b3c07584788e54c88' # patch + 'b8d4c8b7cb6b3002eb5a2da7dec287d586bde6c3e85bdf2ece1d807f32cb81b8' '3bce3e9adce8ae3f826eebab75e9784ca92a914e526ae352de61c1da93aab8d3' - '41ecf5fd8de0bc3dc4d5e20b1e0a28517dc77f96fc5ebdbf227126d85c503588' + '5171cc759f66c1c8366f78ec6a574a9b698b3b4429f512a110ba2ac94c5a2742' '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' - '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99') + '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' + '4dad3093e0c2bd7dafd30a0344b4df6432c3a7d1422edc4e0d1e6201aa513648') _kernelname=${pkgbase#linux} prepare() { + set -u cd "${srcdir}/${_srcname}" # add upstream patch @@ -55,6 +61,7 @@ prepare() { sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config fi + cp ./.config "${srcdir}/config.cmp" # set extraversion to pkgrel sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile @@ -62,8 +69,14 @@ prepare() { # don't run depmod on 'make install'. We'll do this ourselves in packaging sed -i '2iexit 0' scripts/depmod.sh - # get kernel version - make prepare + set +u; msg2 'get kernel version'; set +u + make -s -j1 prepare + if ! diff "${srcdir}/config.cmp" ./.config; then + set +u + echo "Some changes were made. Please merge for automation." + false + fi + rm "${srcdir}/config.cmp" # load configuration # Configure the kernel. Replace the line below with one of your choice. @@ -73,17 +86,27 @@ prepare() { #make oldconfig # using old config from previous kernel version # ... or manually edit .config - # rewrite configuration - yes "" | make config >/dev/null + set +u; msg2 'rewrite configuration'; set +u + yes "" | make -j1 config >/dev/null + set +u } build() { + set -u cd "${srcdir}/${_srcname}" - make CC="gcc-5" ${MAKEFLAGS} LOCALVERSION= bzImage modules + local _mflags=() + local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc)) + if [ -z "${MAKEFLAGS:=}" ] || [ "${MAKEFLAGS//-j/}" = "${MAKEFLAGS}" ]; then + _mflags+=('-j' "${_nproc}") + fi + + nice make -s CC="gcc-5" "${_mflags[@]}" ${MAKEFLAGS} LOCALVERSION= bzImage modules + set +u } _package() { + set -u pkgdesc="The ${pkgbase/linux/Linux} kernel and modules" [ "${pkgbase}" = "linux" ] && groups=('base') depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7') @@ -96,12 +119,12 @@ _package() { KARCH=x86 # get kernel version - _kernver="$(make LOCALVERSION= kernelrelease)" + _kernver="$(make -j1 LOCALVERSION= kernelrelease)" _basekernel=${_kernver%%-*} _basekernel=${_basekernel%.*} mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot} - make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install + make -j1 LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}" # set correct depmod command for install @@ -146,9 +169,11 @@ _package() { # add vmlinux install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux" + set +u } _package-headers() { + set -u pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel" install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" @@ -262,9 +287,11 @@ _package-headers() { # 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} + set +u } _package-docs() { + set -u pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel" cd "${srcdir}/${_srcname}" @@ -276,6 +303,7 @@ _package-docs() { # remove a file already in linux package rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile" + set +u } pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs") @@ -285,3 +313,5 @@ for _p in ${pkgname[@]}; do _package${_p#${pkgbase}} }" done + +set +u |