### this file is sourced not run
PKGVER=3.1.1 # latest autoconf version that don't depend on meson
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS 8.1
TARBALL=fuse-$PKGVER.tar.gz
MD5SUM=20b10f24b825062c1db9a21a35157f97
SRC_URL=https://github.com/libfuse/libfuse/releases/download/fuse-$PKGVER/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="libfuse3: libfuse3 $PKGVER (Filesystem in Userspace core library)  
libfuse3:  
libfuse3: FUSE (Filesystem in Userspace) is a simple interface for userspace 
libfuse3: programs to export a virtual filesystem to the Linux kernel. Fuse 
libfuse3: also aims to provide a secure method for non privileged users to 
libfuse3: create and mount their own filesystem implementations.  
libfuse3: 
libfuse3: 
libfuse3: 
libfuse3: 
libfuse3:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static --exec-prefix=/ \
		INIT_D_PATH=/tmp/init.d \
		--disable-mtab"
	pkg_build_autoconf &&
	
	# relocate from /usr/$LIBDIR to /$LIBDIR
	mv -v   /usr/$LIBDIR/libfuse3.so.* /$LIBDIR &&
	ln -sfv ../../$LIBDIR/libfuse3.so.$PKGVER /usr/$LIBDIR/libfuse3.so &&
	rm -rf  /tmp/init.d &&

	install -v -m755 -d /usr/share/doc/fuse-$PKGVER &&
	install -v -m644    doc/{README.NFS,kernel.txt} \
                    /usr/share/doc/fuse-$PKGVER &&
    cp -R doc/html /usr/share/doc/fuse-$PKGVER &&

    # additional relocations
    mv /usr/share/man/man8/mount.fuse.8 /usr/share/man/man8/mount.fuse3.8 &&
	mv /usr/lib64/udev/rules.d/* /lib64/udev/rules.d && rm -r /usr/lib64/udev &&
    
	pkg_build_slackdesc &&
	
	# default config - override in fatdog-scripts
	cat > /etc/fuse.conf << "EOF"
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
#user_allow_other
EOF

}


