summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorm8D22019-01-30 21:51:52 -0800
committerm8D22019-01-30 21:51:52 -0800
commit922956c18ac3609613e84d12496aaf0409ac9870 (patch)
treee1539980461440f83cbf32cfdab0138f8e865aa8
downloadaur-922956c18ac3609613e84d12496aaf0409ac9870.tar.gz
2019-01-28 333e98d
-rw-r--r--.SRCINFO34
-rw-r--r--PKGBUILD52
-rw-r--r--shadowsocks-libev-git.install10
-rw-r--r--shadowsocks-libev-redir@.service12
-rw-r--r--shadowsocks-libev-server@.service12
-rw-r--r--shadowsocks-libev-tunnel@.service12
-rw-r--r--shadowsocks-libev@.service12
7 files changed, 144 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f2dc4328701
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = shadowsocks-libev-git
+ pkgdesc = A lightweight secured socks5 proxy for embedded devices and low end boxes
+ pkgver = 3.2.3.r29
+ pkgrel = 1
+ url = https://github.com/shadowsocks/shadowsocks-libev
+ install = shadowsocks-libev-git.install
+ arch = x86_64
+ license = GPL3
+ makedepends = asciidoc
+ makedepends = xmlto
+ makedepends = git
+ depends = libcap
+ depends = mbedtls
+ depends = libsodium
+ depends = libev
+ depends = c-ares
+ depends = pcre
+ depends = libcorkipset
+ depends = libbloom
+ provides = shadowsocks-libev
+ conflicts = shadowsocks-libev
+ source = shadowsocks-libev-git-3.2.3.r29::git+https://github.com/shadowsocks/shadowsocks-libev.git
+ source = shadowsocks-libev@.service
+ source = shadowsocks-libev-server@.service
+ source = shadowsocks-libev-redir@.service
+ source = shadowsocks-libev-tunnel@.service
+ sha512sums = SKIP
+ sha512sums = 7b52bbed0aa06935e80fc0c143acc6cefecab796cf3f76843fc3848e71128d8d544d55445330b74abe1782443630f0aa3c051f8583e213320939c719f9923dec
+ sha512sums = cffaa8ebc20dc7e632d0501158b3efa3567add02602960ae9a401b64fecc815d4caf9223d79adc69ef4ddd77bff140b94a1fa0de13f85b5054477d7c8d868207
+ sha512sums = f2782245478951b35676370c53d6e6d03021bca4327950087f0906ea4ab6606432df9e3dc8036f482f44da186d70b01b575542722c797b3adc14658fda276ea4
+ sha512sums = 42043ac083e9425ce48ba02e6e7cbedd8f4c81c9e9f79b375937635362a461dd09ddba76c520eacbecdc1993e9b1bd203e55d3b331db9b22d98b5ba4196f8886
+
+pkgname = shadowsocks-libev-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fdbe1960e7f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: m8D2 <omui (at) proton mail (dot) com>
+# Contributor: Felix Yan <felixonmars@archlinux.org>
+# Contributor: jiangxq <jiangxueqian at gmail dot com>
+# Contributor: zh99998 <zh99998@gmail.com>
+# Contributor: 4679kun <admin at 4679 dot us>
+
+
+pkgname=shadowsocks-libev-git
+pkgver=3.2.3.r29
+pkgrel=1
+pkgdesc='A lightweight secured socks5 proxy for embedded devices and low end boxes'
+arch=(x86_64)
+url='https://github.com/shadowsocks/shadowsocks-libev'
+license=(GPL3)
+depends=(libcap mbedtls libsodium libev c-ares pcre libcorkipset libbloom)
+makedepends=(asciidoc xmlto git)
+provides=(shadowsocks-libev)
+conflicts=(shadowsocks-libev)
+install=${pkgname}.install
+source=("$pkgname-$pkgver::git+https://github.com/shadowsocks/shadowsocks-libev.git"
+ 'shadowsocks-libev@.service'
+ 'shadowsocks-libev-server@.service'
+ 'shadowsocks-libev-redir@.service'
+ 'shadowsocks-libev-tunnel@.service')
+sha512sums=('SKIP'
+ '7b52bbed0aa06935e80fc0c143acc6cefecab796cf3f76843fc3848e71128d8d544d55445330b74abe1782443630f0aa3c051f8583e213320939c719f9923dec'
+ 'cffaa8ebc20dc7e632d0501158b3efa3567add02602960ae9a401b64fecc815d4caf9223d79adc69ef4ddd77bff140b94a1fa0de13f85b5054477d7c8d868207'
+ 'f2782245478951b35676370c53d6e6d03021bca4327950087f0906ea4ab6606432df9e3dc8036f482f44da186d70b01b575542722c797b3adc14658fda276ea4'
+ '42043ac083e9425ce48ba02e6e7cbedd8f4c81c9e9f79b375937635362a461dd09ddba76c520eacbecdc1993e9b1bd203e55d3b331db9b22d98b5ba4196f8886')
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ sed -i 's|AC_CONFIG_FILES(\[libbloom/Makefile libcork/Makefile libipset/Makefile\])||' configure.ac
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ ./autogen.sh
+ ./configure --prefix=/usr --enable-shared --enable-system-shared-lib
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir/" install
+ install -Dm644 "$srcdir/shadowsocks-libev@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev@.service"
+ install -Dm644 "$srcdir/shadowsocks-libev-server@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev-server@.service"
+ install -Dm644 "$srcdir/shadowsocks-libev-redir@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev-redir@.service"
+ install -Dm644 "$srcdir/shadowsocks-libev-tunnel@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-libev-tunnel@.service"
+}
diff --git a/shadowsocks-libev-git.install b/shadowsocks-libev-git.install
new file mode 100644
index 00000000000..2dedbb9b4ac
--- /dev/null
+++ b/shadowsocks-libev-git.install
@@ -0,0 +1,10 @@
+post_install() {
+ setcap cap_net_bind_service+ep usr/bin/ss-local 2>/dev/null
+ setcap cap_net_bind_service+ep usr/bin/ss-server 2>/dev/null
+ setcap cap_net_bind_service+ep usr/bin/ss-tunnel 2>/dev/null
+ setcap cap_net_bind_service,cap_net_admin+ep usr/bin/ss-redir 2>/dev/null
+}
+
+post_upgrade() {
+ post_install "$1"
+} \ No newline at end of file
diff --git a/shadowsocks-libev-redir@.service b/shadowsocks-libev-redir@.service
new file mode 100644
index 00000000000..dad577f5fd7
--- /dev/null
+++ b/shadowsocks-libev-redir@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Redir Mode
+After=network-online.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-redir -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/shadowsocks-libev-server@.service b/shadowsocks-libev-server@.service
new file mode 100644
index 00000000000..dc1c6cc6c53
--- /dev/null
+++ b/shadowsocks-libev-server@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Server Service
+After=network-online.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-server -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/shadowsocks-libev-tunnel@.service b/shadowsocks-libev-tunnel@.service
new file mode 100644
index 00000000000..20b06f4c596
--- /dev/null
+++ b/shadowsocks-libev-tunnel@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service Tunnel Mode
+After=network-online.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-tunnel -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/shadowsocks-libev@.service b/shadowsocks-libev@.service
new file mode 100644
index 00000000000..c54eb08602a
--- /dev/null
+++ b/shadowsocks-libev@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks-Libev Client Service
+After=network-online.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ss-local -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target