summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorh_cheung2020-02-07 13:45:44 +0800
committerh_cheung2020-02-07 13:45:44 +0800
commit6d6eba0238c5c630db0e03fdcb2649489fcd328d (patch)
treeb89fd91fab2c688c47a9b2c09a735cad942105ef
downloadaur-6d6eba0238c5c630db0e03fdcb2649489fcd328d.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD49
2 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c794bd0a2901
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = clash-tun
+ pkgdesc = Clash Tun Scripts for Linux
+ pkgver = 20200201.r366.bbafb89
+ pkgrel = 1
+ url = https://github.com/Kr328/clash-tun-for-linux
+ arch = any
+ license = custom
+ makedepends = go
+ makedepends = git
+ depends = glibc
+ provides = clash
+ conflicts = clash-bin
+ conflicts = clash
+ conflicts = clash-dev-git
+ source = git+https://github.com/comzyh/clash#branch=add-water
+ source = git+https://github.com/h0cheung/kr328-clash-setup-scripts
+ source = https://raw.githubusercontent.com/comzyh/clash/master/LICENSE
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = 7462fda797df0a48961ab34179d8793e
+
+pkgname = clash-tun
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3cc3de7028b9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: h_cheung <mail@h-cheung.cf>
+pkgname=clash-tun
+pkgver=20200201.r366.bbafb89
+pkgrel=1
+pkgdesc="Clash Tun Scripts for Linux"
+arch=('any')
+url="https://github.com/Kr328/clash-tun-for-linux"
+license=('custom')
+groups=()
+provides=("clash")
+conflicts=("clash-bin" "clash" "clash-dev-git")
+makedepends=('go' 'git')
+depends=('glibc')
+backup=()
+options=()
+source=("git+https://github.com/comzyh/clash#branch=add-water"
+ "git+https://github.com/h0cheung/kr328-clash-setup-scripts"
+ "https://raw.githubusercontent.com/comzyh/clash/master/LICENSE")
+md5sums=('SKIP'
+ 'SKIP'
+ '7462fda797df0a48961ab34179d8793e')
+validpgpkeys=()
+
+pkgver() {
+ cd "${srcdir}/clash"
+ local date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
+ local count=$(git rev-list --count HEAD)
+ local commit=$(git rev-parse --short HEAD)
+ echo "$date.r${count}.$commit"
+}
+
+build() {
+ cd "${srcdir}/clash"
+ go build .
+}
+
+package() {
+ cd "${srcdir}/clash"
+ install -m 755 -D "clash" "${pkgdir}/usr/bin/clash"
+ install -m 644 -D "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/clash/LICENSE"
+ cd "${srcdir}/kr328-clash-setup-scripts"
+ install -m 755 -D "bypass-proxy" "${pkgdir}/usr/bin/bypass-proxy"
+ install -m 755 -D "bypass-proxy-pid" "${pkgdir}/usr/bin/bypass-proxy-pid"
+ install -m 744 -D "setup-clash-tun.sh" "${pkgdir}/opt/script/setup-clash-tun.sh"
+ install -m 744 -D "setup-clash-cgroup.sh" "${pkgdir}/opt/script/setup-clash-cgroup.sh"
+ install -m 744 -D "clean-clash-tun.sh" "${pkgdir}/opt/script/clean-clash-tun.sh"
+ install -m 644 -D "clash.service" "${pkgdir}/usr/lib/systemd/system/clash-tun.service"
+ install -m 775 -d -o 65534 -g 1000 "${pkgdir}/srv/clash"
+}