# $Id: PKGBUILD 109329 2014-04-13 11:55:50Z lfleischer $ # Maintainer: Lukas Fleischer # Contributor: Kaiting Chen # Contributor: Daniel J Griffiths # Contributor: Kevin Piche pkgname=stunnel pkgver=5.01 pkgrel=1 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 source=("https://www.stunnel.org/downloads/$pkgname-$pkgver.tar.gz"{,.asc} 'Makefile.patch' 'stunnel.tmpfiles.conf') md5sums=('7b63266b6fa05da696729e245100da65' 'SKIP' '579f198ecb90a42fcbfd8a4e48006264' '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 make } package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install install -Dm644 tools/stunnel.cnf "$pkgdir/etc/stunnel/stunnel-openssl.cnf-sample" install -Dm644 tools/stunnel.service "$pkgdir/usr/lib/systemd/system/stunnel.service" install -Dm644 "$srcdir/stunnel.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/stunnel.conf" 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" }