blob: ae0c4b08de3cde097520e25cf04dd90001c7b987 (
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
|
# Maintainer: tarball <bootctl@gmail.com>
pkgname=wiretrustee
pkgver=0.5.1
pkgrel=1
pkgdesc='Connect your devices into a single secure private WireGuard®-based mesh network'
url='https://wiretrustee.com'
arch=(x86_64 aarch64 armv7h armv7l armv6h)
license=(BSD)
provides=("$pkgname")
conflicts=("$pkgname")
depends=(glibc)
makedepends=(go)
optdepends=()
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/refs/tags/v$pkgver.tar.gz"
'environment'
'wiretrustee@.service'
)
sha256sums=(
'4aa10123356aa1a89774fa571096fd594221ff8a236579b21035302bc1a24dc0'
'185d92f240e92c8d58dde91bb45d73d09ea22fc48090f30330596f12e6d265e7'
'672235231a73743878d77e94827c5aba326464dae63457f94cd51708ac84ba58'
)
prepare() {
cd "$srcdir/$pkgname-$pkgver"
mkdir -p build
go mod download
}
build() {
export GOFLAGS='-buildmode=pie -trimpath -mod=readonly -modcacherw'
cd "$srcdir/$pkgname-$pkgver"
go build \
-ldflags "-s -w -linkmode=external -extldflags \"$LDFLAGS\"" \
-o build/"$pkgname" \
client/main.go
}
package() {
_source="$srcdir/$pkgname-$pkgver"
# binary
install -Dm755 "$_source/build/$pkgname" "$pkgdir/usr/bin/$pkgname"
# config directory
install -Ddm755 -o root -g root "$pkgdir/etc/$pkgname"
# environment file
install -Dm644 environment "$pkgdir/etc/default/$pkgname"
# systemd unit
install -Dm644 "$pkgname@.service" \
"$pkgdir/usr/lib/systemd/system/$pkgname@.service"
# license
install -Dm644 "$_source/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|