View | Details | Raw Unified | Return to bug 183300
Collapse All | Expand All

(-)./shadowsocks-libev/Makefile (-1 / +5 lines)
Lines 2-8 Link Here
2
# $FreeBSD: net/shadowsocks-libev/Makefile 331506 2013-10-24 17:44:00Z delphij $
2
# $FreeBSD: net/shadowsocks-libev/Makefile 331506 2013-10-24 17:44:00Z delphij $
3
3
4
PORTNAME=	shadowsocks-libev
4
PORTNAME=	shadowsocks-libev
5
PORTVERSION=	1.4.0
5
PORTVERSION=	1.4.0_1
6
CATEGORIES=	net
6
CATEGORIES=	net
7
MASTER_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_TAGNAME}.tar.gz?dummy=/
7
MASTER_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_TAGNAME}.tar.gz?dummy=/
8
8
Lines 22-25 Link Here
22
22
23
USE_RC_SUBR=	shadowsocks_libev
23
USE_RC_SUBR=	shadowsocks_libev
24
24
25
post-install:
26
	${MKDIR} ${STAGEDIR}${ETCDIR}
27
	${CP} ${WRKSRC}/debian/config.json  ${STAGEDIR}${ETCDIR}/config.json.sample
28
25
.include <bsd.port.mk>
29
.include <bsd.port.mk>
(-)./shadowsocks-libev/files/shadowsocks_libev.in (-23 / +5 lines)
Lines 8-22 Link Here
8
# Add the following lines to /etc/rc.conf to enable shadowsocks-libev:
8
# Add the following lines to /etc/rc.conf to enable shadowsocks-libev:
9
# shadowsocks_libev_enable (bool):  Set to "NO" by default.
9
# shadowsocks_libev_enable (bool):  Set to "NO" by default.
10
#      Set to "YES" to enable shadowsocks-libev.
10
#      Set to "YES" to enable shadowsocks-libev.
11
# shadowsocks_libev_host (ip addr/hostname): Set to "0.0.0.0" by default.
11
# shadowsocks_libev_config (path): Shadowsocks config file.
12
# shadowsocks_libev_port (port number): Set to 8388 by default.
12
#      Defaults to "%%PREFIX%%/etc/shadowsocks-libev/config.json"
13
# shadowsocks_libev_localport (local port): Set to 1080 by default.
14
# shadowsocks_libev_password (password): Set to ""(null) by default.
15
# shadowsocks_libev_encrypt_method (encrypt method): Set to rc4 by default.
16
#      Available methods: table, rc4, aes-128-cfb, aes-192-cfb, aes-256-cfb,
17
#      bf-cfb, camellia-128-cfb, camellia-192-cfb, camellia-256-cfb,
18
#      cast5-cfb, des-cfb, idea-cfb, rc2-cfb and seed-cfb
19
# shadowsocks_libev_timeout (time): Set to "300" seconds by default.
20
13
21
14
22
. /etc/rc.subr
15
. /etc/rc.subr
Lines 28-50 Link Here
28
load_rc_config $name
21
load_rc_config $name
29
22
30
: ${shadowsocks_libev_enable:="NO"}
23
: ${shadowsocks_libev_enable:="NO"}
31
: ${shadowsocks_libev_host="0.0.0.0"}
24
: ${shadowsocks_libev_config="%%PREFIX%%/etc/shadowsocks-libev/config.json"}
32
: ${shadowsocks_libev_port=8388}
33
: ${shadowsocks_libev_localport=1080}
34
: ${shadowsocks_libev_password=""}
35
: ${shadowsocks_libev_encrypt_method="rc4"}
36
: ${shadowsocks_libev_timeout="300"}
37
25
38
command="%%PREFIX%%/bin/ss-server" 
26
command="%%PREFIX%%/bin/ss-server" 
39
pidfile="/var/run/shadowsocks-libev.pid"
27
pidfile="/var/run/shadowsocks-libev.pid"
28
required_files="${shadowsocks_libev_config}"
40
29
41
: ${shadowsocks_libev_flags:="-s ${shadowsocks_libev_host} \
30
command_args="-f $pidfile -c $shadowsocks_libev_config"
42
    -p ${shadowsocks_libev_port} \
43
    -l ${shadowsocks_libev_localport} \
44
    -k ${shadowsocks_libev_password} \
45
    -m ${shadowsocks_libev_encrypt_method} \
46
    -f ${pidfile} \
47
    -t ${shadowsocks_libev_timeout}"}
48
49
31
50
run_rc_command "$1"
32
run_rc_command "$1"
(-)./shadowsocks-libev/pkg-plist (+4 lines)
Lines 1-3 Link Here
1
bin/ss-local
1
bin/ss-local
2
bin/ss-server
2
bin/ss-server
3
man/man8/shadowsocks.8.gz
3
man/man8/shadowsocks.8.gz
4
@unexec if cmp -s %D/etc/shadowsocks-libev/config.json %D/etc/shadowsocks-libev/config.json.sample ; then rm -f  %D/etc/shadowsocks-libev/config.json ; fi
5
etc/shadowsocks-libev/config.json.sample
6
@exec if [ ! -f %D/etc/shadowsocks-libev/config.json ]; then cp -p %D/%F %B/config.json ; fi
7
@dirrm etc/shadowsocks-libev

Return to bug 183300