From 8fbc0076a4827ddc6af92e0b9daa4c4c31450808 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 19 Jul 2013 01:10:32 -0700 Subject: Fri Jul 19 01:09:18 PDT 2013 --- community/stunnel/Makefile.patch | 21 ++++++++++++ community/stunnel/PKGBUILD | 61 +++++++++++++++++++++++++++++++++ community/stunnel/stunnel.install | 31 +++++++++++++++++ community/stunnel/stunnel.tmpfiles.conf | 1 + 4 files changed, 114 insertions(+) create mode 100644 community/stunnel/Makefile.patch create mode 100644 community/stunnel/PKGBUILD create mode 100644 community/stunnel/stunnel.install create mode 100644 community/stunnel/stunnel.tmpfiles.conf (limited to 'community/stunnel') diff --git a/community/stunnel/Makefile.patch b/community/stunnel/Makefile.patch new file mode 100644 index 000000000..27be911d6 --- /dev/null +++ b/community/stunnel/Makefile.patch @@ -0,0 +1,21 @@ +--- tools/Makefile.in 2010-03-31 04:45:09.000000000 -0500 ++++ tools/Makefile.in 2010-04-11 17:17:41.000000000 -0500 +@@ -334,8 +334,7 @@ + + info-am: + +-install-data-am: install-confDATA install-data-local \ +- install-examplesDATA ++install-data-am: install-confDATA install-examplesDATA + + install-dvi: install-dvi-am + +@@ -377,7 +376,7 @@ + clean-local distclean distclean-generic distclean-libtool \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-confDATA install-data install-data-am \ +- install-data-local install-dvi install-dvi-am \ ++ install-dvi install-dvi-am \ + install-examplesDATA install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ diff --git a/community/stunnel/PKGBUILD b/community/stunnel/PKGBUILD new file mode 100644 index 000000000..d3f225a88 --- /dev/null +++ b/community/stunnel/PKGBUILD @@ -0,0 +1,61 @@ +# $Id: PKGBUILD 92897 2013-06-18 09:22:57Z lfleischer $ +# Maintainer: Lukas Fleischer +# Contributor: Kaiting Chen +# Contributor: Daniel J Griffiths +# Contributor: Kevin Piche + +pkgname=stunnel +pkgver=4.56 +pkgrel=3 +pkgdesc="A program that allows you to encrypt arbitrary TCP connections inside SSL" +arch=('i686' 'x86_64') +url="http://www.stunnel.org" +license=('GPL') +depends=('openssl') +install=$pkgname.install +options=('!libtool') +source=("ftp://ftp.stunnel.org/stunnel/$pkgname-$pkgver.tar.gz"{,.asc} + 'Makefile.patch' + 'stunnel.tmpfiles.conf') + +md5sums=('ac4c4a30bd7a55b6687cbd62d864054c' + 'd68c7dd65d515c678cdde15bbf0ce344' + 'f15398497e10e080c2406d2fc541660c' + '2e065a39998e57727ee79887bbd1751e') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # don't create a certificate... + patch -p0 < "$srcdir/Makefile.patch" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-ipv6 \ + --disable-libwrap \ + --disable-fips + + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + for i in ca.pl importCA.sh; do + install -Dm755 "tools/$i" "$pkgdir/usr/share/stunnel/$i" + done + + install -Dm644 tools/stunnel.cnf "$pkgdir/etc/stunnel/stunnel.cnf" + install -Dm644 "$srcdir/stunnel.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/stunnel.conf" + + # move systemd service into place + install -dm755 "$pkgdir/usr/lib/systemd/system" + mv "tools/stunnel.service" "$pkgdir/usr/lib/systemd/system/" + + sed -e "s:/usr/var/lib/stunnel/:/var/run/stunnel:g" \ + -e "s:/usr/etc/stunnel/:/etc/stunnel/:g" \ + -e "s:no\(body\|group\):stunnel:g" \ + -i "$pkgdir/etc/stunnel/stunnel.conf-sample" +} diff --git a/community/stunnel/stunnel.install b/community/stunnel/stunnel.install new file mode 100644 index 000000000..d9998e4da --- /dev/null +++ b/community/stunnel/stunnel.install @@ -0,0 +1,31 @@ +post_install() { + # add stunnel group + if ! getent group stunnel >/dev/null 2>&1; then + groupadd -g 16 stunnel + fi + + # add stunnel user + if ! getent passwd stunnel >/dev/null 2>&1; then + useradd -u 16 -g stunnel -d /var/run/stunnel -s /bin/false stunnel + fi + + # create chroot dir if necessary. + if [ ! -d /var/run/stunnel ]; then + install -dm770 -o stunnel -g stunnel /var/run/stunnel + fi +} + +post_upgrade() { + post_install "$@" +} + +pre_remove() { + # remove users & groups + if getent passwd stunnel >/dev/null 2>&1; then + userdel stunnel + fi + + if getent group stunnel >/dev/null 2>&1; then + groupdel stunnel + fi +} diff --git a/community/stunnel/stunnel.tmpfiles.conf b/community/stunnel/stunnel.tmpfiles.conf new file mode 100644 index 000000000..f118e68a0 --- /dev/null +++ b/community/stunnel/stunnel.tmpfiles.conf @@ -0,0 +1 @@ +d /var/run/stunnel 0770 stunnel stunnel - -- cgit v1.2.3-54-g00ecf