summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b28cf50863d7f955a8169c3467f1905cffe0d406 (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
# Maintainer: Stefan Göbel < snot ʇɐ subtype ˙ de >

pkgname='snot'
_reltag='0.3-pie'
pkgver='0.3'
pkgrel='1'
pkgdesc='Basic Btrfs snapshot tool.'
arch=('x86_64' 'i686')
url='https://gitlab.com/goeb/snot'
license=('GPL3')
depends=('btrfs-progs')
makedepends=('git' 'go' 'python-docutils')
source=("$pkgname::git+https://gitlab.com/goeb/$pkgname.git#tag=$_reltag")
sha256sums=('SKIP')
backup=(
   'etc/pacman.d/hooks/snot.hook'
   'etc/snot/create.conf'
   'etc/snot/create.init'
   'etc/snot/delete.conf'
   'etc/snot/delete.init'
   'etc/snot/list.conf'
   'etc/snot/list.init'
   'etc/snot/restore.conf'
   'etc/snot/restore.init'
)

build() {

   export GOCACHE="$srcdir/.gocache"
   export CGO_CPPFLAGS="${CPPFLAGS}"
   export CGO_CFLAGS="${CFLAGS}"
   export CGO_CXXFLAGS="${CXXFLAGS}"
   export CGO_LDFLAGS="$LDFLAGS"
   export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"

   cd "$pkgname"

   make
   make docs

}

check() {

   cd "$pkgname"

   make testall

}

package() {

   cd "$pkgname"

   make DESTDIR="$pkgdir/" PREFIX="/usr" install
   make DESTDIR="$pkgdir/" PREFIX="/usr" docs-install
   make DESTDIR="$pkgdir/" PREFIX="/usr" arch-install

}

# :indentSize=3:tabSize=3:noTabs=true:mode=shellscript:maxLineLen=78: ########