Initial commit
This commit is contained in:
commit
2b61f2be37
10 changed files with 289 additions and 0 deletions
100
PKGBUILD
Normal file
100
PKGBUILD
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
# Maintainer: Christian Schendel <doppelhelix@gmail.com>
|
||||
# Contributor: flan_suse <windows2linux_AT_zoho_DOT_com>
|
||||
|
||||
# The "stylized" name of the application is "WireGUIrd" (aka: "wireguard GUI")
|
||||
|
||||
# PACKAGER'S NOTE:
|
||||
# This program runs with elevated permissions ("Polkit").
|
||||
# The config file is located under /root/wireguird.settings
|
||||
# It's preferable to use your WireGuard VPN provider's official application.
|
||||
# If they do not provide one, you can use NetworkManager to create WireGuard tunnels.
|
||||
# As a last resort, this application is a simple GUI that leverages "wg-quick".
|
||||
# Any *.conf files found under /etc/wireguard will automatically be loaded in the list.
|
||||
# You can also manually add or remove WireGuard *.conf files using the GUI interface.
|
||||
|
||||
# IMPORTANT NOTE ABOUT USAGE:
|
||||
# If a config's filename is longer than 15 characters, you cannot activate the tunnel.
|
||||
# This is due to a limitation of interface names on Linux.
|
||||
|
||||
pkgname=wireguird
|
||||
pkgver=1.1.0
|
||||
pkgrel=2
|
||||
pkgdesc="GUI frontend to connect to and manage WireGuard tunnels (GTK3)"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/UnnoTed/wireguird"
|
||||
license=('MIT')
|
||||
depends=(
|
||||
bash
|
||||
cairo
|
||||
fontconfig
|
||||
gdk-pixbuf2
|
||||
glib2
|
||||
glibc
|
||||
gtk3
|
||||
hicolor-icon-theme
|
||||
libayatana-appindicator
|
||||
openresolv
|
||||
pango
|
||||
polkit
|
||||
wireguard-tools
|
||||
)
|
||||
makedepends=(
|
||||
git
|
||||
go
|
||||
)
|
||||
source=(
|
||||
"$pkgname-$pkgver::git+$url.git#tag=v$pkgver"
|
||||
'wireguird.desktop.patch'
|
||||
)
|
||||
b2sums=('66538951a7fda7e58997a022fd49d4a3a23862a8f859c1b9551599de5d5606e023262c05fc48513789d5568267a019f9af7c1ca5be431afd88358a7ef2aeed67'
|
||||
'e6f387cc259f9ad84a921c6f4abfa2645aff9b909a327492faa44d180079578bfa863d11f57cac4b8f937983bdc2dbeeb6a075ada704f2c8540462b35614c6bf')
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
mkdir -p build/
|
||||
# a patch is more robust than sed
|
||||
patch -p1 -i ../wireguird.desktop.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
# Prepare the environment, so as to not download modules outside
|
||||
# the working source directory
|
||||
mkdir -p "$srcdir/go/"{.config,.cache}
|
||||
export GOPATH=$srcdir/go
|
||||
export GOENV=$srcdir/go/.config
|
||||
export GOCACHE=$srcdir/go/.cache
|
||||
|
||||
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
|
||||
go clean -cache -modcache
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
install -dm0755 "$pkgdir/opt/$pkgname"
|
||||
install -Dm0755 build/$pkgname "$pkgdir/opt/$pkgname"
|
||||
|
||||
install -dm0755 "$pkgdir/opt/$pkgname/Icon"
|
||||
cp -a --no-preserve=ownership Icon "$pkgdir/opt/$pkgname"
|
||||
|
||||
install -dm0755 "$pkgdir/usr/share/icons/hicolor/scalable/apps"
|
||||
install -Dm0644 Icon/wireguard.svg \
|
||||
"$pkgdir/usr/share/icons/hicolor/scalable/apps/wireguird.svg"
|
||||
|
||||
install -Dm0755 -t "$pkgdir/usr/bin" \
|
||||
deb/usr/local/bin/wireguird
|
||||
|
||||
cp -a --no-preserve=ownership deb/usr/share "$pkgdir/usr"
|
||||
|
||||
install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" \
|
||||
README.md preview.png deb/DEBIAN/changelog
|
||||
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue