### this file is sourced not run
PKGVER=2.6.2
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=nfs-utils-$PKGVER.tar.xz
MD5SUM=0961dc4777363b88f10305fc4957449f
SRC_URL=https://www.kernel.org/pub/linux/utils/nfs-utils/$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='libtirpc lvm2 libtcp_wrappers'
SLACKDESC="nfs-utils: nfs-utils $PKGVER (NFS Utilities)
nfs-utils: 
nfs-utils: The NFS Utilities package contains the userspace server and client 
nfs-utils: tools necessary to use the kernel's NFS abilities. NFS is a protocol 
nfs-utils: that allows sharing file systems over the network.
nfs-utils: 
nfs-utils: 
nfs-utils: 
nfs-utils: 
nfs-utils: 
nfs-utils: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	# make sure this is in-sync with actual Fatdog's values
	echo "nobody:x:65534:65534::/tmp:" >> /etc/passwd &&
	echo "nobody:x:65534:" >> /etc/group &&

	cd /tmp/nfs* &&
	# BLFS gcc 8.x fix
	#sed -i '/strict-prototypes/d' configure.ac &&
	#autoreconf -fiv &&

	sed -i -e '/udev_rulesdir/ s|/usr/lib|/etc|' tools/nfsrahead/Makefile.{am,in} &&
	CONFFLAGS="$CONFFLAGS          \
            --sbindir=/sbin        \
            --with-modprobedir=/etc/modprobe.d \
            --disable-nfsv4        \
            --with-rpcgen          \
            --without-systemd      \
            --disable-gss          \
			" &&
            #--without-tcp-wrappers # we use tcp_wrappers
            
    pkg_build_autoconf &&
    
	mv -v /sbin/start-statd /usr/sbin &&
	chmod u+w,go+r /sbin/mount.nfs    &&
	chown nobody:nobody /var/lib/nfs  &&

	# install sample conf
	install -m644 nfs.conf /etc &&

	pkg_build_slackdesc &&
	rm -f /etc/passwd /etc/group
}


