Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/shadowsocks-libev: upgrade to 3.2.5

From: guxin0123 <guxin0123_at_gmail.com>
Date: Wed, 17 Apr 2019 06:03:08 +0000

---
 testing/shadowsocks-libev/APKBUILD            | 41 +++++++++++++------
 .../shadowsocks-libev-srv.initd               | 11 +++++
 .../shadowsocks-libev/shadowsocks-libev.confd | 10 +++++
 3 files changed, 49 insertions(+), 13 deletions(-)
 create mode 100644 testing/shadowsocks-libev/shadowsocks-libev-srv.initd
 create mode 100644 testing/shadowsocks-libev/shadowsocks-libev.confd
diff --git a/testing/shadowsocks-libev/APKBUILD b/testing/shadowsocks-libev/APKBUILD
index aa6529cce9..5c9d62c06a 100644
--- a/testing/shadowsocks-libev/APKBUILD
+++ b/testing/shadowsocks-libev/APKBUILD
_at_@ -1,38 +1,53 @@
+# Contributor:
 # Maintainer: Natanael Copa <ncopa_at_alpinelinux.org>
+# Maintainer: Gux <guxin0123_at_gmail.com>
 pkgname=shadowsocks-libev
-pkgver=2.5.5
-pkgrel=3
+pkgver=3.2.5
+pkgrel=1
 pkgdesc="lightweight secured SOCKS5 proxy"
 url="https://shadowsocks.org/en/download/servers.html"
 arch="all"
 license="GPL-3.0"
-depends=""
+depends="libcap mbedtls libsodium libev c-ares pcre"
+
 makedepends="asciidoc autoconf libtool linux-headers
-	libressl-dev pcre-dev xmlto libev-dev udns-dev libsodium-dev zlib-dev"
+	libressl-dev pcre-dev xmlto libev-dev udns-dev libsodium-dev zlib-dev asciidoc"
 install=""
 subpackages="$pkgname-dev $pkgname-doc"
-source="shadowsocks-libev-$pkgver.tar.gz::https://github.com/shadowsocks/shadowsocks-libev/archive/v$pkgver.tar.gz"
+
+source="shadowsocks-libev-$pkgver.tar.gz::https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$pkgver/shadowsocks-libev-$pkgver.tar.gz
+	shadowsocks-libev-srv.initd
+	shadowsocks-libev.confd"
 builddir="$srcdir/shadowsocks-libev-$pkgver"
 
+
+
 build() {
 	cd "$builddir"
+	
+	./configure 
 	./configure \
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix=/usr \
 		--sysconfdir=/etc \
 		--mandir=/usr/share/man \
-		--localstatedir=/var \
-		--enable-system-shared-lib \
-		|| return 1
-	make || return 1
+		--localstatedir=/var  || return 1
+    	make || return 1
 }
 
 package() {
 	cd "$builddir"
-	make DESTDIR="$pkgdir" install || return 1
+	make DESTDIR="$pkgdir" install
+	install -D -m755 "$srcdir"/shadowsocks-libev-srv.initd \
+		"$pkgdir"/etc/init.d/shadowsocks-libev-srv
+	install -D -m644 "$srcdir"/shadowsocks-libev.confd \
+		"$pkgdir"/etc/shadowsocks-libev/config.json
+	
 }
 
-md5sums="f4593a1ee28f4f8c5378662e0ab2764b  shadowsocks-libev-2.5.5.tar.gz"
-sha256sums="46a72367b7301145906185f1e4136e39d6792d27643826e409ab708351b6d0dd  shadowsocks-libev-2.5.5.tar.gz"
-sha512sums="5ce15288f23bcb566428b6a46fb47375c9c89ace658e32f049208c6dd5ec644d1be6c1d844f5edaf4073be52e846d37b6d78a310f64f50a95811dfbcc0f91188  shadowsocks-libev-2.5.5.tar.gz"
+
+
+sha512sums="a90042a6e45a5e254161db7c673252ed42f6f568f63b26a14272baa33ecbbb897febefd302e8ddbfe75250276e8960247ab04cb8fb701ed6f106f5ad26d4e08c  shadowsocks-libev-3.2.5.tar.gz
+d21947354c8a8b3f79013b75e254f1ef5f184b3cb711c93be2ef7f48f6b7b88347b25369504ca468829caa796394266e281ea72ba4aec5bbdfa77602eac15a1e  shadowsocks-libev-srv.initd
+f6180b97ed99e7dcce83ffbb4677f0694febea0b878db60c59b4fcc9904402c76f4969fd3e637b32015ac318a7b1bcb494a3f562b427ebb0b9d6be2797f08915  shadowsocks-libev.confd"
diff --git a/testing/shadowsocks-libev/shadowsocks-libev-srv.initd b/testing/shadowsocks-libev/shadowsocks-libev-srv.initd
new file mode 100644
index 0000000000..fec3c6b469
--- /dev/null
+++ b/testing/shadowsocks-libev/shadowsocks-libev-srv.initd
_at_@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+
+name="shadowsocks-libev-srv"
+command="/usr/bin/ss-server"
+command_args="-c /etc/shadowsocks-libev/config.json  >/dev/null 2>&1 & "
+
+depend() {
+	need net localmount
+        after firewall
+}
+
diff --git a/testing/shadowsocks-libev/shadowsocks-libev.confd b/testing/shadowsocks-libev/shadowsocks-libev.confd
new file mode 100644
index 0000000000..e14b65e54f
--- /dev/null
+++ b/testing/shadowsocks-libev/shadowsocks-libev.confd
_at_@ -0,0 +1,10 @@
+{
+    "server":"0.0.0.0",
+    "server_port":8389,
+    "local_port":1081,
+    "password":"hello",
+    "timeout":60,
+    "method":"aes-256-cfb",
+    "local":"127.0.0.1",
+    "fast_open":false
+}
-- 
2.20.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Apr 17 2019 - 06:03:08 UTC