summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Wang2017-11-15 01:45:10 -0600
committerNicholas Wang2017-11-15 01:45:10 -0600
commit941ac32e15cc76d76276e4fc2f7795edb97e2d48 (patch)
tree60e8af1259fff199ba0b472df10d1e537a0fbfcc
downloadaur-941ac32e15cc76d76276e4fc2f7795edb97e2d48.tar.gz
init commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD67
-rw-r--r--softethervpn-bridge.service19
-rw-r--r--softethervpn-client.service19
-rw-r--r--softethervpn-server.service19
5 files changed, 145 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6959238b33dd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = softethervpn-beta
+ pkgdesc = Multi-protocol VPN software from University of Tsukuba build with source code from official website's download center.
+ pkgver = 4.24.9651.beta
+ pkgrel = 1
+ url = http://www.softether.org/
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = git
+ depends = bash
+ depends = openssl
+ depends = zlib
+ source = softethervpn-bridge.service
+ source = softethervpn-client.service
+ source = softethervpn-server.service
+ sha1sums = 12a3919aabcdd7531320056a4b43072892232925
+ sha1sums = ba594c7defb52548369726c56e2cad633019abef
+ sha1sums = 06cd320553daf0dffdf6a81a22d630fbe211fc33
+
+pkgname = softethervpn-beta
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a3ffc9167f51
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer: Nicholas Wang <me@nicho1as.wang>
+# Contributor: ava1ar <mail(at)ava1ar(dot)me>
+
+pkgname=softethervpn-beta
+pkgver=4.24.9651.beta
+pkgrel=1
+pkgdesc="Multi-protocol VPN software from University of Tsukuba build with source code from
+official website's download center."
+url="http://www.softether.org/"
+arch=('i686' 'x86_64')
+source=('softethervpn-bridge.service'
+ 'softethervpn-client.service'
+ 'softethervpn-server.service')
+sha1sums=('12a3919aabcdd7531320056a4b43072892232925'
+ 'ba594c7defb52548369726c56e2cad633019abef'
+ '06cd320553daf0dffdf6a81a22d630fbe211fc33')
+license=('GPL2')
+depends=('bash' 'openssl' 'zlib')
+makedepends=('git')
+
+prepare() {
+ # clean existing sources if any
+ rm -rf "${srcdir}"/SoftEtherVPN
+
+ # cloning only last commit of master branch, since complete repository is pretty heavy
+ wget http://www.softether-download.com/files/softether/v4.24-9651-beta-2017.10.23-tree/Source_Code/softether-src-v4.24-9651-beta.tar.gz
+ tar xzvf softether-src-v4.24-9651-beta.tar.gz
+ mv v4.24-9651 SoftEtherVPN
+}
+
+build() {
+ cd "${srcdir}"/SoftEtherVPN
+
+ if [ "${CARCH}" == "i686" ]; then
+ cp src/makefiles/linux_32bit.mak Makefile
+ elif [ "${CARCH}" == "x86_64" ]; then
+ cp src/makefiles/linux_64bit.mak Makefile
+ fi
+
+ # Patches
+
+ # Disable client SSLv3
+ patch --binary -p1 < "${srcdir}"/disable_client_sslv3.patch
+
+ make
+}
+
+package(){
+ cd "${srcdir}"/SoftEtherVPN
+
+ install -Dm444 bin/vpnserver/hamcore.se2 "${pkgdir}"/usr/lib/softethervpn/hamcore.se2
+ install -d "${pkgdir}"/usr/bin
+
+ for inst in vpnclient vpnserver vpnbridge vpncmd
+ do
+ install -Dm755 bin/${inst}/${inst} "${pkgdir}"/usr/lib/softethervpn/${inst}/${inst}
+ ln -s /usr/lib/softethervpn/hamcore.se2 "${pkgdir}"/usr/lib/softethervpn/${inst}/hamcore.se2
+ echo "#!/bin/sh" > "${pkgdir}"/usr/bin/${inst}
+ echo /usr/lib/softethervpn/${inst}/${inst} '"$@"' >> "${pkgdir}"/usr/bin/${inst}
+ echo 'exit $?' >> "${pkgdir}"/usr/bin/${inst}
+ chmod 755 "${pkgdir}"/usr/bin/${inst}
+ done
+
+ install -d "${pkgdir}"/usr/lib/systemd/system
+ install -Dm644 "${srcdir}"/*.service "${pkgdir}"/usr/lib/systemd/system
+}
+
diff --git a/softethervpn-bridge.service b/softethervpn-bridge.service
new file mode 100644
index 000000000000..eba1ca3dda31
--- /dev/null
+++ b/softethervpn-bridge.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=SoftEther VPN Bridge
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/vpnbridge start
+ExecStop=/usr/bin/vpnbridge stop
+Restart=on-failure
+
+# Hardening
+PrivateTmp=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/usr/lib/softethervpn/vpnbridge
+
+[Install]
+WantedBy=multi-user.target
diff --git a/softethervpn-client.service b/softethervpn-client.service
new file mode 100644
index 000000000000..a9ae684f86dd
--- /dev/null
+++ b/softethervpn-client.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=SoftEther VPN Client
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/vpnclient start
+ExecStop=/usr/bin/vpnclient stop
+Restart=on-failure
+
+# Hardening
+PrivateTmp=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/usr/lib/softethervpn/vpnclient
+
+[Install]
+WantedBy=multi-user.target
diff --git a/softethervpn-server.service b/softethervpn-server.service
new file mode 100644
index 000000000000..87706aad7792
--- /dev/null
+++ b/softethervpn-server.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=SoftEther VPN Server
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/vpnserver start
+ExecStop=/usr/bin/vpnserver stop
+Restart=on-failure
+
+# Hardening
+PrivateTmp=yes
+ProtectHome=yes
+ProtectSystem=full
+ReadOnlyDirectories=/
+ReadWriteDirectories=-/usr/lib/softethervpn/vpnserver
+
+[Install]
+WantedBy=multi-user.target