aboutsummaryrefslogtreecommitdiff
path: root/arch/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'arch/PKGBUILD')
-rw-r--r--arch/PKGBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/PKGBUILD b/arch/PKGBUILD
new file mode 100644
index 0000000..46c138f
--- /dev/null
+++ b/arch/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Yuuta Liang <yuuta@yuuta.moe>
+pkgname=vpnswitch-git
+pkgver=r2.935c2ef
+pkgrel=1
+pkgdesc="Automatically switch VPN based on internal network connectivity"
+arch=(any)
+url="https://git.yuuta.moe/vpnswitch.git/"
+license=('custom')
+groups=()
+depends=(sh coreutils)
+makedepends=('git')
+provides=("vpnswitch")
+conflicts=("vpnswitch")
+replaces=()
+backup=(etc/vpnswitch/)
+options=()
+install=
+source=('src::git+https://git.yuuta.moe/vpnswitch.git'
+'vpnswitch@.service')
+noextract=()
+md5sums=('SKIP'
+ '92b328333779a4be3aaf150267edda30')
+
+pkgver() {
+ cd "$srcdir/src"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd "$srcdir/src"
+ mkdir -p "$pkgdir/etc/vpnswitch/"
+ install -Dm644 ./profile "$pkgdir/etc/vpnswitch/example.conf"
+ mkdir -p "$pkgdir/usr/bin/"
+ install -Dm755 ./vpnswitch "$pkgdir/usr/bin/"
+ mkdir -p "$pkgdir/usr/share/licenses/vpnswitch/"
+ install -Dm644 ./LICENSE "$pkgdir/usr/share/licenses/vpnswitch/"
+ mkdir -p "$pkgdir/usr/lib/systemd/system/"
+ install -Dm644 ../vpnswitch@.service "$pkgdir/usr/lib/systemd/system/"
+}