Last active
March 19, 2022 00:00
-
-
Save comicchang/898c1c697d89c24434e5eb5443e2be91 to your computer and use it in GitHub Desktop.
zfs-dkms-2.1.3-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b4a2c0b184c9c9599421b15a430fb88deb5dbd17 Mon Sep 17 00:00:00 2001 | |
From: Eli Schwartz <eschwartz@archlinux.org> | |
Date: Sun, 28 Oct 2018 15:01:58 -0400 | |
Subject: [PATCH] only build the module in dkms.conf | |
--- | |
scripts/dkms.mkconf | 19 ++----------------- | |
1 file changed, 2 insertions(+), 17 deletions(-) | |
diff --git a/scripts/dkms.mkconf b/scripts/dkms.mkconf | |
index 88c289383..5a859a0e0 100755 | |
--- a/scripts/dkms.mkconf | |
+++ b/scripts/dkms.mkconf | |
@@ -28,14 +28,7 @@ PACKAGE_CONFIG="${pkgcfg}" | |
PRE_BUILD="configure | |
--prefix=/usr | |
--with-config=kernel | |
- --with-linux=\$( | |
- if [ -e "\${kernel_source_dir/%build/source}" ] | |
- then | |
- echo "\${kernel_source_dir/%build/source}" | |
- else | |
- echo "\${kernel_source_dir}" | |
- fi | |
- ) | |
+ --with-linux="\${kernel_source_dir}" | |
--with-linux-obj="\${kernel_source_dir}" | |
\$( | |
[[ -n \"\${ICP_ROOT}\" ]] && \\ | |
@@ -69,7 +54,7 @@ POST_BUILD="scripts/dkms.postbuild | |
" | |
AUTOINSTALL="yes" | |
REMAKE_INITRD="no" | |
-MAKE[0]="make" | |
+MAKE[0]="make -C module/" | |
STRIP[0]="\$( | |
[[ -r \${PACKAGE_CONFIG} ]] \\ | |
&& source \${PACKAGE_CONFIG} \\ | |
-- | |
2.19.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Eli Schwartz <eschwartz@archlinux.org> | |
# Contributor: Iacopo Isimbaldi <isiachi@rhye.it> | |
# All my PKGBUILDs are managed at https://github.com/eli-schwartz/pkgbuilds | |
pkgname=zfs-dkms | |
pkgver=2.1.3 | |
pkgrel=2 | |
pkgdesc="Kernel modules for the Zettabyte File System." | |
arch=('any') | |
url="https://zfsonlinux.org/" | |
license=('CDDL') | |
conflicts=('spl-dkms') | |
provides=("ZFS-MODULE=${pkgver}" "SPL-MODULE=${pkgver}" 'spl-dkms') | |
# ambiguous, provided for backwards compat, pls don't use | |
provides+=('zfs') | |
replaces=('spl-dkms') | |
source=("https://github.com/zfsonlinux/zfs/releases/download/zfs-${pkgver}/zfs-${pkgver}.tar.gz"{,.asc} | |
"0001-only-build-the-module-in-dkms.conf.patch" | |
"https://github.com/openzfs/zfs/pull/13234.patch") | |
sha256sums=('b61b644547793f409cafd6538a52d78f2f72b0cd013e88340882457c8c9b43fd' | |
'SKIP' | |
'd964e11018992a2acd98e263244efdbfe4367d26ad15f4728848261d3c6e227a' | |
'e6d43b1bfa1bccdbba7cd3f697c1207920b875f7a58e4137f69a554065f7082e') | |
b2sums=('b4fc59ae97c74661f1303e4ce6efd5304842d382e278633debc4475c32074b9d272379d5d4caf8155f7a8cb1cb2b871b8c61fc36e14a612220757c5703a4c50b' | |
'SKIP' | |
'0e91cd2421b81c8ee517503059fb9ebc20e7c150801851cff2ffdfb64cbcd9a4e0657e7678c412a334fc37b589006ec78dca2ccc091b034a83a00966acba6f5b' | |
'19558246d3e75874e6173c0c052a2a253508cfb6e64e55f88298dfd469302983718c03927ccb53b16fe87b4d77597d3677e2a05629e5347861d13e3fa3ad8805') | |
validpgpkeys=('4F3BA9AB6D1F8D683DC2DFB56AD860EED4598027' # Tony Hutter (GPG key for signing ZFS releases) <hutter2@llnl.gov> | |
'C33DF142657ED1F7C328A2960AB9E991C6AF658B') # Brian Behlendorf <behlendorf1@llnl.gov> | |
prepare() { | |
cd "${srcdir}"/${pkgname%-dkms}-${pkgver} | |
patch -p1 -i ../0001-only-build-the-module-in-dkms.conf.patch | |
# apply pr_13234 for tag-2.1.3 | |
patch -p1 -i ../13234.patch | |
# remove unneeded sections from module build | |
sed -ri "/AC_CONFIG_FILES/,/]\)/{ | |
/AC_CONFIG_FILES/n | |
/]\)/n | |
/^\s*(module\/.*|${pkgname%-dkms}.release|Makefile)/!d | |
}" configure.ac | |
autoreconf -fi | |
} | |
build() { | |
cd "${srcdir}"/${pkgname%-dkms}-${pkgver} | |
./scripts/dkms.mkconf -n ${pkgname%-dkms} -v ${pkgver} -f dkms.conf | |
} | |
package() { | |
depends=("zfs-utils=${pkgver}" 'dkms') | |
cd "${srcdir}"/${pkgname%-dkms}-${pkgver} | |
dkmsdir="${pkgdir}/usr/src/${pkgname%-dkms}-${pkgver}" | |
install -d "${dkmsdir}"/{config,scripts} | |
cp -a configure dkms.conf Makefile.in META ${pkgname%-dkms}_config.h.in ${pkgname%-dkms}.release.in include/ module/ "${dkmsdir}"/ | |
cp config/compile config/config.* config/missing config/*sh "${dkmsdir}"/config/ | |
cp scripts/enum-extract.pl scripts/dkms.postbuild "${dkmsdir}"/scripts/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment