void-packages/srcpkgs/nfs-utils/template

85 lines
2.3 KiB
Bash

# Template file for 'nfs-utils'
pkgname=nfs-utils
version=2.4.3
revision=2
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
--with-statedir=/var/lib/nfs --enable-libmount-mount --enable-svcgss
--enable-uuid --enable-ipv6 --without-tcp-wrappers
--with-tirpcinclude=$XBPS_CROSS_BASE/usr/include/tirpc
--with-krb5=$XBPS_CROSS_BASE --disable-static"
short_desc="Network File System utilities"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
checksum=af65fce5dd8370cff9ead67baac5a6cd69c376dcadfef264dc2c78c904f26599
patch_args="-Np1"
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
make_dirs="
/var/lib/nfs/rpc_pipefs 0755 root root
/var/lib/nfs/sm 0750 root root
/var/lib/nfs/v4recovery 0755 root root
/etc/exports.d 0750 root root
"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
fi
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl)
vsed -i -e 's/__res_querydomain/res_querydomain/g' configure*
;;
esac
}
post_install() {
mv ${DESTDIR}/sbin/* ${DESTDIR}/usr/bin
# conffiles
vconf ${FILESDIR}/exports
# runit services
vsv rpcblkmapd
vsv rpcgssd
vsv rpcsvcgssd
vsv statd
vsv nfs-server
# replacement scripts
rm -rf ${DESTDIR}/usr/bin/start-statd
vbin ${FILESDIR}/start-statd
rm -rf ${DESTDIR}/var/lib/nfs
}
libnfsidmap_package() {
short_desc="Library to help mapping IDs, mainly for NFSv4"
conf_files="/etc/idmapd.conf"
pkg_install() {
vsv rpcidmapd
vconf ${FILESDIR}/idmapd.conf
vmove usr/bin/rpc.idmapd
vmove usr/lib/libnfsidmap*
vmove usr/share/man/man5/idmapd.conf.5
vmove usr/share/man/man8/rpc.idmapd.8
vmove usr/share/man/man8/idmapd.8
}
}
libnfsidmap-devel_package() {
short_desc="Library to help mapping IDs, mainly for NFSv4 - development files"
depends="libnfsidmap-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/share/man/man3
}
}