void-packages/srcpkgs/nfs-utils/template

86 lines
2.3 KiB
Bash

# Template file for 'nfs-utils'
pkgname=nfs-utils
version=2.7.1
revision=1
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 --enable-junction"
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=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
libxml2-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
}
}