blob: c7d1d789153aa8594d601bd2b865a63b445ff749 (
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
|
# Maintainer: Yufan You <ouuansteve at gmail>
# Contributor: Nick Cao <nickcao@nichi.co>
pkgname=auth-thu
pkgver=2.3.4
pkgrel=1
pkgdesc='A commandline Tunet (auth4/6.tsinghua.edu.cn, Tsinghua-IPv4) authentication tool'
arch=('x86_64')
url='https://github.com/z4yx/GoAuthing'
license=('GPL-3.0-only')
makedepends=('go')
source=("$url/archive/v$pkgver.tar.gz")
sha256sums=('c3746785542cbebeb51f81e33d1257dc9ccc365822c5b9ec982951098602c91f')
build() {
cd "GoAuthing-$pkgver"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -o auth-thu ./cli
}
package() {
cd "GoAuthing-$pkgver"
install -Dm755 auth-thu -t "$pkgdir/usr/bin"
cd "docs/systemd"
sed -i "s|/usr/local/bin/auth-thu|/usr/bin/auth-thu|g" ./*/*.service
install -Dm644 user/*.service -t "$pkgdir/usr/lib/systemd/user"
install -Dm644 system/*.service -t "$pkgdir/usr/lib/systemd/system"
}
|