summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD89
1 files changed, 57 insertions, 32 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 492e49668aa8..4fa3a2817185 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,66 @@
-# Maintainer: Jan Houben <jan@nexttrex.de>
-# Contributor: Jesus Alvarez <jeezusjr at gmail dot com>
-#
-# This PKGBUILD was generated by the archzfs build scripts located at
-#
-# http://github.com/archzfs/archzfs
-#
-pkgname="zfs-dkms-git"
-_commit='0929c4de398606f8305057ca540cf577e6771c30'
-pkgdesc="Kernel modules for the Zettabyte File System."
+# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
+# Contributor: Iacopo Isimbaldi <isiachi@rhye.it>
-pkgver=2020.03.31.r5836.g0929c4de3
+pkgname=zfs-dkms-git
+pkgver=0.8.0.r709.g5a42ef04f
pkgrel=1
-makedepends=("git")
-arch=("x86_64")
+epoch=1
+pkgdesc="Kernel modules for the Zettabyte File System."
+arch=('any')
url="https://zfsonlinux.org/"
-source=("git+https://github.com/zfsonlinux/zfs.git#commit=${_commit}"
- "linux-5.5-compat-blkg_tryget.patch")
-sha256sums=("SKIP"
- "daae58460243c45c2c7505b1d88dcb299ea7d92bcf3f41d2d30bc213000bb1da")
-license=("CDDL")
-depends=("zfs-utils-git=${pkgver}" "lsb-release" "dkms")
-provides=("zfs" "zfs-headers" "spl" "spl-headers")
-groups=("archzfs-dkms-git")
-conflicts=("zfs" "zfs-headers" "spl" "spl-headers")
-replaces=("spl-dkms-git")
+license=('CDDL')
+makedepends=('git')
+conflicts=("${pkgname%-git}" 'spl-dkms')
+provides=("ZFS-MODULE=${pkgver}" "SPL-MODULE=${pkgver}" "${pkgname%-git}=${pkgver}" 'spl-dkms')
+# ambiguous, provided for backwards compat, pls don't use
+provides+=('zfs')
+replaces=('spl-dkms-git')
+source=("git+https://github.com/zfsonlinux/zfs.git"
+ "0001-only-build-the-module-in-dkms.conf.patch")
+sha256sums=('SKIP'
+ '780e590383fb00389c5e02ac15709b7a476d9e07d3c4935ed9eb67c951a88409')
+b2sums=('SKIP'
+ '1fdae935043d979b9241f07f8baa25a9a0367c24c31c84a59dfe8d6b468a523d8f49b68da3c7fd3194db6638f9d7bef046fc5e2669ce25d73c65009c16bf6c50')
+
+pkgver() {
+ cd "${srcdir}"/zfs
+
+ git describe --long | sed 's/^zfs-//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${srcdir}"/zfs
+
+ patch -p1 -i ../0001-only-build-the-module-in-dkms.conf.patch
+
+ # remove unneeded sections from module build
+ sed -ri "/AC_CONFIG_FILES/,/]\)/{
+/AC_CONFIG_FILES/n
+/]\)/n
+/^\s*(module\/.*)?(zfs.release|Makefile)/!d
+}" configure.ac
+
+ autoreconf -fi
+}
build() {
- cd "${srcdir}/zfs"
- ./autogen.sh
+ cd "${srcdir}"/zfs
+
+ ./scripts/dkms.mkconf -n zfs -v ${pkgver} -f dkms.conf
+ # update metadata
+ ./scripts/make_gitrev.sh
+ _meta_release=${pkgver#*.r}
+ sed -i -e "s/Release:[[:print:]]*/Release: ${_meta_release/./_}/" META
}
package() {
- dkmsdir="${pkgdir}/usr/src/zfs-git"
- install -d "${dkmsdir}"
- cp -a ${srcdir}/zfs/. ${dkmsdir}
- cd "${dkmsdir}"
- find . -name ".git*" -print0 | xargs -0 rm -fr --
- scripts/dkms.mkconf -v git -f dkms.conf -n zfs
- chmod g-w,o-w -R .
+ depends=("zfs-utils-git=${epoch}:${pkgver}" 'dkms')
+
+ cd "${srcdir}"/zfs
+
+ dkmsdir="${pkgdir}/usr/src/zfs-${pkgver}"
+ install -d "${dkmsdir}"/{config,scripts}
+ cp -a configure dkms.conf Makefile.in META zfs_config.h.in zfs.release.in include/ module/ "${dkmsdir}"/
+ cp config/config.* config/missing config/*sh "${dkmsdir}"/config/
+ cp scripts/enum-extract.pl scripts/dkms.postbuild "${dkmsdir}"/scripts/
}