@ -9,21 +9,89 @@
i n c l u d e $( TOPDIR ) / r u l e s . m k
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := softethervpn
PKG_NAME := softethervpn
PKG_VERSION := 4.21-9613
PKG_VERSION := 4.22-9634
PKG_VERREL := beta
PKG_VERREL := beta
PKG_VERDATE := 2016.04.24
PKG_VERDATE := 2016.11.27
PKG_RELEASE := 1
PKG_RELEASE := 1
PKG_SOURCE := softether-src-v$( PKG_VERSION) -$( PKG_VERREL) .tar.gz
PKG_SOURCE := softether-src-v$( PKG_VERSION) -$( PKG_VERREL) .tar.gz
PKG_SOURCE_URL := http://www.softether-download.com/files/softether/v$( PKG_VERSION) -$( PKG_VERREL) -$( PKG_VERDATE) -tree/Source_Code/
PKG_SOURCE_URL := http://www.softether-download.com/files/softether/v$( PKG_VERSION) -$( PKG_VERREL) -$( PKG_VERDATE) -tree/Source_Code/
PKG_MD5SUM := 928d882d5fc23e00f0a5fa4ebf292ab9
PKG_MD5SUM := 703d41b34ff49d008ddd329340a5a75e
PKG_BUILD_DIR := $( BUILD_DIR) /v$( PKG_VERSION)
PKG_BUILD_DIR := $( BUILD_DIR) /v$( PKG_VERSION)
HOST_BUILD_DIR := $( BUILD_DIR_HOST) /v$( PKG_VERSION)
PKG_LICENSE := GPL-2.0
PKG_LICENSE := GPL-2.0
PKG_LICENSE_FILES := COPYING
PKG_LICENSE_FILES := COPYING
i n c l u d e $( INCLUDE_DIR ) / n l s . m k
PKG_BUILD_DEPENDS := softethervpn/host
HAMCORE_SE2 := $( STAGING_DIR_HOST) /share/softethervpn/hamcore.se2
i n c l u d e $( INCLUDE_DIR ) / n l s . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / h o s t - b u i l d . m k
# Override CC to add fake libreadline to linker search path
HOSTCC += -L./src/readline
# Add defines to turn add_history() and readline() calls into no-ops
HOSTCC += -D'add_history(x)' -D'readline(x)=\"\"'
# Execute in host build directory
HOST_MAKE_FLAGS += -C $( HOST_BUILD_DIR)
# Select 32 or 64 bit Makefile for host build depending on host architecture
HOST_MAKE_FLAGS += -f src/makefiles/linux_$( if $( shell uname -m | grep 64) ,64,32) bit.mak
# Prevent calling upstream configure
d e f i n e H o s t / C o n f i g u r e
e n d e f
d e f i n e H o s t / C o m p i l e
# Prepare fake readline headers and library
mkdir -p $( HOST_BUILD_DIR) /src/readline
touch $( HOST_BUILD_DIR) /src/readline/readline.h
touch $( HOST_BUILD_DIR) /src/readline/history.h
ar rcs $( HOST_BUILD_DIR) /src/readline/libreadline.a
# Build hamcorebuilder using host compiler and let it generate
# the hamcore.se2 archive file
CC = " $( HOSTCC) " $( MAKE) $( HOST_MAKE_FLAGS) \
src/bin/BuiltHamcoreFiles/unix/hamcore.se2
e n d e f
d e f i n e H o s t / I n s t a l l
$( INSTALL_DIR) $( STAGING_DIR_HOST) /share/softethervpn
$( INSTALL_DATA) $( HOST_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2 $( HAMCORE_SE2)
e n d e f
# Tune CFLAGS for target
TARGET_CFLAGS += \
$( if $( CONFIG_OPENSSL_WITH_SSL3) ,,-DSSL_OP_NO_SSLv3) \
$( if $( filter mips mipsel,$( ARCH) ) ,-minterlink-mips16)
# Select 32 or 64 bit Makefile for target build depending on 64bit config symbol
MAKE_FLAGS += \
-f src/makefiles/linux_$( if $( CONFIG_ARCH_64BIT) ,64,32) bit.mak
# Map nonstandard CCFLAGS variable to standard TARGET_CFLAGS
MAKE_VARS += \
CCFLAGS = " $( TARGET_CFLAGS) "
d e f i n e B u i l d / C o n f i g u r e
# Fetch prebuilt hamcore.se2 from staging dir
$( INSTALL_DIR) $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix
$( CP) $( HAMCORE_SE2) $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2
# Portably set hamcore.se2 modtime to one day in the future
# to prevent rebuilding it
perl -e 'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \
$( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2
e n d e f
d e f i n e P a c k a g e / s o f t e t h e r v p n
d e f i n e P a c k a g e / s o f t e t h e r v p n
SECTION:= net
SECTION:= net
@ -36,10 +104,10 @@ define Package/softethervpn
e n d e f
e n d e f
d e f i n e P a c k a g e / s o f t e t h e r v p n / d e s c r i p t i o n
d e f i n e P a c k a g e / s o f t e t h e r v p n / d e s c r i p t i o n
S o f t E t h e r V P N ( "SoftEther" m e a n s "Software Ethernet" ) i s o n e o f t h e w o r l d ' s m o s t p o w e r f u l a n d e a s y - t o - u s e m u l t i - p r o t o c o l V P N s o f t w a r e d e v e l o p e d a s a n a c a d e m i c
S o f t E t h e r V P N ( "SoftEther" m e a n s "Software Ethernet" ) i s o n e o f t h e w o r l d ' s m o s t p o w e r f u l a n d e a s y - t o - u s e m u l t i - p r o t o c o l V P N s o f t w a r e d e v e l o p e d a s a n a c a d e m i c
p r o j e c t f r o m U n i v e r s i t y o f T s u k u b a , J a p a n . S o f t E t h e r V P N h a s s t r o n g c o m p a t i b i l i t y t o t o d a y ' s m o s t p o p u l a r V P N p r o d u c t s a m o n g t h e w o r l d . I t h a s t h e i n t e r o p e r a b i l i t y
p r o j e c t f r o m U n i v e r s i t y o f T s u k u b a , J a p a n . S o f t E t h e r V P N h a s s t r o n g c o m p a t i b i l i t y t o t o d a y ' s m o s t p o p u l a r V P N p r o d u c t s a m o n g t h e w o r l d . I t h a s t h e i n t e r o p e r a b i l i t y
w i t h O p e n V P N , L 2 T P , I P s e c , E t h e r I P , L 2 T P v 3 , C i s c o V P N R o u t e r s a n d M S - S S T P V P N C l i e n t s . S o f t E t h e r V P N i s t h e w o r l d ' s o n l y V P N s o f t w a r e w h i c h s u p p o r t s S S L - V P N ,
O p e n V P N , L 2 T P , E t h e r I P , L 2 T P v 3 a n d I P s e c a s a s i n g l e V P N s o f t w a r e . S o f t E t h e r V P N i s n o t o n l y a n a l t e r n a t i v e V P N s e r v e r t o e x i s t i n g V P N p r o d u c t s ( O p e n V P N ,
w i t h O p e n V P N , L 2 T P , I P s e c , E t h e r I P , L 2 T P v 3 , C i s c o V P N R o u t e r s a n d M S - S S T P V P N C l i e n t s . S o f t E t h e r V P N i s t h e w o r l d ' s o n l y V P N s o f t w a r e w h i c h s u p p o r t s S S L - V P N ,
O p e n V P N , L 2 T P , E t h e r I P , L 2 T P v 3 a n d I P s e c a s a s i n g l e V P N s o f t w a r e . S o f t E t h e r V P N i s n o t o n l y a n a l t e r n a t i v e V P N s e r v e r t o e x i s t i n g V P N p r o d u c t s ( O p e n V P N ,
I P s e c a n d M S - S S T P ) , b u t h a s a l s o o r i g i n a l s t r o n g S S L - V P N p r o t o c o l t o p e n e t r a t e a n y k i n d s o f f i r e w a l l s . U l t r a - o p t i m i z e d S S L - V P N P r o t o c o l o f S o f t E t h e r V P N
I P s e c a n d M S - S S T P ) , b u t h a s a l s o o r i g i n a l s t r o n g S S L - V P N p r o t o c o l t o p e n e t r a t e a n y k i n d s o f f i r e w a l l s . U l t r a - o p t i m i z e d S S L - V P N P r o t o c o l o f S o f t E t h e r V P N
h a s v e r y f a s t t h r o u g h p u t , l o w l a t e n c y a n d f i r e w a l l r e s i s t a n c e .
h a s v e r y f a s t t h r o u g h p u t , l o w l a t e n c y a n d f i r e w a l l r e s i s t a n c e .
e n d e f
e n d e f
@ -52,54 +120,6 @@ define Package/softethervpn/conffiles
/ u s r / l i b e x e c / s o f t e t h e r v p n / l a n g . c o n f i g
/ u s r / l i b e x e c / s o f t e t h e r v p n / l a n g . c o n f i g
e n d e f
e n d e f
i f e q ( $( CONFIG_OPENSSL_WITH_SSL 3) , y )
SE_FLAGS = -DSSL3_SUPPORT
e n d i f
i f e q ( $( ARCH ) , m i p s )
SE_FLAGS += -minterlink-mips16
e n d i f
i f e q ( $( ARCH ) , m i p s e l )
SE_FLAGS += -minterlink-mips16
e n d i f
d e f i n e B u i l d / C o n f i g u r e
if [ -v CONFIG_64BIT ] ; then cp $( PKG_BUILD_DIR) /src/makefiles/linux_64bit.mak $( PKG_BUILD_DIR) /Makefile; else cp $( PKG_BUILD_DIR) /src/makefiles/linux_32bit.mak $( PKG_BUILD_DIR) /Makefile; fi ;
e n d e f
d e f i n e B u i l d / C o m p i l e
# Softether compiles first a tool called hamcorebuilder which is essentially an archiver. Then the compilation calls this archiver to pack all
# resource files (*.html, *.config, .txt, readme, languages) it needs to run in an archive file called hamcore.se2. The three executables are then built
# and they will have a runtime dependency on this resource archive. By default OpenWRT build process cross compiles all targets in the makefile
# generating therefore an error when the archive is generated since the executable is crosscompiled to run on the router and instead it is run
# by the build host. The workaround is to compile the archiver with the host environment, generate the hamcore.se2 archive and cross compile everything
# again without regenerating the archive.
# we clean the last cross compiled version
make -C $( PKG_BUILD_DIR) clean
# we compile the hamcorebuilder utility and generate hamcore archive using host environment
make -C $( PKG_BUILD_DIR) src/bin/BuiltHamcoreFiles/unix/hamcore.se2
# we clean everything, but we save the built hamcore archive and we update its timestamp to avoid rebuilding the archive with cross compiled hamcorebuilder
mv $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2 $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2.1
make -C $( PKG_BUILD_DIR) clean
mv $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2.1 $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2
touch -d "`date -d 1day`" $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix/hamcore.se2
ls -la $( PKG_BUILD_DIR) /src/bin/BuiltHamcoreFiles/unix
# we cross compile everything from the scratch
$( MAKE) \
$( TARGET_CONFIGURE_OPTS) \
CCFLAGS = " $( SE_FLAGS) -I $( STAGING_DIR) /usr/include $( ICONV_CFLAGS) " \
LDFLAGS = " -L $( STAGING_DIR) /usr/lib $( ICONV_LDFLAGS) " \
-C $( PKG_BUILD_DIR)
e n d e f
d e f i n e P a c k a g e / s o f t e t h e r v p n / i n s t a l l
d e f i n e P a c k a g e / s o f t e t h e r v p n / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/libexec/softethervpn
$( INSTALL_DIR) $( 1) /usr/libexec/softethervpn
$( INSTALL_BIN) $( PKG_BUILD_DIR) /bin/vpnserver/vpnserver $( 1) /usr/libexec/softethervpn
$( INSTALL_BIN) $( PKG_BUILD_DIR) /bin/vpnserver/vpnserver $( 1) /usr/libexec/softethervpn
@ -129,3 +149,4 @@ define Package/softethervpn/install
e n d e f
e n d e f
$( eval $ ( call BuildPackage ,softethervpn ) )
$( eval $ ( call BuildPackage ,softethervpn ) )
$( eval $ ( call HostBuild ) )