summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFigue2019-12-31 19:39:52 +0100
committerFigue2019-12-31 19:39:52 +0100
commit8f1fe4265c275dfe36b5e2b099a90f961bf3d2a4 (patch)
treecddaf8235ed81e5d47b4a6a514e2d1625e38ff0e /PKGBUILD
parentc8c810b70589a24a46950affb5d2cd815c789d4d (diff)
downloadaur-8f1fe4265c275dfe36b5e2b099a90f961bf3d2a4.tar.gz
5.4.5-rt3-xanmod
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD91
1 files changed, 23 insertions, 68 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2ccbf355e385..0c81781195a6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -42,10 +42,10 @@ if [ -z ${use_pds+x} ]; then
fi
pkgbase=linux-xanmod-rt
-pkgver=4.19.82
-xanmod=30
-pkgrel=2
-_rev=_rev2
+pkgver=5.4.5
+xanmod=3
+pkgrel=1
+_rev=
arch=(x86_64)
url="http://www.xanmod.org/"
license=(GPL2)
@@ -57,32 +57,23 @@ options=('!strip')
_srcname="linux-${pkgver}-rt${xanmod}-xanmod${_rev}"
source=(https://github.com/xanmod/linux/archive/${pkgver}-rt${xanmod}-xanmod${_rev}.tar.gz
- 60-linux.hook # pacman hook for depmod
- 90-linux.hook # pacman hook for initramfs regeneration
- ${pkgbase}.preset # standard config files for mkinitcpio ramdisk
choose-gcc-optimization.sh
- 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch # Grabbed from linux-ck package
)
-sha256sums=('ced358a87e35ea3bd7d0e62c0518a55bce31104bed7207141a9cd4d94961c40b'
- 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
- 'c043f3033bb781e2688794a59f6d1f7ed49ef9b13eb77ff9a425df33a244a636'
- 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
- '8b2629f6340d4807c113cd9fa308f50f0a8d85df5698bef083e151f06d58f748'
- '112b16c247dae8ff44066fd0268012f9c623d5da349ebd66896e54257b3404a5')
+sha256sums=('c8cb0c5c1a4131c37c8afcbbc73d4fee6891c8d25eb2201a1ac6a048353a93f9'
+ '8b2629f6340d4807c113cd9fa308f50f0a8d85df5698bef083e151f06d58f748')
-_kernelname=${pkgbase#linux}
+export KBUILD_BUILD_HOST=archlinux
+export KBUILD_BUILD_USER=$pkgbase
+export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})"
prepare() {
cd $_srcname
- # Workaround GCC 9 build, source: https://www.linuxquestions.org/questions/slackware-14/make-linux-4-19-42-error-4175653720/
- export LANG=en_US.UTF-8
-
msg2 "Setting version..."
scripts/setlocalversion --save-scmversion
echo "-$pkgrel" > localversion.10-pkgrel
- echo "$_kernelname" > localversion.20-pkgname
+ echo "${pkgbase#linux}" > localversion.20-pkgname
# Archlinux patches
local src
@@ -119,7 +110,7 @@ prepare() {
fi
# Let's user choose microarchitecture optimization in GCC
- ${srcdir}/choose-gcc-optimization.sh $_microarchitecture
+ sh ${srcdir}/choose-gcc-optimization.sh $_microarchitecture
# This is intended for the people that want to build this package with their own config
# Put the file "myconfig" at the package folder to use this feature
@@ -130,8 +121,8 @@ prepare() {
make olddefconfig
- make -s kernelrelease > ../version
- msg2 "Prepared %s version %s" "$pkgbase" "$(<../version)"
+ make -s kernelrelease > version
+ msg2 "Prepared %s version %s" "$pkgbase" "$(<version)"
}
build() {
@@ -142,73 +133,40 @@ build() {
_package() {
pkgdesc="The Linux kernel and modules with Xanmod patches"
depends=(coreutils linux-firmware kmod mkinitcpio)
- optdepends=('crda: to set the correct wireless channels of your country')
- provides=('linux' 'linux-xanmod')
- #replaces=('linux-xanmod-git')
- #conflicts=('linux-xanmod-git')
- backup=("etc/mkinitcpio.d/$pkgbase.preset")
- install=linux.install
+ optdepends=('crda: to set the correct wireless channels of your country'
+ 'linux-firmware: firmware images needed for some devices')
+ cd $_srcname
local kernver="$(<version)"
local modulesdir="$pkgdir/usr/lib/modules/$kernver"
- cd $_srcname
-
msg2 "Installing boot image..."
# systemd expects to find the kernel here to allow hibernation
# https://github.com/systemd/systemd/commit/edda44605f06a41fb86b7ab8128dcf99161d2344
install -Dm644 "$(make -s image_name)" "$modulesdir/vmlinuz"
- install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-$pkgbase"
+
+ # Used by mkinitcpio to name the kernel
+ echo "$pkgbase" | install -Dm644 /dev/stdin "$modulesdir/pkgbase"
msg2 "Installing modules..."
make INSTALL_MOD_PATH="$pkgdir/usr" modules_install
- # 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"
-
# 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" ../$pkgbase.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"
}
_package-headers() {
pkgdesc="Header files and scripts for building modules for Xanmod Linux kernel"
- provides=('linux-headers' 'linux-xanmod-headers')
- #replaces=('linux-xanmod-git-headers')
- #conflicts=('linux-xanmod-git-headers')
-
- local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
cd $_srcname
+ local builddir="$pkgdir/usr/lib/modules/$(<version)/build"
msg2 "Installing build files..."
- install -Dt "$builddir" -m644 Makefile .config Module.symvers System.map vmlinux
+ install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map \
+ localversion.* version vmlinux
install -Dt "$builddir/kernel" -m644 kernel/Makefile
install -Dt "$builddir/arch/x86" -m644 arch/x86/Makefile
cp -t "$builddir" -a scripts
@@ -219,9 +177,6 @@ _package-headers() {
# add xfs and shmem for aufs building
mkdir -p "$builddir"/{fs/xfs,mm}
- # ???
- mkdir "$builddir/.tmp_versions"
-
msg2 "Installing headers..."
cp -t "$builddir" -a include
cp -t "$builddir/arch/x86" -a arch/x86/include
@@ -275,7 +230,7 @@ _package-headers() {
msg2 "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
- ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase-$pkgver"
+ ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
msg2 "Fixing permissions..."
chmod -Rc u=rwX,go=rX "$pkgdir"