void-packages/srcpkgs/nfs-utils/template

71 lines
1.9 KiB
Bash

# Template file for 'nfs-utils'
pkgname=nfs-utils
version=1.3.4
revision=2
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
--with-statedir=/var/lib/nfs --enable-libmount-mount --enable-gss
--enable-uuid --enable-ipv6 --without-tcp-wrappers
--with-tirpcinclude=$XBPS_CROSS_BASE/usr/include/tirpc
--with-krb5=$XBPS_CROSS_BASE"
short_desc="Network File System utilities"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://nfs.sourceforge.net"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
checksum=b42a5bc0a8d80d04650030ceb9a11f08f4acfbcb1ee297f657fb94e339c45975
hostmakedepends="pkg-config libtirpc-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
libnfsidmap-devel keyutils-devel libevent-devel mit-krb5-devel
libevent-devel device-mapper-devel libcap-devel sqlite-devel"
depends="rpcbind"
conf_files="/etc/exports /etc/idmapd.conf"
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
"
pre_build() {
if [ "$CROSS_BUILD" ]; then
sed -i '/SUBDIRS/s,tools,,' Makefile.in
fi
case "$XBPS_TARGET_MACHINE" in
*-musl)
cd tools/rpcgen
make CC=cc CFLAGS= CPPFLAGS= LDFLAGS= ${makejobs}
;;
esac
}
post_install() {
mv ${DESTDIR}/sbin/* ${DESTDIR}/usr/bin
# conffiles
vconf ${FILESDIR}/exports
vconf ${FILESDIR}/idmapd.conf
# runit services
vsv statd
vsv nfs-server
# replacement scripts
rm -rf ${DESTDIR}/usr/bin/start-statd
vbin ${FILESDIR}/start-statd
rm -rf ${DESTDIR}/var/lib/nfs
}
rpcgen_package() {
build_style=meta
short_desc="A RPC protocol compiler"
pkg_install() {
case "$XBPS_TARGET_MACHINE" in
*-musl)
cd ${wrksrc}/tools/rpcgen
make clean
make CC_FOR_BUILD="$CC"
vbin ${wrksrc}/tools/rpcgen/rpcgen
;;
esac
}
}