summaryrefslogtreecommitdiff
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD54
1 files changed, 33 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4d2d366..151e4eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -51,12 +51,12 @@ sha256sums=('2ee24af9282b80923b2da56b70aad7df2e8ee4e3f076452e05ba66be2059b519'
'SKIP'
'42035fd059faa25a09cd511b24a57b8ad1285cb69127f2a0043b98562c5ec690'
'SKIP'
- '17eb40d7db18707b1bca581f28caea1ac0c1451639db4234a0eefd84edee32f2')
+ '277c842427afe59d4016299e8fe197fa10c4c49514536309e9c8de3b49b209a3')
b2sums=('7e3fe230425b7ee403571beff74e4b4e1668aa53c388e2c00b9e5f097d528467f40ae487b61947ad2432c8f64d26690c3996e14cda25e0d43a5c456e50031539'
'SKIP'
'80d94cd5ef0bbeaa570853c10f480e3cd64cb852b53aced2e7d382d097130fcf8f94060126a04321f913bca5d9158813a74e97f1dd0f110359d911a33e4a0d77'
'SKIP'
- '71ef3154ad8bd070deb4ca94be99019e3932db8276b109604b1b761f5dd0001f1e0ccabc0727036568824b9e47d3365f2c2ae38aad88258bb719a80715bc315f')
+ 'f15f74b3e08eddd75d7c169f369e396a7c8d6bba08e3c35bca95ed92fcebc100ed1a3c9d86cea12e5fe0d0bfbb4b0870e14d75f59259ab6d671070b6d9c8d003')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@@ -83,33 +83,28 @@ prepare() {
echo "Setting config..."
cp ../config .config
make olddefconfig
- make prepare
-
- cd ../zfs-${_zver}
- ./autogen.sh
- KERNEL_LLVM=1 CC=clang ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --with-mounthelperdir=/usr/bin \
- --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \
- --with-udevdir=/usr/lib/udev --libexecdir=/usr/lib \
- --enable-systemd --enable-pyzfs \
- --with-zfsexecdir=/usr/lib/zfs --localstatedir=/var \
- --enable-linux-builtin --with-linux=../$_srcname
- ./copy-builtin ../$_srcname
-
- cd ../$_srcname
-
- cp ../config .config
-
- make olddefconfig
diff -u ../config .config || :
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
+ make prepare
+
+ cd ../zfs-${_zver}
+ ./autogen.sh
+ KERNEL_LLVM=1 CC=clang ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib \
+ --datadir=/usr/share --includedir=/usr/include --with-udevdir=/usr/lib/udev \
+ --libexecdir=/usr/lib --with-config=kernel \
+ --with-linux="${srcdir}/$_srcname" \
+ --with-linux-obj="${srcdir}/$_srcname"
}
build() {
cd $_srcname
make all
# make htmldocs
+
+ cd ../zfs-${_zver}
+ make
}
_package() {
@@ -149,8 +144,19 @@ _package() {
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
- # remove build link
- rm "$modulesdir"/build
+ cd ../zfs-${_zver}
+
+ ZSTD_CLEVEL=19 make DESTDIR="$pkgdir" INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
+ DEPMOD=/doesnt/exist install # Suppress depmod
+ # Remove src dir
+ rm -r "${pkgdir}"/usr/src
+
+ # zfs install removes these files
+ cd ../$_srcname
+ install -Dt "$modulesdir" -m644 modules.builtin modules.builtin.modinfo modules.order
+
+ # remove build and source links
+ rm "$modulesdir"/{build,source}
}
_package-headers() {
@@ -233,6 +239,12 @@ _package-headers() {
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
+
+ cd ../zfs-${_zver}
+ make DESTDIR="${pkgdir}" DEPMOD=/doesnt/exist install # Suppress depmod
+ rm -r "${pkgdir}/lib"
+ # Remove reference to ${srcdir}
+ sed -i "s+${srcdir}++" ${pkgdir}/usr/src/zfs-*/$(<../${_srcname}/version)/Module.symvers
}
_package-docs() {