summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f098bed5c806f9878ca4c894f01fcd3e520bce96 (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
# Maintainer: rany <ranygh at riseup dot net>

pkgname=popura
_pkgname="popura"
pkgver=0.4.0+popura2
_commit=35020b0391790d16ca64117031349e6ddefaf1ec
pkgrel=1
pkgdesc="Popura ポプラ: alternative Yggdrasil network client"
arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64')
url="https://github.com/popura-network/Popura"
license=('LGPLv3')
conflicts=('popura' 'yggdrasil' 'yggdrasil-git' 'yggdrasil' 'yggdrasil-openrc')
depends=('glibc')
makedepends=('git' 'go')
source=("popura::git+https://github.com/popura-network/Popura.git#commit=${_commit}"
	'popura.sysusers')
sha512sums=('SKIP'
	'b78d1f5efeeba184588ba7bdb2249d976aec160daa59742e032983da1aedad062d15c7c97cba3eba69412a0f7904ee123d98b58f859892d71188c25624295c32')

build() {
	cd "${srcdir}/${_pkgname}"
	PKGNAME="${pkgname}" PKGVER="${pkgver}" \
		CGO_LDFLAGS="${LDFLAGS}" \
		GOFLAGS="-trimpath -buildmode=pie -mod=readonly" \
		./build -l "-linkmode external -extldflags \"${LDFLAGS}\""
}

package() {
	cd "${srcdir}/${_pkgname}"
	install -Dm755 "yggdrasil" "${pkgdir}/usr/bin/yggdrasil"
	install -Dm755 "yggdrasilctl" "${pkgdir}/usr/bin/yggdrasilctl"
	install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}"
	install -Dm644 "${srcdir}/popura.sysusers" "${pkgdir}/usr/lib/sysusers.d/popura.conf"
	install -Dm644 -t "${pkgdir}/usr/lib/systemd/system" \
		contrib/systemd/yggdrasil.service \
		contrib/systemd/yggdrasil-default-config.service
}