summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fc40ed5bf0ff4f0740b4a63c531434376ab6cbd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=fuse3-git
pkgver=3.17.4.r198.g382b17dd
pkgrel=1
pkgdesc="The reference implementation of the Linux FUSE (Filesystem in userspace) interface"
arch=('i686' 'x86_64')
url="https://github.com/libfuse/libfuse"
license=('GPL-2.0-or-later' 'LGPL-2.1-or-later')
depends=('glibc')
makedepends=('git' 'meson' 'pkgconf' 'udev')
provides=("fuse3=$pkgver" 'fuse-common')
conflicts=('fuse3' 'fuse-common')
options=('staticlibs')
backup=('etc/fuse.conf')
source=("git+https://github.com/libfuse/libfuse.git")
sha256sums=('SKIP')


pkgver() {
  cd "libfuse"

  _tag=$(git tag -l --sort -v:refname | grep -E '^fuse-[0-9\.]+$' | head -n1)
  _rev=$(git rev-list --count $_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^fuse-//'
}

build() {
  cd "libfuse"

  meson setup \
    --buildtype=plain \
    --prefix="/usr" \
    --sbindir="bin" \
    --default-library both \
    "_build"
  meson compile -C "_build"
}

package() {
  cd "libfuse"

  meson install -C "_build" --destdir "$pkgdir"
  install -Dm644 "util/fuse.conf" -t "$pkgdir/etc"

  # static device nodes are handled by udev
  rm -r "$pkgdir/dev"

  # Remove init script in wrong path
  rm -r "$pkgdir/etc/init.d"
}