void-packages/srcpkgs/nfs-utils/template
2020-07-20 13:56:21 -04:00

85 lines
2.3 KiB
Bash

# Template file for 'nfs-utils'
pkgname=nfs-utils
version=2.5.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"
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=0f1c8170e16a07d9836bbf0836d48d0c842b6f0e0e8b18748f099751851d30c4
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
}
}