summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthewacon2019-05-27 18:57:35 -0400
committerMatthewacon2019-05-27 18:57:35 -0400
commit5fad9e332366ca7aa9bf5338c403830e17117b1b (patch)
treeaa0b0f0c9d61a95301e3bd377c32e401c90d57f1
downloadaur-5fad9e332366ca7aa9bf5338c403830e17117b1b.tar.gz
Initial commit
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD54
-rw-r--r--stunnel@.service20
3 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..523a0e80ae04
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = stunnel-systemd-git
+ pkgdesc = A program that allows you to encrypt arbitrary TCP connections inside SSL
+ pkgver = 5.54
+ pkgrel = 1
+ url = https://www.stunnel.org/
+ arch = x86_64
+ license = GPL2
+ makedepends = git
+ makedepends = automake
+ makedepends = pkgconf
+ makedepends = libtool
+ makedepends = autoconf-archive
+ depends = libnsl
+ depends = openssl
+ depends = systemd
+ provides = stunnel
+ conflicts = stunnel
+ source = stunnel-systemd-git::git+https://github.com/matthewacon/stunnel
+ source = stunnel@.service
+ md5sums = SKIP
+ md5sums = ca9e198adda46e3c31f45247b8439e74
+
+pkgname = stunnel-systemd-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2d711c999649
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer: Matthew Barichello <matthewjbarichello@gmail.com>
+
+_pkgname=stunnel
+pkgname=$_pkgname-systemd-git
+pkgver=5.54
+pkgrel=1
+pkgdesc="A program that allows you to encrypt arbitrary TCP connections inside SSL"
+arch=('x86_64')
+url='https://www.stunnel.org/'
+license=('GPL2')
+depends=('libnsl' 'openssl' 'systemd')
+makedepends=('git' 'automake' 'pkgconf' 'libtool' 'autoconf-archive')
+provides=($_pkgname)
+conflicts=($_pkgname)
+#backup=('/etc/stunnel/stunnel.conf-sample')
+source=($pkgname::'git+https://github.com/matthewacon/stunnel'
+ 'stunnel@.service')
+md5sums=('SKIP'
+ 'ca9e198adda46e3c31f45247b8439e74')
+
+pkgver() {
+ cd $pkgname
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd $pkgname
+ autoreconf -i -v
+ ./configure
+ make -j`nproc`
+ make check
+}
+
+package() {
+# _BASE_DIR="$(pwd)"
+ #Systemd service
+ install -Dm644 stunnel@.service "$pkgdir/usr/lib/systemd/system/stunnel@.service"
+ #Docs
+ _DOCS=(BUGS INSTALL CREDITS AUTHORS ChangeLog INSTALL.WCE INSTALL.W32 INSTALL.FIPS 'doc/stunnel.html' COPYRIGHT.GPL TODO 'doc/stunnel.pl.html' README PORTS COPYING)
+ cd "$pkgname"
+ for i in "${_DOCS[@]}"; do
+ install -Dm644 "$i" "$pkgdir/usr/share/doc/stunnel/$i"
+ done
+
+ #Binaries
+ install -Dm755 "src/stunnel" "$pkgdir/usr/bin/stunnel"
+ install -Dm755 "src/stunnel3" "$pkgdir/usr/bin/stunnel3"
+
+ #Library
+ install -Dm644 "src/.libs/libstunnel.so" "$pkgdir/usr/lib/libstunnel.so"
+
+ #Example config
+ install -Dm 644 "tools/stunnel.conf-sample" "$pkgdir/etc/stunnel/stunnel.conf-sample"
+ }
diff --git a/stunnel@.service b/stunnel@.service
new file mode 100644
index 000000000000..e0a30b8c2b25
--- /dev/null
+++ b/stunnel@.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=TLS tunnel for %I
+After=syslog.target network.target
+
+[Service]
+Type=forking
+ExecStartPre=mkdir -p /run/stunnel/%I/
+ExecStartPre=mkdir -p /var/log/stunnel/%I/
+WorkingDirectory=/etc/stunnel/
+ExecStart=/usr/bin/stunnel %I.conf
+PIDFile=/run/stunnel/%I/stunnel.pid
+ExecStopPost=rm -rf /run/stunnel/%I/
+CapabilityBoundingSet=CAP_IPC_LOCK CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SETGID CAP_SETUID CAP_SYS_CHROOT CAP_DAC_OVERRIDE CAP_AUDIT_WRITE
+ProtectSystem=true
+ProtectHome=true
+KillMode=processRestartSec=5s
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target