initial import
This commit is contained in:
67
fuse3/PKGBUILD
Normal file
67
fuse3/PKGBUILD
Normal file
@@ -0,0 +1,67 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgbase=fuse3
|
||||
pkgname=(fuse-common fuse3)
|
||||
pkgver=3.10.3
|
||||
pkgrel=3
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://github.com/libfuse/libfuse'
|
||||
license=('GPL-2' 'LGPL-2.1')
|
||||
makedepends=('pkg-config' 'meson' 'eudev')
|
||||
options=(!emptydirs)
|
||||
source=(https://github.com/libfuse/libfuse/releases/download/fuse-$pkgver/fuse-$pkgver.tar.xz
|
||||
fuse.initd)
|
||||
sha512sums=('7329dd26284a15309eafc2b8b3f29ed431a5ce9c927c5965a51c270718f4915c318b84e4cf4e7f7ee1913831ce943a2e1a378d0bd2a1215eba7b9bc65efb7942'
|
||||
'7f6a503ef23cfa8b809c544375c2d83ad56525269b48ad1a7dff0ce36f4bf2f2a3fafed9dc70a71ff6281b261db5f01829e16c06f041921a5d8c8d715a04a8c1')
|
||||
|
||||
build() {
|
||||
cd fuse-$pkgver
|
||||
|
||||
rm -rf build
|
||||
meson --prefix=/usr --sbindir=sbin -D examples=false . build
|
||||
cd build
|
||||
ninja
|
||||
}
|
||||
|
||||
package_fuse-common() {
|
||||
pkgdesc="Common files for fuse2/3 packages"
|
||||
backup=(etc/fuse.conf)
|
||||
license=('GPL-2')
|
||||
|
||||
cd fuse-$pkgver
|
||||
install -Dm644 GPL2.txt ${pkgdir}/usr/share/licenses/${pkgname}/GPL2.txt
|
||||
|
||||
install -Dm644 util/fuse.conf ${pkgdir}/etc/fuse.conf
|
||||
|
||||
# OpenRC
|
||||
install -Dm755 ${srcdir}/fuse.initd ${pkgdir}/etc/init.d/fuse
|
||||
}
|
||||
|
||||
package_fuse3() {
|
||||
pkgdesc="A library that makes it possible to implement a filesystem in a userspace program."
|
||||
depends=('fuse-common' 'glibc')
|
||||
|
||||
cd fuse-$pkgver/build
|
||||
|
||||
DESTDIR="${pkgdir}" ninja install
|
||||
|
||||
rm -r "${pkgdir}"/etc/init.d
|
||||
rm -r "${pkgdir}"/etc/fuse.conf
|
||||
|
||||
for i in GPL2.txt LGPL2.txt LICENSE; do
|
||||
install -Dm644 ../$i ${pkgdir}/usr/share/licenses/${pkgname}/$i
|
||||
done
|
||||
|
||||
# move binaries to / for FHS compliance
|
||||
for i in bin sbin; do
|
||||
mv ${pkgdir}/usr/$i ${pkgdir}
|
||||
done
|
||||
|
||||
# move libraries to /lib for FHS compliance
|
||||
install -d -m755 ${pkgdir}/lib
|
||||
mv ${pkgdir}/usr/lib/libfuse3.so.${pkgver::1}* ${pkgdir}/lib
|
||||
ln -sf ../../lib/libfuse3.so.${pkgver::1} ${pkgdir}/usr/lib/libfuse3.so
|
||||
|
||||
# static device nodes are handled by eudev
|
||||
rm -r "${pkgdir}"/dev
|
||||
}
|
||||
35
fuse3/fuse.initd
Normal file
35
fuse3/fuse.initd
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
MOUNTPOINT=/sys/fs/fuse/connections
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
ebegin "Starting fuse"
|
||||
if ! grep -qw fuse /proc/filesystems; then
|
||||
modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
|
||||
fi
|
||||
if grep -qw fusectl /proc/filesystems && \
|
||||
! grep -qw $MOUNTPOINT /proc/mounts; then
|
||||
mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \
|
||||
eerror $? "Error mounting control filesystem"
|
||||
fi
|
||||
eend ${?}
|
||||
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
ebegin "Stopping fuse"
|
||||
if grep -qw $MOUNTPOINT /proc/mounts; then
|
||||
umount $MOUNTPOINT >/dev/null 2>&1 || \
|
||||
eerror $? "Error unmounting control filesystem"
|
||||
fi
|
||||
eend ${?}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user