summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYiyao Yu2017-10-07 10:34:20 +0800
committerYiyao Yu2017-10-07 10:34:20 +0800
commitb2cabf757db492676f7f7eefa78c404ee9aed792 (patch)
tree677496617fb3f18a7a807bd3f766dedd8712ccc6
downloadaur-b2cabf757db492676f7f7eefa78c404ee9aed792.tar.gz
Initial commit
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD48
-rw-r--r--shadowsocks-server@.service12
-rw-r--r--shadowsocks.install5
-rw-r--r--shadowsocks@.service12
5 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6ccf34f8f73e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = shadowsocks-git
+ pkgdesc = A lightweight tunnel proxy
+ pkgver = 2.9.1.r21.g2ab8c6b
+ pkgrel = 1
+ url = http://pypi.python.org/pypi/shadowsocks
+ install = shadowsocks.install
+ arch = any
+ license = Apache
+ checkdepends = python-coverage
+ checkdepends = python-pyflakes
+ checkdepends = libsodium
+ checkdepends = python-nose
+ checkdepends = dante
+ checkdepends = procps-ng
+ checkdepends = util-linux
+ makedepends = git
+ depends = python
+ depends = python-setuptools
+ optdepends = libsodium: For salsa20 and chacha20 support
+ provides = shadowsocks
+ conflicts = shadowsocks
+ source = shadowsocks::git+https://github.com/shadowsocks/shadowsocks.git
+ source = shadowsocks@.service
+ source = shadowsocks-server@.service
+ sha512sums = SKIP
+ sha512sums = 96ecb174a476f64dec3ec086732d93a76d27e9a1cc56b1dc3fa87bf8e00d4b3c44076a01a0d525e42174cacc58fd5c16d5c8af5d4636dae13df549dec8204f7d
+ sha512sums = f2f8240c18a4483bf3e03b3a5ac8822c3deae713224f732bf28f7fddfcc5d0b02aa91652665ff93f05731e162a9407109c18f43d732a3a9b19d9eacfc806a4df
+
+pkgname = shadowsocks-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..452494cd7ba4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Yiyao Yu <yuydevel@protonmail.com>
+
+_pkgname=shadowsocks
+pkgname="${_pkgname}-git"
+pkgver=2.9.1.r21.g2ab8c6b
+pkgrel=1
+pkgdesc="A lightweight tunnel proxy"
+license=('Apache')
+url="http://pypi.python.org/pypi/shadowsocks"
+arch=('any')
+provides=('shadowsocks')
+conflicts=('shadowsocks')
+depends=('python' 'python-setuptools')
+makedepends=('git')
+optdepends=('libsodium: For salsa20 and chacha20 support')
+checkdepends=('python-coverage' 'python-pyflakes' 'libsodium' 'python-nose' 'dante' 'procps-ng' 'util-linux')
+install=${_pkgname}.install
+source=("${_pkgname}::git+https://github.com/shadowsocks/shadowsocks.git"
+ "shadowsocks@.service"
+ "shadowsocks-server@.service")
+sha512sums=('SKIP'
+ '96ecb174a476f64dec3ec086732d93a76d27e9a1cc56b1dc3fa87bf8e00d4b3c44076a01a0d525e42174cacc58fd5c16d5c8af5d4636dae13df549dec8204f7d'
+ 'f2f8240c18a4483bf3e03b3a5ac8822c3deae713224f732bf28f7fddfcc5d0b02aa91652665ff93f05731e162a9407109c18f43d732a3a9b19d9eacfc806a4df')
+
+pkgver(){
+ git -C "${_pkgname}" describe --long --tags | sed "s/-/.r/;s/-/./g"
+}
+
+prepare(){
+ git -C "${_pkgname}" checkout master
+}
+
+check() {
+ cd shadowsocks
+ tests/jenkins.sh || warning "Tests failed"
+}
+
+package() {
+ cd shadowsocks
+ python setup.py install -O1 --root="$pkgdir"
+
+ install -dm755 "$pkgdir/usr/share/man/man1"
+ install -m644 debian/{ssserver.1,sslocal.1} "$pkgdir/usr/share/man/man1"
+ install -Dm644 debian/config.json "$pkgdir/etc/shadowsocks/example.json"
+
+ install -Dm644 "$srcdir/shadowsocks@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks@.service"
+ install -Dm644 "$srcdir/shadowsocks-server@.service" "$pkgdir/usr/lib/systemd/system/shadowsocks-server@.service"
+}
diff --git a/shadowsocks-server@.service b/shadowsocks-server@.service
new file mode 100644
index 000000000000..5173710ff37a
--- /dev/null
+++ b/shadowsocks-server@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks Server Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/ssserver -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/shadowsocks.install b/shadowsocks.install
new file mode 100644
index 000000000000..e75fc8d13d53
--- /dev/null
+++ b/shadowsocks.install
@@ -0,0 +1,5 @@
+post_install() {
+ echo "You can use profiled systemd units to start/stop shadowsocks: (Profiles are placed under /etc/shadowsocks/*.json)"
+ echo "# systemctl start/stop shadowsocks[-server]@<conf-name>"
+}
+
diff --git a/shadowsocks@.service b/shadowsocks@.service
new file mode 100644
index 000000000000..0633e70e6105
--- /dev/null
+++ b/shadowsocks@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Shadowsocks Client Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/%i.json
+
+[Install]
+WantedBy=multi-user.target
+