Date: Wednesday, February 8, 2023 @ 17:43:22
Author: felixonmars
Revision: 1396236
upgpkg: kcptun 20230207-1
Modified:
kcptun/trunk/PKGBUILD
----------+
PKGBUILD | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2023-02-08 17:42:54 UTC (rev 1396235)
+++ PKGBUILD 2023-02-08 17:43:22 UTC (rev 1396236)
@@ -2,7 +2,8 @@
# Contributor: Kasei Wang <cnsdwpc at gmail.com>
pkgname=kcptun
-pkgver=20221015
+pkgver=20230207
+_commit=86f2e5b066adec276e4bd72257b581ca95d64202
pkgrel=1
pkgdesc="A Secure Tunnel Based On KCP with N:M Multiplexing"
arch=('x86_64')
@@ -11,14 +12,14 @@
depends=('glibc')
makedepends=('go' 'git')
options=('!lto')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/xtaci/kcptun/archive/v$pkgver.tar.gz"
+source=("git+https://github.com/xtaci/kcptun.git#commit=$_commit"
'[email protected]' '[email protected]')
-sha512sums=('04a23acd033f3a05abadae1dadd80199a01860e83a7858ac1c6796f3d01ed8e0da1ccfe3408d9de499aecaa76849019c8ecfb1d2300df5edc66968df811ea508'
+sha512sums=('SKIP'
'f6041eae26db4f11bf6dc22443548354114b8b5a2a436949513a168d5b271707e680dd1d6bdcfc4385945ae2cb1bc82736e605ca49c6c94904922b43d1917a5c'
'88607e7c6cba7628bf2c9229396fcf285227c56d2fd208f3d0200fb670f8919939ef05aa5e87fc3aceedb4f41e5bca597138c88930a23dbe4b03e22b42d64cec')
prepare() {
- cd kcptun-$pkgver
+ cd kcptun
mkdir -p .gopath/src/github.com/xtaci
ln -sf "$PWD" .gopath/src/github.com/xtaci/kcptun
@@ -32,22 +33,22 @@
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
- cd "$srcdir"/kcptun-$pkgver/client
+ cd "$srcdir"/kcptun/client
go build -o build/kcptun-client -ldflags "-X main.VERSION=$pkgver
-extldflags=${LDFLAGS}" # -gccgoflags "$CFLAGS $LDFLAGS"
- cd "$srcdir"/kcptun-$pkgver/server
+ cd "$srcdir"/kcptun/server
go build -o build/kcptun-server -ldflags "-X main.VERSION=$pkgver
-extldflags=${LDFLAGS}" # -gccgoflags "$CFLAGS $LDFLAGS"
}
package() {
- cd kcptun-$pkgver
+ cd kcptun
- install -Dm755 client/build/kcptun-client "$pkgdir"/usr/bin/kcptun-client
- install -Dm755 server/build/kcptun-server "$pkgdir"/usr/bin/kcptun-server
+ install -Dm755 client/build/kcptun-client -t "$pkgdir"/usr/bin/
+ install -Dm755 server/build/kcptun-server -t "$pkgdir"/usr/bin/
- install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
+ install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/
install -dm755 "$pkgdir"/etc/kcptun
- install -Dm644 "$srcdir/[email protected]"
"$pkgdir"/usr/lib/systemd/system/[email protected]
- install -Dm644 "$srcdir/[email protected]"
"$pkgdir"/usr/lib/systemd/system/[email protected]
+ install -Dm644 "$srcdir"/[email protected] -t "$pkgdir"/usr/lib/systemd/system/
+ install -Dm644 "$srcdir"/[email protected] -t
"$pkgdir"/usr/lib/systemd/system/
}