diff options
author | Misaka13514 | 2023-01-22 21:13:35 +0800 |
---|---|---|
committer | Misaka13514 | 2023-01-22 21:13:35 +0800 |
commit | c3066679e21d3937ff638dd26b682d50fae74e4d (patch) | |
tree | 96cadd2617c03f99dbccf8875eb6efe388729dce | |
download | aur-c3066679e21d3937ff638dd26b682d50fae74e4d.tar.gz |
Add easierconnect-git TestBuild8.r1.262fd42
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 46 |
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..920cea89ee1b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = easierconnect-git + pkgdesc = Sangfor EasyConnect protocol reimplementation in Go + pkgver = TestBuild8.r1.262fd42 + pkgrel = 1 + url = https://github.com/lyc8503/EasierConnect + arch = x86_64 + arch = aarch64 + license = AGPL3 + makedepends = git + makedepends = go + depends = glibc + provides = _pkgname + conflicts = _pkgname + source = easierconnect::git+https://github.com/lyc8503/EasierConnect.git + sha256sums = SKIP + +pkgname = easierconnect-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a7f83a8326e8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Misaka13514 <Misaka13514 at gmail dot com> +pkgname=easierconnect-git +_pkgname=${pkgname%-git} +pkgver=TestBuild8.r1.262fd42 +pkgrel=1 +pkgdesc="Sangfor EasyConnect protocol reimplementation in Go" +arch=('x86_64' 'aarch64') +url="https://github.com/lyc8503/EasierConnect" +license=('AGPL3') +depends=('glibc') +makedepends=('git' 'go') +provides=(_pkgname) +conflicts=(_pkgname) +source=(${_pkgname}::git+${url}.git) +sha256sums=('SKIP') + +pkgver() { + cd "$_pkgname" + printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')" +} + +prepare() { + cd "$_pkgname" + mkdir -p build/ +} + +build() { + cd "$_pkgname" + 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 build . +} + +check() { + cd "$_pkgname" + go test ./... +} + +package() { + cd "$_pkgname" + install -Dm755 build/EasierConnect "$pkgdir/usr/bin/$_pkgname" + install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md +} |