diff --git a/README.md b/README.md index 500b5c3b..608648eb 100644 --- a/README.md +++ b/README.md @@ -67,10 +67,25 @@ sudo apt-get install shadowsocks-libev #### Build package from source +Supported Platforms: + +* Debian 7 (see below), 8, unstable +* Ubuntu 14.10, 15.04 or higher + +To build packages on Debian 7 (Wheezy), you need to enable `debian-backports` +to install systemd-compatibility packages like `dh-systemd` or `init-system-helpers`. + +This also means that you can only install those built packages on systems that have +`init-system-helpers` installed. + +Otherwise, try to build and install directly from source. See the **Linux** +section below. + ``` bash cd shadowsocks-libev -sudo apt-get install build-essential automake libtool libssl-dev gawk debhelper dh-systemd -sh debian/autopkg.sh +sudo apt-get install build-essential autoconf libtool libssl-dev \ + gawk debhelper dh-systemd init-system-helpers +dpkg-buildpackage -us -uc -i cd .. sudo dpkg -i shadowsocks-libev*.deb ``` @@ -78,11 +93,15 @@ sudo dpkg -i shadowsocks-libev*.deb #### Configure and start the service ``` -# Edit the configuration +# Edit the configuration file sudo vim /etc/shadowsocks-libev/config.json +# Edit the default configuration for debian +sudo vim /etc/default/shadowsocks-libev + # Start the service -sudo /etc/init.d/shadowsocks-libev start +sudo /etc/init.d/shadowsocks-libev start # for sysvinit, or +sudo systemctl start shasowsocks-libev # for systemd ``` ### Fedora & RHEL diff --git a/debian/autopkg.sh b/debian/autopkg.sh deleted file mode 100755 index cc5fe83f..00000000 --- a/debian/autopkg.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# Automatic deb packaging script for shadowsocks-libev -# - -set -e -if [ "$(basename $(pwd))x" = "debianx" ]; then - cd .. -else - if [ ! "$(basename $(pwd))x" = "shadowsocks-libevx" ]; then - echo "Unknown Working Directory, won't continue." - exit 1 - fi -fi -git clean -Xdf -git reset --hard HEAD -autoreconf --install -rm -f ../*.tar.xz ../*.deb ../*.tar.gz ../*.build ../*.dsc ../*.changes -CURR_PKG_DIR=$(pwd) -tar -czvf ../$(basename $CURR_PKG_DIR)_$(cat ./configure.ac | grep AC_INIT | grep -o '[0-9]\.[0-9]\.[0-9]').orig.tar.gz . --exclude-vcs -#dh_make --multi --createorig --yes --copyright gpl3 -A=$(which debuild > /dev/null 2> /dev/null; echo $?) -if [ "${A}x" = "0x" ]; then - debuild -us -uc -i -else - dpkg-buildpackage -us -uc -i -fi diff --git a/debian/control b/debian/control index 8a41e41c..20bd3dd2 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Architecture: any Multi-Arch: same Section: libs Priority: extra -Breaks: shadowsocks-libev (<< 2.3.1) +Breaks: shadowsocks-libev (<< 2.4.0) Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: lightweight and secure socks5 proxy (shared library) @@ -35,7 +35,7 @@ Package: libshadowsocks-dev Architecture: any Section: libdevel Priority: extra -Breaks: shadowsocks-libev (<< 2.3.1) +Breaks: shadowsocks-libev (<< 2.4.0) Depends: libshadowsocks1 (= ${binary:Version}), ${misc:Depends} Description: lightweight and secure socks5 proxy (development files) Shadowsocks-libev is a lightweight and secure socks5 proxy for @@ -47,7 +47,7 @@ Package: libshadowsocks-dbg Architecture: any Section: debug Priority: extra -Breaks: shadowsocks-libev (<< 2.3.1) +Breaks: shadowsocks-libev (<< 2.4.0) Depends: libshadowsocks1 (= ${binary:Version}), ${misc:Depends} Description: debugging symbols for the libshadowsocks1 library Shadowsocks-libev is a lightweight and secure socks5 proxy for