initial import from upstream PR
https://github.com/LeonardKoenig/hide.client.linux/tree/prq_archlinux
This commit is contained in:
16
.SRCINFO
Normal file
16
.SRCINFO
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
pkgbase = hide-client
|
||||||
|
pkgdesc = Hide.me CLI VPN client for Linux
|
||||||
|
pkgver = 0.9.1
|
||||||
|
pkgrel = 1
|
||||||
|
url = hide.me
|
||||||
|
arch = any
|
||||||
|
license = GPL2
|
||||||
|
source = https://github.com/eventure/hide.client.linux/archive/0.9.1.zip
|
||||||
|
source = config_sysdirs.patch
|
||||||
|
source = service_sysdirs.patch
|
||||||
|
md5sums = 9346e79e8e1c98b5457a03e02febca9c
|
||||||
|
md5sums = 07d59ac194c4aa8ee0de284283796461
|
||||||
|
md5sums = b2cee66ea77a0d76460131144d0a16b0
|
||||||
|
|
||||||
|
pkgname = hide-client
|
||||||
|
|
62
PKGBUILD
Normal file
62
PKGBUILD
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# Maintainer: Leonard Janis Robert König <ljrk at ljrk dot org>
|
||||||
|
pkgname=hide-client
|
||||||
|
_pkgname=hide.client.linux
|
||||||
|
pkgver=0.9.1
|
||||||
|
pkgrel=1
|
||||||
|
epoch=
|
||||||
|
pkgdesc="Hide.me CLI VPN client for Linux"
|
||||||
|
arch=('any')
|
||||||
|
url="hide.me"
|
||||||
|
license=('GPL2')
|
||||||
|
groups=()
|
||||||
|
depends=()
|
||||||
|
makedepends=()
|
||||||
|
checkdepends=()
|
||||||
|
optdepends=()
|
||||||
|
provides=()
|
||||||
|
conflicts=()
|
||||||
|
replaces=()
|
||||||
|
backup=()
|
||||||
|
options=()
|
||||||
|
install=
|
||||||
|
changelog=
|
||||||
|
source=("https://github.com/eventure/$_pkgname/archive/$pkgver.zip"
|
||||||
|
"config_sysdirs.patch"
|
||||||
|
"service_sysdirs.patch")
|
||||||
|
noextract=()
|
||||||
|
md5sums=('9346e79e8e1c98b5457a03e02febca9c'
|
||||||
|
'07d59ac194c4aa8ee0de284283796461'
|
||||||
|
'b2cee66ea77a0d76460131144d0a16b0')
|
||||||
|
validpgpkeys=()
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$_pkgname-$pkgver"
|
||||||
|
patch -p1 -i "$srcdir/config_sysdirs.patch"
|
||||||
|
patch -p1 -i "$srcdir/service_sysdirs.patch"
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$_pkgname-$pkgver"
|
||||||
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
||||||
|
export CGO_CFLAGS="${CFLAGS}"
|
||||||
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export CGO_LDFLAGS="${LDFLAGS}"
|
||||||
|
# readonly breaks build
|
||||||
|
# export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||||
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -modcacherw"
|
||||||
|
go build -o hide.me .
|
||||||
|
}
|
||||||
|
|
||||||
|
#check() {
|
||||||
|
# cd "$_pkgname-$pkgver"
|
||||||
|
# go test .
|
||||||
|
#}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$_pkgname-$pkgver"
|
||||||
|
install -Dm755 -t "$pkgdir"/usr/bin/ hide.me
|
||||||
|
install -Dm644 -t "$pkgdir"/usr/share/hide.me/ CA.pem
|
||||||
|
# For (system-wide) accessToken.txt
|
||||||
|
install -dm750 "$pkgdir"/etc/hide.me/
|
||||||
|
install -Dm644 -t "$pkgdir"/usr/lib/systemd/system/ hide.me@.service
|
||||||
|
}
|
22
config_sysdirs.patch
Normal file
22
config_sysdirs.patch
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/configuration/configuration.go b/configuration/configuration.go
|
||||||
|
index ac3947c..d65da20 100644
|
||||||
|
--- a/configuration/configuration.go
|
||||||
|
+++ b/configuration/configuration.go
|
||||||
|
@@ -40,8 +40,8 @@ func NewHideGuardConfiguration() *HideGuardConfiguration {
|
||||||
|
Host: "", // command line option "-n"
|
||||||
|
Port: 432, // command line option "-p"
|
||||||
|
Domain: "hide.me", // Not configurable
|
||||||
|
- CA: "CA.pem", // command line option "-ca"
|
||||||
|
- AccessTokenFile: "accessToken.txt", // command line option "-t"
|
||||||
|
+ CA: "/usr/share/hide.me/CA.pem", // command line option "-ca"
|
||||||
|
+ AccessTokenFile: "/etc/hide.me/accessToken.txt", // command line option "-t"
|
||||||
|
Username: "", // command line option "-u"
|
||||||
|
Password: "", // Only configurable through the config file
|
||||||
|
ConnectTimeout: 10 * time.Second, // Only configurable through the config file
|
||||||
|
@@ -120,4 +120,4 @@ func ( c *HideGuardConfiguration ) InteractiveCredentials() ( err error ) {
|
||||||
|
func ( c *HideGuardConfiguration ) Print() {
|
||||||
|
if out, err := yaml.Marshal( c ); err != nil { fmt.Println( err ) } else { fmt.Print( string( out ) ) }
|
||||||
|
return
|
||||||
|
-}
|
||||||
|
\ No newline at end of file
|
||||||
|
+}
|
24
service_sysdirs.patch
Normal file
24
service_sysdirs.patch
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/hide.me@.service b/hide.me@.service
|
||||||
|
index b32902f..641241d 100644
|
||||||
|
--- a/hide.me@.service
|
||||||
|
+++ b/hide.me@.service
|
||||||
|
@@ -6,9 +6,9 @@ DefaultDependencies=yes
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
-ExecStart=/opt/hide.me/hide.me connect %i
|
||||||
|
-WorkingDirectory=/opt/hide.me
|
||||||
|
-ReadWritePaths=/opt/hide.me /etc
|
||||||
|
+ExecStart=/usr/bin/hide.me/hide.me connect %i
|
||||||
|
+WorkingDirectory=/usr/bin/hide.me
|
||||||
|
+ReadWritePaths=/usr/bin/hide.me /etc
|
||||||
|
TimeoutStopSec=30
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5s
|
||||||
|
@@ -30,4 +30,4 @@ Group=root
|
||||||
|
LimitNOFILE=64
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
-WantedBy=multi-user.target
|
||||||
|
\ No newline at end of file
|
||||||
|
+WantedBy=multi-user.target
|
Reference in New Issue
Block a user