# Maintainer: tarball 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" }