summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordarsvador2021-03-19 17:26:41 +0800
committerdarsvador2021-03-19 17:26:41 +0800
commit3a823b6ea20e113c984a0993c7319c99a1d5a711 (patch)
treea1eedb1bfb43c79359268a95b1d094aaab726c44
downloadaur-3a823b6ea20e113c984a0993c7319c99a1d5a711.tar.gz
init commit
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD16
-rw-r--r--v2ray-setcap.hook10
3 files changed, 38 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a8f0425f24ae
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = v2ray-setcap-pacman-hook
+ pkgdesc = Pacman hook to setcap v2ray after v2ray install/upgrade.
+ pkgver = 1
+ pkgrel = 1
+ arch = any
+ license = GPL
+ depends = coreutils
+ source = v2ray-setcap.hook
+ sha256sums = d0c01d5ffe3bc99f5530e1145398d37703fb0ffcfc3de0dfecdf9dd1afa9db2a
+
+pkgname = v2ray-setcap-pacman-hook
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..528fa3d4d46d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,16 @@
+# Maintainer: darsvador <Lx3JQkmzRS@protonmail.com>
+
+pkgname=v2ray-setcap-pacman-hook
+pkgver=1
+pkgrel=1
+pkgdesc="Pacman hook to setcap v2ray after v2ray install/upgrade."
+arch=("any")
+license=("GPL")
+depends=('coreutils')
+source=(v2ray-setcap.hook)
+sha256sums=("d0c01d5ffe3bc99f5530e1145398d37703fb0ffcfc3de0dfecdf9dd1afa9db2a")
+
+package() {
+ install -Dm644 "${srcdir}/v2ray-setcap.hook" "${pkgdir}/usr/share/libalpm/hooks/v2ray-setcap.hook"
+}
+
diff --git a/v2ray-setcap.hook b/v2ray-setcap.hook
new file mode 100644
index 000000000000..36a129a3f155
--- /dev/null
+++ b/v2ray-setcap.hook
@@ -0,0 +1,10 @@
+[Trigger]
+Type = Package
+Operation = Install
+Operation = Upgrade
+Target = v2ray
+
+[Action]
+Description = Setcap for v2ray...
+When = PostTransaction
+Exec = /usr/bin/setcap "cap_net_admin,cap_net_bind_service=ep" /usr/bin/v2ray