# $Id: PKGBUILD 61992 2012-01-13 15:53:58Z lfleischer $ # Maintainer: Kaiting Chen # Contributor: Daniel J Griffiths # Contributor: Kevin Piche pkgname=stunnel pkgver=4.52 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 options=('!libtool') source=("ftp://ftp.stunnel.org/stunnel/$pkgname-$pkgver.tar.gz"{,.asc} 'Makefile.patch' 'stunnel.rc.d' 'stunnel.tmpfiles.conf') md5sums=('f5e713dda0e8efa659f372832ecd0c2c' '3e84d222525e724788d3c2b29b899610' 'f15398497e10e080c2406d2fc541660c' 'd42a1dda7b44aab73fba670fbcfcc8a6' '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 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 -Dm755 "$srcdir/stunnel.rc.d" "$pkgdir/etc/rc.d/stunnel" install -Dm644 "$srcdir/stunnel.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/stunnel.conf" # move systemd service into place install -dm755 "$pkgdir/lib/systemd/system" mv "tools/stunnel.service" "$pkgdir/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" }