blob: 645988427c1dea037b45d1469383358aa22a8036 (
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
72
73
74
75
76
77
|
# Maintainer: Vianney Bouchaud <aur dot vianney at bouchaud dot org>
pkgname=plakar-git
_pkgname=plakar
pkgdesc="Backup for lazy^W smart engineers."
pkgver=1.0.0.beta.6.r1068.g59a7fb5b
pkgrel=1
arch=('x86_64' 'armv7l' 'armv7h' 'aarch64')
url="https://plakar.io/"
license=('ISC')
provides=('plakar')
conflicts=('plakar')
makedepends=(
'go'
)
pkgver() {
cd "$srcdir/$_pkgname"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
source=(
"$_pkgname::git+https://github.com/PlakarKorp/plakar#branch=main"
)
sha256sums=(
"SKIP"
)
_ensure_common_env() {
export GOPATH="$srcdir/gopath"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_ENABLED=1
}
prepare() {
_ensure_common_env
cd "$srcdir/$_pkgname"
go mod vendor \
-modcacherw
}
check() {
_ensure_common_env
cd "$srcdir/$_pkgname"
go test \
-mod=vendor \
./...
}
build() {
_ensure_common_env
cd "$srcdir/$_pkgname"
go build \
-trimpath \
-buildmode=pie \
-mod=vendor \
-ldflags "\
-linkmode=external \
-buildid=''
-extldflags \"${LDFLAGS}\"" \
-v .
}
package() {
install -D -m0755 "$srcdir/$_pkgname/plakar" "$pkgdir/usr/bin/plakar"
for command in $(find "$srcdir/$_pkgname" -name "*.1" -type f); do
install -D -m0644 "$command" "$pkgdir/usr/share/man/man1/$(basename $command)"
done
install -D -m0644 "$srcdir/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/plakar/LICENSE"
}
|