summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD84
1 files changed, 24 insertions, 60 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f2316c1f42f2..261682ec60fe 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -42,47 +42,41 @@ if [ -z ${use_pds+x} ]; then
fi
pkgbase=linux-xanmod
-_srcname=linux
-pkgver=5.3.13
-xanmod=9
+pkgver=5.4.0
+xanmod=0
pkgrel=1
-arch=(x86_64)
+pkgdesc='Linux Xanmod'
url="http://www.xanmod.org/"
+arch=(x86_64)
+
license=(GPL2)
makedepends=(
- xmlto kmod inetutils bc libelf git python-sphinx python-sphinx_rtd_theme
- graphviz imagemagick cpio
+ xmlto kmod inetutils bc libelf
+ python-sphinx python-sphinx_rtd_theme graphviz imagemagick
)
options=('!strip')
_srcname="linux-${pkgver}-xanmod${xanmod}"
source=(https://github.com/xanmod/linux/archive/${pkgver}-xanmod${xanmod}.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=('085a1cda3098963ed748e62d818806737d80c69cda2fdf89b7b2333487610c68'
- 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
- 'c043f3033bb781e2688794a59f6d1f7ed49ef9b13eb77ff9a425df33a244a636'
- 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
+sha256sums=('7c328cd003a4d4a4ad2e538418c018775c573dbc7851cb7b8efa0ab39ef4550b'
'8b2629f6340d4807c113cd9fa308f50f0a8d85df5698bef083e151f06d58f748'
'112b16c247dae8ff44066fd0268012f9c623d5da349ebd66896e54257b3404a5')
-_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
@@ -130,8 +124,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,57 +136,30 @@ 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')
+ optdepends=('crda: to set the correct wireless channels of your country'
+ 'linux-firmware: firmware images needed for some devices')
provides=('linux' 'linux-xanmod-git')
replaces=('linux-xanmod-git')
conflicts=('linux-xanmod-git')
- backup=("etc/mkinitcpio.d/$pkgbase.preset")
- install=linux.install
+ 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"
}
@@ -203,12 +170,12 @@ _package-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 +186,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 +239,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"