summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYurii Kolesnykov2018-12-20 19:56:53 +0100
committerYurii Kolesnykov2018-12-20 19:56:53 +0100
commit15d4d8f07335782d93bbc436b02475b27f042b69 (patch)
tree13177e4e636ad9c3b5de758cb16082141e184572
parent448c8e63f6f77760aba67910f7ee5533a2592e30 (diff)
downloadaur-15d4d8f07335782d93bbc436b02475b27f042b69.tar.gz
4.21.798081.6afe8925a297
-rw-r--r--.SRCINFO28
-rw-r--r--60-linux.hook12
-rw-r--r--90-linux.hook11
-rw-r--r--PKGBUILD384
-rw-r--r--config (renamed from config.x86_64)0
-rw-r--r--linux.install18
-rw-r--r--linux.preset (renamed from linux-drm-intel-next-queued-git.preset)0
7 files changed, 222 insertions, 231 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 11f8c16686c..c39daa16850 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,43 +1,43 @@
pkgbase = linux-drm-intel-next-queued-git
pkgdesc = Linux with patches for Intel graphics
- pkgver = 4.20.798059.ab2cb2cb1a77
+ pkgver = 4.21.798081.6afe8925a297
pkgrel = 1
url = https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.html
arch = x86_64
license = GPL2
makedepends = xmlto
- makedepends = docbook-xsl
makedepends = kmod
makedepends = inetutils
makedepends = bc
- makedepends = git
makedepends = libelf
+ makedepends = git
+ makedepends = python-sphinx
+ makedepends = graphviz
options = !strip
source = linux-drm-intel-next-queued-git::git://anongit.freedesktop.org/drm/drm-intel#branch=drm-intel-next-queued
- source = config.x86_64
- source = linux.install
- source = linux-drm-intel-next-queued-git.preset
+ source = config
+ source = 60-linux.hook
+ source = 90-linux.hook
+ source = linux.preset
sha256sums = SKIP
sha256sums = e895c23981246858fe4a6b0a51e351d39b713149f9ab73fe867ab4eae4735994
- sha256sums = d590e751ab4cf424b78fd0d57e53d187f07401a68c8b468d17a5f39a337dacf0
+ sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21
+ sha256sums = 834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0
sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
pkgname = linux-drm-intel-next-queued-git
- pkgdesc = The Linux kernel and modules with patches for Intel graphics
+ pkgdesc = The Linux-drm-intel-next-queued-git kernel and modules
install = linux.install
depends = coreutils
depends = linux-firmware
depends = kmod
- depends = mkinitcpio>=0.7
+ depends = mkinitcpio
optdepends = crda: to set the correct wireless channels of your country
- provides = linux
backup = etc/mkinitcpio.d/linux-drm-intel-next-queued-git.preset
pkgname = linux-drm-intel-next-queued-git-headers
- pkgdesc = Header files and scripts for building modules for Linux kernel with patches for Intel graphics
- provides = linux-headers
+ pkgdesc = Header files and scripts for building modules for Linux-drm-intel-next-queued-git kernel
pkgname = linux-drm-intel-next-queued-git-docs
- pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux kernel with patches for Intel graphics
- provides = linux-docs
+ pkgdesc = Kernel hackers manual - HTML documentation that comes with the Linux-drm-intel-next-queued-git kernel
diff --git a/60-linux.hook b/60-linux.hook
new file mode 100644
index 00000000000..b33873c854f
--- /dev/null
+++ b/60-linux.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/lib/modules/%KERNVER%/*
+Target = usr/lib/modules/%EXTRAMODULES%/*
+
+[Action]
+Description = Updating %PKGBASE% module dependencies...
+When = PostTransaction
+Exec = /usr/bin/depmod %KERNVER%
diff --git a/90-linux.hook b/90-linux.hook
new file mode 100644
index 00000000000..9851151995b
--- /dev/null
+++ b/90-linux.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+Operation = Install
+Operation = Upgrade
+Target = boot/vmlinuz-%PKGBASE%
+Target = usr/lib/initcpio/*
+
+[Action]
+Description = Updating %PKGBASE% initcpios
+When = PostTransaction
+Exec = /usr/bin/mkinitcpio -p %PKGBASE%
diff --git a/PKGBUILD b/PKGBUILD
index c079ec3a3cc..c05f5fcc69c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,34 @@
# Maintainer: Yurii Kolesnykov <root@yurikoles.com>
-# Contributor: Boohbah <boohbah at gmail.com>
-# Contributor: Tobias Powalowski <tpowa@archlinux.org>
-# Contributor: Thomas Baechler <thomas@archlinux.org>
-# Contributor: Jonathan Chan <jyc@fastmail.fm>
-# Contributor: misc <tastky@gmail.com>
-# Contributor: NextHendrix <cjones12 at sheffield.ac.uk>
-# Contributor: Shun Terabayashi <shunonymous at gmail.com>
-# Contributor: Brad McCormack <bradmccormack100 at gmail.com>
+#
+# Based on the linux-mainline package by:
+# Maintainer: Mikael Eriksson <mikael_eriksson@miffe.org>
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Maintainer: Thomas Baechler <thomas@archlinux.org>
pkgbase=linux-drm-intel-next-queued-git
pkgdesc='Linux with patches for Intel graphics'
-_srcname=$pkgbase
-_kernel_rel=4.20
+_srcname=${pkgbase}
+_kernel_rel=4.21
_branch=drm-intel-next-queued
_kernelname=${pkgbase#linux}
-pkgver=4.20.798059.ab2cb2cb1a77
+pkgver=4.21.798081.6afe8925a297
pkgrel=1
arch=('x86_64')
url='https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.html'
-license=('GPL2')
-makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'libelf')
+license=(GPL2)
+makedepends=(xmlto kmod inetutils bc libelf git python-sphinx graphviz)
options=('!strip')
source=("${pkgbase}::git://anongit.freedesktop.org/drm/drm-intel#branch=${_branch}"
- # the main kernel config files
- 'config.x86_64'
- # standard config files for mkinitcpio ramdisk
- 'linux.install'
- "${pkgbase}.preset")
-
+ config # the main kernel config file
+ 60-linux.hook # pacman hook for depmod
+ 90-linux.hook # pacman hook for initramfs regeneration
+ linux.preset # standard config files for mkinitcpio ramdisk
+)
sha256sums=('SKIP'
'e895c23981246858fe4a6b0a51e351d39b713149f9ab73fe867ab4eae4735994'
- 'd590e751ab4cf424b78fd0d57e53d187f07401a68c8b468d17a5f39a337dacf0'
+ 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
+ '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0'
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65')
pkgver() {
cd "${_srcname}"
@@ -38,230 +36,210 @@ pkgver() {
echo ${_kernel_rel}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
-prepare() {
- cd "${_srcname}"
-
- cat "${srcdir}/config.x86_64" > ./.config
-
- # set localversion to git commit
- sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"-${pkgver##*.}\"|g" ./.config
- sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
+_kernelname=${pkgbase#linux}
+: ${_kernelname:=-ARCH}
- # don't run depmod on 'make install'. We'll do this ourselves in packaging
- sed -i '2iexit 0' scripts/depmod.sh
+prepare() {
+ cd $_srcname
+
+ msg2 "Setting version..."
+ scripts/setlocalversion --save-scmversion
+ #echo "-$pkgrel" > localversion.10-pkgrel
+ echo "$_kernelname" > localversion.20-pkgname
+
+ local src
+ for src in "${source[@]}"; do
+ src="${src%%::*}"
+ src="${src##*/}"
+ [[ $src = *.patch ]] || continue
+ msg2 "Applying patch $src..."
+ patch -Np1 < "../$src"
+ done
- # get kernel version
- make prepare
+ msg2 "Setting config..."
+ cp ../config .config
+ make olddefconfig
- # load configuration
- # Configure the kernel. Replace the line below with one of your choice.
- #make menuconfig # CLI menu for configuration
- #make nconfig # new CLI menu for configuration
- #make xconfig # X-based configuration
- #make oldconfig # using old config from previous kernel version
- make olddefconfig # old config from previous kernel, defaults for new options
- # ... or manually edit .config
+ make -s kernelrelease > ../version
+ msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)"
}
build() {
- cd "${_srcname}"
-
- make ${MAKEFLAGS} LOCALVERSION= bzImage modules
+ cd $_srcname
+ make bzImage modules htmldocs
}
_package() {
- pkgdesc="The Linux kernel and modules with patches for Intel graphics"
- depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
+ pkgdesc="The ${pkgbase/linux/Linux} kernel and modules"
+ [[ $pkgbase = linux ]] && groups=(base)
+ depends=(coreutils linux-firmware kmod mkinitcpio)
optdepends=('crda: to set the correct wireless channels of your country')
- provides=('linux')
- backup=("etc/mkinitcpio.d/${pkgbase}.preset")
+ backup=("etc/mkinitcpio.d/$pkgbase.preset")
install=linux.install
- cd "${_srcname}"
+ local kernver="$(<version)"
- KARCH=x86
-
- # get kernel version
- _kernver="$(make LOCALVERSION= kernelrelease)"
- _basekernel=${_kernver%%-*}
- _basekernel=${_basekernel%.*}
-
- mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
- make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
- cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
-
- # set correct depmod command for install
- cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
- true && install=${install}.pkg
- sed \
- -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" \
- -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \
- -i "${startdir}/${install}"
-
- # install mkinitcpio preset file for kernel
- install -D -m644 "${srcdir}/${pkgbase}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
- sed \
- -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\"|" \
- -i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
+ cd $_srcname
- # remove build and source links
- rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
- # remove the firmware
- rm -rf "${pkgdir}/lib/firmware"
- # make room for external modules
- ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${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}${_kernelname:--ARCH}"
- echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
-
- # Now we call depmod...
- depmod -b "${pkgdir}" -F System.map "${_kernver}"
-
- # move module tree /lib -> /usr/lib
- mkdir -p "${pkgdir}/usr"
- mv "${pkgdir}/lib" "${pkgdir}/usr/"
-
- # add vmlinux
- install -D -m644 vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
-
- # add System.map
- install -D -m644 System.map "${pkgdir}/boot/System.map-${_kernver}"
-}
-
-_package-headers() {
- pkgdesc="Header files and scripts for building modules for Linux kernel with patches for Intel graphics"
- provides=('linux-headers')
+ msg2 "Installing boot image..."
+ install -Dm644 "$(make -s image_name)" "$pkgdir/boot/vmlinuz-$pkgbase"
- install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
+ msg2 "Installing modules..."
+ local modulesdir="$pkgdir/usr/lib/modules/$kernver"
+ mkdir -p "$modulesdir"
+ make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
- cd "${_srcname}"
- install -D -m644 Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
- install -D -m644 kernel/Makefile \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/kernel/Makefile"
- install -D -m644 .config \
- "${pkgdir}/usr/lib/modules/${_kernver}/build/.config"
-
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include"
-
- for i in acpi asm-generic config crypto drm generated keys linux math-emu \
- media net pcmcia scsi sound trace uapi video xen; do
- cp -a include/${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/include/"
- done
+ # a place for external modules,
+ # with version file for building modules and running depmod from hook
+ local extramodules="extramodules$_kernelname"
+ local extradir="$pkgdir/usr/lib/modules/$extramodules"
+ install -Dt "$extradir" -m644 ../version
+ ln -sr "$extradir" "$modulesdir/extramodules"
- # copy arch includes for external modules
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86"
- cp -a arch/x86/include "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/x86/"
+ # remove build and source links
+ rm "$modulesdir"/{source,build}
+
+ msg2 "Installing hooks..."
+ # sed expression for following substitutions
+ local subst="
+ s|%PKGBASE%|$pkgbase|g
+ s|%KERNVER%|$kernver|g
+ s|%EXTRAMODULES%|$extramodules|g
+ "
+
+ # hack to allow specifying an initially nonexisting install file
+ sed "$subst" "$startdir/$install" > "$startdir/$install.pkg"
+ true && install=$install.pkg
+
+ # fill in mkinitcpio preset and pacman hooks
+ sed "$subst" ../linux.preset | install -Dm644 /dev/stdin \
+ "$pkgdir/etc/mkinitcpio.d/$pkgbase.preset"
+ sed "$subst" ../60-linux.hook | install -Dm644 /dev/stdin \
+ "$pkgdir/usr/share/libalpm/hooks/60-$pkgbase.hook"
+ sed "$subst" ../90-linux.hook | install -Dm644 /dev/stdin \
+ "$pkgdir/usr/share/libalpm/hooks/90-$pkgbase.hook"
+
+ msg2 "Fixing permissions..."
+ chmod -Rc u=rwX,go=rX "$pkgdir"
+}
- # copy files necessary for later builds, like nvidia and vmware
- cp Module.symvers "${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp -a scripts "${pkgdir}/usr/lib/modules/${_kernver}/build"
+_package-headers() {
+ pkgdesc="Header files and scripts for building modules for ${pkgbase/linux/Linux} kernel"
- # fix permissions on scripts dir
- chmod og-w -R "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/.tmp_versions"
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel"
+ cd $_srcname
- cp arch/${KARCH}/Makefile "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/"
+ msg2 "Installing build files..."
+ install -Dt "$builddir" -m644 Makefile .config Module.symvers System.map vmlinux
+ install -Dt "$builddir/kernel" -m644 kernel/Makefile
+ install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
+ cp -t "$builddir" -a scripts
- cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/lib/modules/${_kernver}/build/arch/${KARCH}/kernel/"
+ # add objtool for external module building and enabled VALIDATION_STACK option
+ install -Dt "$builddir/tools/objtool" tools/objtool/objtool
- # add dm headers
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
- cp drivers/md/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/md"
+ # add xfs and shmem for aufs building
+ mkdir -p "$builddir"/{fs/xfs,mm}
- # add inotify.h
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux"
- cp include/linux/inotify.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/linux/"
+ # ???
+ mkdir "$builddir/.tmp_versions"
- # add wireless headers
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
- cp net/mac80211/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/net/mac80211/"
+ msg2 "Installing headers..."
+ cp -t "$builddir" -a include
+ cp -t "$builddir/arch/x86" -a arch/x86/include
+ install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s
+ install -Dt "$builddir/arch/x86/kernel" -m644 arch/x86/kernel/macros.s
- # add dvb headers for external modules
- # http://bugs.archlinux.org/task/11194
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
- cp include/config/dvb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/include/config/dvb/"
+ install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
+ install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
- # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
- # in reference to:
# http://bugs.archlinux.org/task/13146
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
- cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/i2c/"
+ install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
- # add dvb headers
- # in reference to:
# http://bugs.archlinux.org/task/20402
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb"
- cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/usb/dvb-usb/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends"
- cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/dvb-frontends/"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners"
- cp drivers/media/tuners/*.h "${pkgdir}/usr/lib/modules/${_kernver}/build/drivers/media/tuners/"
-
- # add xfs and shmem for aufs building
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs"
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/mm"
- # removed in 3.17 series
- # cp fs/xfs/xfs_sb.h "${pkgdir}/usr/lib/modules/${_kernver}/build/fs/xfs/xfs_sb.h"
-
- # copy in Kconfig files
- for i in $(find . -name "Kconfig*"); do
- mkdir -p "${pkgdir}"/usr/lib/modules/${_kernver}/build/`echo ${i} | sed 's|/Kconfig.*||'`
- cp ${i} "${pkgdir}/usr/lib/modules/${_kernver}/build/${i}"
+ install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
+ install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
+ install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
+
+ msg2 "Installing KConfig files..."
+ find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
+
+ msg2 "Removing unneeded architectures..."
+ local arch
+ for arch in "$builddir"/arch/*/; do
+ [[ $arch = */x86/ ]] && continue
+ echo "Removing $(basename "$arch")"
+ rm -r "$arch"
done
- # Fix file conflict with -doc package
- rm "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/kbuild"/Kconfig.*-*
-
- # Add objtool for CONFIG_STACK_VALIDATION
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build/tools"
- cp -a tools/objtool "${pkgdir}/usr/lib/modules/${_kernver}/build/tools"
-
- chown -R root.root "${pkgdir}/usr/lib/modules/${_kernver}/build"
- find "${pkgdir}/usr/lib/modules/${_kernver}/build" -type d -exec chmod 755 {} \;
-
- # strip scripts directory
- find "${pkgdir}/usr/lib/modules/${_kernver}/build/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
- case "$(file -bi "${binary}")" in
- *application/x-sharedlib*) # Libraries (.so)
- /usr/bin/strip ${STRIP_SHARED} "${binary}";;
- *application/x-archive*) # Libraries (.a)
- /usr/bin/strip ${STRIP_STATIC} "${binary}";;
- *application/x-executable*) # Binaries
- /usr/bin/strip ${STRIP_BINARIES} "${binary}";;
+ msg2 "Removing documentation..."
+ rm -r "$builddir/Documentation"
+
+ msg2 "Removing broken symlinks..."
+ find -L "$builddir" -type l -printf 'Removing %P\n' -delete
+
+ msg2 "Removing loose objects..."
+ find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
+
+ msg2 "Stripping build tools..."
+ local file
+ while read -rd '' file; do
+ case "$(file -bi "$file")" in
+ application/x-sharedlib\;*) # Libraries (.so)
+ strip -v $STRIP_SHARED "$file" ;;
+ application/x-archive\;*) # Libraries (.a)
+ strip -v $STRIP_STATIC "$file" ;;
+ application/x-executable\;*) # Binaries
+ strip -v $STRIP_BINARIES "$file" ;;
+ application/x-pie-executable\;*) # Relocatable binaries
+ strip -v $STRIP_SHARED "$file" ;;
esac
- done
+ done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
+
+ msg2 "Adding symlink..."
+ mkdir -p "$pkgdir/usr/src"
+ ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase-$pkgver"
- # 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}
+ msg2 "Fixing permissions..."
+ chmod -Rc u=rwX,go=rX "$pkgdir"
}
_package-docs() {
- pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel with patches for Intel graphics"
- provides=('linux-docs')
+ pkgdesc="Kernel hackers manual - HTML documentation that comes with the ${pkgbase/linux/Linux} kernel"
- cd "${_srcname}"
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
+
+ cd $_srcname
+
+ msg2 "Installing documentation..."
+ mkdir -p "$builddir"
+ cp -t "$builddir" -a Documentation
+
+ msg2 "Removing doctrees..."
+ rm -r "$builddir/Documentation/output/.doctrees"
+
+ msg2 "Moving HTML docs..."
+ local src dst
+ while read -rd '' src; do
+ dst="$builddir/Documentation/${src#$builddir/Documentation/output/}"
+ mkdir -p "${dst%/*}"
+ mv "$src" "$dst"
+ rmdir -p --ignore-fail-on-non-empty "${src%/*}"
+ done < <(find "$builddir/Documentation/output" -type f -print0)
- mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build"
- cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"
- find "${pkgdir}" -type f -exec chmod 444 {} \;
- find "${pkgdir}" -type d -exec chmod 755 {} \;
+ msg2 "Adding symlink..."
+ mkdir -p "$pkgdir/usr/share/doc"
+ ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase"
- # remove a file already in linux package
- rm -f "${pkgdir}/usr/lib/modules/${_kernver}/build/Documentation/DocBook/Makefile"
+ msg2 "Fixing permissions..."
+ chmod -Rc u=rwX,go=rX "$pkgdir"
}
-pkgname=("${pkgbase}" "${pkgbase}-headers" "${pkgbase}-docs")
-for _p in ${pkgname[@]}; do
- eval "package_${_p}() {
- $(declare -f "_package${_p#${pkgbase}}")
- _package${_p#${pkgbase}}
+pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
+for _p in "${pkgname[@]}"; do
+ eval "package_$_p() {
+ $(declare -f "_package${_p#$pkgbase}")
+ _package${_p#$pkgbase}
}"
done
diff --git a/config.x86_64 b/config
index 6ee04267895..6ee04267895 100644
--- a/config.x86_64
+++ b/config
diff --git a/linux.install b/linux.install
index ef42413835a..04627758414 100644
--- a/linux.install
+++ b/linux.install
@@ -1,15 +1,7 @@
-# arg 1: the new package version
-# arg 2: the old package version
-
-KERNEL_NAME=
-KERNEL_VERSION=
-
post_install () {
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
- depmod ${KERNEL_VERSION}
- echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
- mkinitcpio -p linux${KERNEL_NAME}
+ depmod %KERNVER%
}
post_upgrade() {
@@ -19,9 +11,7 @@ post_upgrade() {
# updating module dependencies
echo ">>> Updating module dependencies. Please wait ..."
- depmod ${KERNEL_VERSION}
- echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
- mkinitcpio -p linux${KERNEL_NAME}
+ depmod %KERNVER%
if [ $(vercmp $2 3.13) -lt 0 ]; then
echo ">>> WARNING: AT keyboard support is no longer built into the kernel."
@@ -32,6 +22,6 @@ post_upgrade() {
post_remove() {
# also remove the compat symlinks
- rm -f boot/initramfs-linux${KERNEL_NAME}.img
- rm -f boot/initramfs-linux${KERNEL_NAME}-fallback.img
+ rm -f boot/initramfs-%PKGBASE%.img
+ rm -f boot/initramfs-%PKGBASE%-fallback.img
}
diff --git a/linux-drm-intel-next-queued-git.preset b/linux.preset
index 66709a8c153..66709a8c153 100644
--- a/linux-drm-intel-next-queued-git.preset
+++ b/linux.preset