summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorperqin2018-03-04 23:13:18 +0800
committerperqin2018-03-04 23:13:18 +0800
commit0de21e29d2f20637c3ff049f570142466a0ad185 (patch)
treea0a3936f36e893b22c64dbb079b51eacf8d9acd5
downloadaur-0de21e29d2f20637c3ff049f570142466a0ad185.tar.gz
PKGBUILDr1
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD62
-rw-r--r--shadowsocksrr-libev-redir@.service12
-rw-r--r--shadowsocksrr-libev-server@.service12
-rw-r--r--shadowsocksrr-libev-tunnel@.service12
-rw-r--r--shadowsocksrr-libev.install3
-rw-r--r--shadowsocksrr-libev.sh1
-rw-r--r--shadowsocksrr-libev@.service12
9 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..464bc467ff2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = shadowsocksrr-libev-git
+ pkgdesc = A ShadowsocksR fork
+ pkgver = 2.5.1.gbc1bbec
+ pkgrel = 1
+ url = https://github.com/shadowsocksrr/shadowsocksr-libev
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = zlib
+ makedepends = asciidoc
+ makedepends = xmlto
+ depends = openssl
+ depends = libev
+ depends = libsodium
+ depends = udns
+ depends = pcre
+ optdepends = mbedtls: another choice of SSL/TLS library
+ options = docs
+ options = !strip
+ source = shadowsocksrr-libev-git::git+https://github.com/shadowsocksrr/shadowsocksr-libev.git#branch=Akkariiin/develop
+ source = shadowsocksrr-libev-redir@.service
+ source = shadowsocksrr-libev-server@.service
+ source = shadowsocksrr-libev-tunnel@.service
+ source = shadowsocksrr-libev@.service
+ sha256sums = SKIP
+ sha256sums = 037a2803047bb0800d5aa059e3331090d7b94d8fab5552f564b4ed7455b7efad
+ sha256sums = 8c086ee6988bcac34e85d2ec5c7487f92b3dd026bfa886fe8fec4aa484c61b9e
+ sha256sums = c24d4d16291535015d30b274af466ffabf6cc02e0b7c61c206aa326746cfedc2
+ sha256sums = c4d5f2dc5d4fce9680623de2a665e8f0df9783946162314cc5103d6c1f16d510
+
+pkgname = shadowsocksrr-libev-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..153e5ed4a26
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+/src/
+/pkg/
+/*.pkg.tar.xz
+/shadowsocksrr-libev-git
+
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..1079ca1326a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: perqin <perqinxie at gmail dot com>
+
+pkgname=shadowsocksrr-libev-git
+pkgver=2.5.1.gbc1bbec
+pkgrel=1
+pkgdesc='A ShadowsocksR fork'
+arch=('i686' 'x86_64')
+url='https://github.com/shadowsocksrr/shadowsocksr-libev'
+license=('GPL3')
+depends=('openssl' 'libev' 'libsodium' 'udns' 'pcre')
+makedepends=('git' 'zlib' 'asciidoc' 'xmlto')
+optdepends=('mbedtls: another choice of SSL/TLS library') # choose this or openssl as you wish
+options=('docs' '!strip')
+source=(
+ 'shadowsocksrr-libev-git::git+https://github.com/shadowsocksrr/shadowsocksr-libev.git#branch=Akkariiin/develop'
+ shadowsocksrr-libev-redir@.service
+ shadowsocksrr-libev-server@.service
+ shadowsocksrr-libev-tunnel@.service
+ shadowsocksrr-libev@.service
+ )
+sha256sums=('SKIP'
+ '037a2803047bb0800d5aa059e3331090d7b94d8fab5552f564b4ed7455b7efad'
+ '8c086ee6988bcac34e85d2ec5c7487f92b3dd026bfa886fe8fec4aa484c61b9e'
+ 'c24d4d16291535015d30b274af466ffabf6cc02e0b7c61c206aa326746cfedc2'
+ 'c4d5f2dc5d4fce9680623de2a665e8f0df9783946162314cc5103d6c1f16d510')
+
+build() {
+ cd "$pkgname"
+ ./configure --prefix=/opt/$pkgname \
+ --enable-system-shared-lib \
+ --program-transform-name='s/ss-/ssrr-/' # \
+ # --with-crypto-library=LIB # LIB=openssl|mbedtls, default=openssl
+ # if you choose a crypto lib other than openssl, uncomment above line and the trailing slash
+ make
+}
+
+package() {
+ cd "$pkgname"
+ make DESTDIR="$pkgdir/" install
+
+ # systemd services
+ for service in "@" "-redir@" "-server@" "-tunnel@"; do
+ install -Dm644 {"$srcdir","$pkgdir/usr/lib/systemd/system"}/shadowsocksrr-libev"$service".service
+ done
+
+ # create symlink in /usr/bin
+ install -dm755 "$pkgdir/usr/bin"
+ for bin in "$pkgdir/opt/$pkgname/bin/"*; do
+ local basebin="$(basename $bin)"
+ ln -s "/opt/$pkgname/bin/$basebin" "$pkgdir/usr/bin/$basebin"
+ done
+
+ # move manpages
+ install -dm755 "$pkgdir/usr/share/man/man"{1,8}
+ for man in "$pkgdir/opt/$pkgname/share/man/man1/"*; do
+ mv "$man" "$pkgdir/usr/share/man/man1/"
+ done
+ mv "$pkgdir/opt/$pkgname/share/man/man8/shadowsocks-libev.8" "$pkgdir/usr/share/man/man8/shadowsocksrr-libev.8"
+
+ # remove empty man directories
+ rm "$pkgdir/opt/$pkgname/share/man" -rf
+}
diff --git a/shadowsocksrr-libev-redir@.service b/shadowsocksrr-libev-redir@.service
new file mode 100644
index 00000000000..3b3a7c1eee8
--- /dev/null
+++ b/shadowsocksrr-libev-redir@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ShadowsocksRR-Libev Client Service Redir Mode
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ssrr-redir -c /etc/shadowsocksrr/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/shadowsocksrr-libev-server@.service b/shadowsocksrr-libev-server@.service
new file mode 100644
index 00000000000..367b78a296f
--- /dev/null
+++ b/shadowsocksrr-libev-server@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ShadowsocksRR-Libev Server Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ssrr-server -c /etc/shadowsocksrr/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/shadowsocksrr-libev-tunnel@.service b/shadowsocksrr-libev-tunnel@.service
new file mode 100644
index 00000000000..cdb6e2dc41a
--- /dev/null
+++ b/shadowsocksrr-libev-tunnel@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ShadowsocksRR-Libev Client Service Tunnel Mode
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ssrr-tunnel -c /etc/shadowsocksrr/%i.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/shadowsocksrr-libev.install b/shadowsocksrr-libev.install
new file mode 100644
index 00000000000..a1859b01ed0
--- /dev/null
+++ b/shadowsocksrr-libev.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo "You need to relogin in order for the SSRR binaries to appear in your PATH"
+}
diff --git a/shadowsocksrr-libev.sh b/shadowsocksrr-libev.sh
new file mode 100644
index 00000000000..ec0baaa74f2
--- /dev/null
+++ b/shadowsocksrr-libev.sh
@@ -0,0 +1 @@
+export PATH=${PATH}:/opt/shadowsocksrr-libev/bin
diff --git a/shadowsocksrr-libev@.service b/shadowsocksrr-libev@.service
new file mode 100644
index 00000000000..fd153900e39
--- /dev/null
+++ b/shadowsocksrr-libev@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=ShadowsocksRR-Libev Client Service
+After=network.target
+
+[Service]
+Type=simple
+User=nobody
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+ExecStart=/usr/bin/ssrr-local -c /etc/shadowsocksrr/%i.json
+
+[Install]
+WantedBy=multi-user.target