diff --git a/debian/bin/vpnbridge b/debian/bin/vpnbridge deleted file mode 100755 index 93e0e6a6..00000000 --- a/debian/bin/vpnbridge +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpnbridge/vpnbridge "$@" -exit $? diff --git a/debian/bin/vpnclient b/debian/bin/vpnclient deleted file mode 100755 index dae45e13..00000000 --- a/debian/bin/vpnclient +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpnclient/vpnclient "$@" -exit $? diff --git a/debian/bin/vpncmd b/debian/bin/vpncmd deleted file mode 100755 index d3abbc4b..00000000 --- a/debian/bin/vpncmd +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpncmd/vpncmd "$@" -exit $? diff --git a/debian/bin/vpnserver b/debian/bin/vpnserver deleted file mode 100755 index f8e85f73..00000000 --- a/debian/bin/vpnserver +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpnserver/vpnserver "$@" -exit $? diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index fc27eb06..00000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -softether-vpn (0:4.04.9412-rtm) unstable; urgency=low - - * Testing debianization - - -- Dmitry Orlov Tue, 4 Feb 2014 20:24:43 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control index e25dd74e..bde6189b 100644 --- a/debian/control +++ b/debian/control @@ -1,80 +1,22 @@ -Source: softether-vpn +Source: softether Section: net Priority: optional -Maintainer: Dmitry Orlov -Build-Depends: debhelper (>= 7.0.50~), libncurses-dev, linux-libc-dev, libssl-dev, libreadline-dev, build-essential +Maintainer: Darik Horn +Build-Depends: debhelper (>= 7.0.50~), dh-autoreconf, libncurses-dev, linux-libc-dev, libssl-dev, libreadline-dev, build-essential Standards-Version: 3.9.1 Homepage: http://www.softether.org/ -Package: softether-vpnbridge -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, softether-vpncmd -Section: net -Description: VPN Bridge daemon - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - -Package: softether-vpnclient -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, softether-vpncmd -Section: net -Description: VPN Client daemon - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - -Package: softether-vpncmd +Package: softether Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Section: net -Description: Command line utils - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - -Package: softether-vpnserver -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, softether-vpncmd -Section: net -Description: VPN Server daemon - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - +Description: Softether VPN + SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's + most powerful and easy-to-use multi-protocol VPN software. It runs on Windows, + Linux, Mac, FreeBSD and Solaris. SoftEther VPN is open source. You can use + SoftEther for any personal or commercial use for free charge. SoftEther VPN is + an optimum alternative to OpenVPN and Microsoft's VPN servers. SoftEther VPN + has a clone-function of OpenVPN Server. You can integrate from OpenVPN to + SoftEther VPN smoothly. SoftEther VPN is faster than OpenVPN. SoftEther VPN + also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. No more need to pay + expensive charges for Windows Server license for Remote-Access VPN function. diff --git a/debian/dch-generate.sh b/debian/dch-generate.sh deleted file mode 100755 index 285ada5f..00000000 --- a/debian/dch-generate.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# use: ./debian/dch-generate.sh > ./debian/changelog -# desc: quick and dirty (emphasis on dirty) debian changelog generator for SoftEtherVPN -# -# Copyright (c) 2014 Sahal Ansari (github@sahal.info) -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 as published by the Free Software Foundation. - -# warning: the following file has CRLF line endings (Windows) -# the location of the following file is relative to this script -cbuild="../src/CurrentBuild.txt" - -# required for debian packaging -package="softether-vpn" -status="UNRELEASED" -# timezone in +hh:mm from UTC (+9 UTC) -tzone="+09:00" -# static changelog entry -entry="* See: http://www.softether.org/5-download/history" - -# are you a debian maintainer? -if [ -z "$DEBFULLNAME" ]; then - DEBFULLNAME="John Q. Sample" -fi -if [ -z "$DEBEMAIL" ]; then - DEBEMAIL="tamade@example.org" -fi - -# where am i located? in $DIR, of course! -DIR="$( cd "$( dirname "$0" )" && pwd )" -cd "$DIR" -# check if debian/changelog exists, check if $cbuild exists -if [ ! -e ./changelog ]; then - echo "Am I in debian/? I can't find changelog" - exit 1 -fi -if [ ! -e "$cbuild" ]; then - echo "This doesn't look like the SoftEtherVPN source tree. I can't find ""$cbuild" - exit 1 -fi - -# version and date info from $cbuild are put into array ${cbuildarray[@]} -# build "${cbuildarray[0]}", major version "${cbuildarray[1]}", -# release type "${cbuildarray[2]}", and date "${cbuildarray[3]}" -while IFS=$'\r\n' read -r line_data; do - cbuildarray[i]="${line_data##*[A-Z]\ }" - ((++i)) -done < "$cbuild" - -# "${cbuildarray[1]}" is converted from "406" to "4.06" using GNU awk -majorversion="$(echo "${cbuildarray[1]}" | awk '{sub(/[0-9]/,"&.",$0);print $0}')" - -# "${cbuildarray[3]}" is split and the second half is converted from -# from "131655" to "13:16:55" using GNU awk then it's put back together -# (like humpty dumpty) and sent to GNU date for conversion to UTC -time="$(echo "${cbuildarray[3]#*_}" | awk '{gsub(/[0-9][0-9]/,"&:",$0);print $0}')" -date="$(date -R --date="$(echo "${cbuildarray[3]%_*}"" ""${time%?}""$tzone")")" - -# print the new debian changelog -echo "$package"" (""$majorversion"".""${cbuildarray[0]}""-""${cbuildarray[2]}"") ""$status""; urgency=low" -echo -echo " ""$entry" -echo -echo " --"" ""$DEBFULLNAME"" <""$DEBEMAIL""> ""$date" - -exit 0 diff --git a/debian/init.d/vpnserver b/debian/init.d/vpnserver deleted file mode 100755 index 012e47bd..00000000 --- a/debian/init.d/vpnserver +++ /dev/null @@ -1,69 +0,0 @@ -#! /bin/sh -# -# Author: Dmitry Orlov -# From Debian skeleton (Tom deLombarde) -# - -set -e - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/qmsys/bin -DAEMON=/usr/bin/vpnserver -NAME=vpnserver -DESC="SoftEtherVPN Server" - -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -# Gracefully exit if the package has been removed. -test -x $DAEMON || exit 0 - -# Read config file if it is present. -#if [ -r /etc/default/$NAME ] -#then -# . /etc/default/$NAME -#fi - -case "$1" in - start) - echo -n "Starting $DESC: $NAME" - $DAEMON -start - echo "." - ;; - stop) - echo -n "Stopping $DESC: $NAME" - $DAEMON -stop - echo "." - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo -n "Reloading $DESC configuration..." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # $PIDFILE --exec $DAEMON - # echo "done." - #;; - restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # - echo -n "Restarting $DESC: $NAME" - $DAEMON -stop - sleep 1 - $DAEMON -start - echo "." - ;; - *) - # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/makefile.patch b/debian/makefile.patch deleted file mode 100644 index 9b2a723c..00000000 --- a/debian/makefile.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile 2014-02-04 21:20:33.422762017 +0000 -+++ Makefile.old 2014-02-04 21:20:10.298761727 +0000 -@@ -32,11 +32,11 @@ - - OPTIONS_LINK_RELEASE=-O2 -fsigned-char -m64 -lm -ldl -lrt -lpthread -lssl -lcrypto -lreadline -lncurses -lz - --INSTALL_BINDIR=/usr/bin/ --INSTALL_VPNSERVER_DIR=/usr/vpnserver/ --INSTALL_VPNBRIDGE_DIR=/usr/vpnbridge/ --INSTALL_VPNCLIENT_DIR=/usr/vpnclient/ --INSTALL_VPNCMD_DIR=/usr/vpncmd/ -+INSTALL_BINDIR=usr/bin/ -+INSTALL_VPNSERVER_DIR=usr/vpnserver/ -+INSTALL_VPNBRIDGE_DIR=usr/vpnbridge/ -+INSTALL_VPNCLIENT_DIR=usr/vpnclient/ -+INSTALL_VPNCMD_DIR=usr/vpncmd/ - - ifeq ($(DEBUG),YES) - OPTIONS_COMPILE=$(OPTIONS_COMPILE_DEBUG) diff --git a/debian/rules b/debian/rules index 8026117e..8bc660b9 100755 --- a/debian/rules +++ b/debian/rules @@ -5,20 +5,4 @@ CFLAGS := $(shell dpkg-buildflags --get CFLAGS) LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) %: - dh $@ - -override_dh_auto_configure: configure_config - -override_dh_auto_clean: - rm -fr Makefile* usr bin tmp src/bin/BuiltHamcoreFiles - -override_dh_auto_install: - patch -f < debian/makefile.patch - mkdir -p usr/bin - make install - -configure_config: - if [ $(shell uname -m) = 'x86_64' ]; then echo "1\n2\n" | ./configure; fi - if [ $(shell uname -m) = 'i686' ]; then echo "1\n1\n" | ./configure; fi - if [ $(shell uname -m) = 'armv6l' ]; then echo "1\n1\n" | ./configure; fi - + dh $@ --with autoreconf diff --git a/debian/softether-vpnbridge.install b/debian/softether-vpnbridge.install deleted file mode 100755 index 5d506f28..00000000 --- a/debian/softether-vpnbridge.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/bin/vpnbridge usr/bin/ -usr/vpnbridge opt/ diff --git a/debian/softether-vpnclient.install b/debian/softether-vpnclient.install deleted file mode 100755 index be384a10..00000000 --- a/debian/softether-vpnclient.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/bin/vpnclient usr/bin/ -usr/vpnclient opt/ diff --git a/debian/softether-vpncmd.install b/debian/softether-vpncmd.install deleted file mode 100755 index 4b6fbf2b..00000000 --- a/debian/softether-vpncmd.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/bin/vpncmd usr/bin/ -usr/vpncmd opt/ diff --git a/debian/softether-vpnserver.install b/debian/softether-vpnserver.install deleted file mode 100755 index c83cedb5..00000000 --- a/debian/softether-vpnserver.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/bin/vpnserver usr/bin/ -usr/vpnserver opt/ diff --git a/debian/softether.default b/debian/softether.default new file mode 100644 index 00000000..cc0548ec --- /dev/null +++ b/debian/softether.default @@ -0,0 +1,5 @@ +# Choose the SoftEther daemon to start. +#SOFTETHER_MODE=disabled +#SOFTETHER_MODE=vpnbridge +#SOFTETHER_MODE=vpnclient +SOFTETHER_MODE=vpnserver diff --git a/debian/softether.init b/debian/softether.init new file mode 100755 index 00000000..7109595e --- /dev/null +++ b/debian/softether.init @@ -0,0 +1,43 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: softether-vpn +# Required-Start: $local_fs $remote_fs $network $syslog $named +# Required-Stop: $local_fs $remote_fs $network $syslog $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# X-Interactive: true +# Short-Description: Start/stop SoftEther VPN Server +### END INIT INFO + +set -e + +. /etc/default/softether + +case $SOFTETHER_MODE in + (vpnbridge) + ;; + (vpnclient) + ;; + (vpnserver) + ;; + (*) + exit 0 + ;; +esac + +case $1 in + (start) + start-stop-daemon --verbose --oknodo --start --background --exec \ + "/usr/sbin/$SOFTETHER_MODE" -- execsvc + ;; + (stop) + start-stop-daemon --verbose --oknodo --stop --exec \ + "/usr/sbin/$SOFTETHER_MODE" -- execsvc + ;; + (restart) + "$0" stop && "$0" start + (*) + echo "error: Unknown command $1" 1>&2 + exit 1 + ;; +esac