96 lines
2.9 KiB
Bash
96 lines
2.9 KiB
Bash
# Template file for 'zfs-lts'
|
|
pkgname=zfs-lts
|
|
version=2.1.15
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--with-config=user --with-mounthelperdir=/usr/bin
|
|
--with-udevdir=/usr/lib/udev --with-udevruledir=/usr/lib/udev/rules.d
|
|
--with-dracutdir=/usr/lib/dracut --with-tirpc"
|
|
hostmakedepends="dracut libtool pkg-config python3 automake"
|
|
makedepends="pam-devel zlib-devel libuuid-devel libblkid-devel libtirpc-devel attr-devel"
|
|
depends="dkms>=2.2.0.3_9 perl python3 xbps-triggers>=0.121_1
|
|
libzfs-lts>=${version}_${revision}"
|
|
conf_files="/etc/zfs/zed.d/zed.rc"
|
|
short_desc="Z File System -- userland, pyzfs, and kernel modules (using DKMS)"
|
|
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
|
|
license="CDDL-1.0"
|
|
homepage="https://openzfs.github.io/openzfs-docs/"
|
|
distfiles="https://github.com/openzfs/zfs/releases/download/zfs-${version}/zfs-${version}.tar.gz"
|
|
checksum=374f92fde42600103ba4d184cb4841d648b8849320b504d10690f17e30e51ad3
|
|
# dkms must be before initramfs-regenerate to build modules before images
|
|
triggers="dkms initramfs-regenerate"
|
|
dkms_modules="zfs ${version}"
|
|
|
|
provides="zfs-${version}_${revision}"
|
|
replaces="spl<=0.7.13_1 zfs>=0" # Because SPL was merged into zfs in 0.8.0
|
|
|
|
pre_configure() {
|
|
export CFLAGS+=" -I${XBPS_CROSS_BASE}/usr/include/tirpc/"
|
|
autoreconf -fi
|
|
}
|
|
|
|
post_install() {
|
|
vlicense COPYRIGHT
|
|
vlicense LICENSE
|
|
vlicense NOTICE
|
|
|
|
vsv zed
|
|
|
|
make dist-gzip
|
|
vmkdir usr/src/
|
|
tar xf ${pkgname/%-lts}-${version}.tar.gz -C ${DESTDIR}/usr/src/
|
|
scripts/dkms.mkconf -v ${version} -f ${DESTDIR}/usr/src/${pkgname/%-lts}-${version}/dkms.conf -n zfs
|
|
|
|
# Remove init and service control pieces not used in Void
|
|
rm -rf ${DESTDIR}/usr/lib/systemd
|
|
rm -rf ${DESTDIR}/etc/init.d
|
|
rm -rf ${DESTDIR}/etc/default
|
|
rm -f ${DESTDIR}/etc/zfs/zfs-functions
|
|
|
|
# Remove pam config framework file not used in Void
|
|
rm -f ${DESTDIR}/usr/share/pam-configs/zfs_key
|
|
|
|
# zfs-mount-generator is a systemd helper, no need for its man page
|
|
rm -f ${DESTDIR}/usr/share/man/man8/zfs-mount-generator.8
|
|
|
|
# Contains ELF binaries. Remove it until upstream has a way to move this
|
|
# into /usr/libexec or similiar.
|
|
rm -rf ${DESTDIR}/usr/share/zfs/zfs-tests
|
|
}
|
|
|
|
libzfs-lts_package() {
|
|
short_desc="Z File System - libraries"
|
|
provides="libzfs-${version}_${revision}"
|
|
replaces="libzfs>=0"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
|
|
zfs-lts-devel_package() {
|
|
depends="libzfs>=${version}_${revision}"
|
|
short_desc="Z File System -- development files"
|
|
provides="zfs-devel-${version}_${revision}"
|
|
replaces="zfs-devel>=0"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|
|
|
|
zfs-lts-pam_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc="Z File System -- PAM integration"
|
|
provides="zfs-pam-${version}_${revision}"
|
|
replaces="zfs-pam>=0"
|
|
pkg_install() {
|
|
vmove usr/lib/security/pam_zfs_key.so
|
|
}
|
|
}
|
|
|
|
# REMARKS:
|
|
# Did not split out pyzfs, because it's distributed with zfs, and no reason to
|
|
# send separately.
|