summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d28533b5fd7da6891f70aaa939a6a0d5b0cd9a15 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer:

_gitname="nullfs"
_pkgname="fuse-$_gitname"
pkgname="$_pkgname-git"
pkgver=r15.0884f87
pkgrel=1
pkgdesc="FUSE nullfs drivers"
arch=(x86_64)
url="https://github.com/xrgtn/nullfs"

# source contains GPL notices, but repo lacks full license file
license=('GPL')

depends=(
  'fuse2'
  'gcc-libs'
)
makedepends=(
  'fuse2'
  'git'
)

provides=(
  'fuse-nullfs'
  'nul1fs'
  'nullfs'
  'nulnfs'
)
conflicts=(
  'fuse-nullfs'
  'nul1fs'
  'nullfs'
  'nulnfs'
)

_pkgsrc="$_gitname"
source=(
  "$_pkgsrc"::"git+$url.git"
)
sha256sums=(
  'SKIP'
)

pkgver() {
  cd "$srcdir/$_pkgsrc"
  (
    set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' \
      || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
  cd "$srcdir/$_pkgsrc"

  make nul1fs
  make nulnfs
  g++ -lfuse -o nullfs nullfs.c++
}

package() {
  install -Dm755 "$srcdir/$_pkgsrc/nul1fs" \
    -t "$pkgdir/usr/bin/"

  install -Dm755 "$srcdir/$_pkgsrc/nulnfs" \
    -t "$pkgdir/usr/bin/"

  install -Dm755 "$srcdir/$_pkgsrc/nullfs" \
    -t "$pkgdir/usr/bin/"
}