upgpkg: hide-client 0.9.9-2

switch to patch instead of sed
This commit is contained in:
2024-05-19 13:43:14 +02:00
parent d6f17ea108
commit 1b847bcf83
3 changed files with 59 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
pkgname=hide-client
_name=hide.client.linux
pkgver=0.9.9
pkgrel=1
pkgrel=2
pkgdesc='Hide.me CLI VPN client for Linux'
arch=(x86_64 aarch64 armv7h)
url='https://github.com/eventure/hide.client.linux'
@@ -12,21 +12,16 @@ license=(GPL-2.0-only)
depends=(glibc)
makedepends=(go)
backup=('etc/hide.me/config')
source=("$pkgname-$pkgver.zip::$url/archive/$pkgver.zip")
b2sums=('ca30b3442d9cee438c69719725f33d6702e82c252d5ee2130e984bc57f221edfa2dc943b07c6564f347cb4c618d0d5b0ab98851da31f8da0fe37e803f837c84b')
source=("$pkgname-$pkgver.zip::$url/archive/$pkgver.zip"
arch-config.patch)
b2sums=('ca30b3442d9cee438c69719725f33d6702e82c252d5ee2130e984bc57f221edfa2dc943b07c6564f347cb4c618d0d5b0ab98851da31f8da0fe37e803f837c84b'
'bcb78baaf6682803cddd29a770a229bf9baf79c26244759db7176b65ff3b0c82fc1561066fbd81a68dcd77911bad654827ac2fba19d1ced0d33718b8a9831ed3')
prepare() {
cd $_name-$pkgver
sed -e "s|CA.pem|/usr/share/hide.me/CA.pem|" \
-e "s|accessToken.txt|/etc/hide.me/accessToken.txt|" \
-i configuration.go
sed -e "s|/opt/hide.me/hide.me|/usr/bin/hide.me|" \
-e "s|WorkingDirectory=/opt/hide.me|WorkingDirectory=/etc/hide.me|" \
-e "s|ReadWritePaths=/opt/hide.me /etc|ReadWritePaths=/etc/hide.me|" \
-e "s|/opt/hide.me/config|/etc/hide.me/config|" \
-i 'hide.me@.service'
# patch config to arch-specific defaults
patch -p1 < ../arch-config.patch
}
build() {
@@ -42,7 +37,7 @@ build() {
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
-ldflags "-linkmode external" \
-o hide.me \
.
}