diff options
Diffstat (limited to 'pcr/openswan/PKGBUILD')
-rw-r--r-- | pcr/openswan/PKGBUILD | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/pcr/openswan/PKGBUILD b/pcr/openswan/PKGBUILD index cc06d558a..5f68231e0 100644 --- a/pcr/openswan/PKGBUILD +++ b/pcr/openswan/PKGBUILD @@ -1,7 +1,8 @@ -# Contributor (Arch): xjpvictor Huang <ke [AT] xjpvictor [DOT] info> +# Contributor: uuwe +# Maintainer: xjpvictor Huang <ke [AT] xjpvictor [DOT] info> pkgname=openswan -pkgver=2.6.41 -pkgrel=1 +pkgver=2.6.42 +pkgrel=3 pkgdesc="Open Source implementation of IPsec for the Linux operating system" url="http://www.openswan.org" license=('GPL' 'custom') @@ -12,43 +13,50 @@ makedepends=('flex' 'bison') conflicts=('ipsec-tools') backup=(etc/ipsec.conf \ etc/ipsec.d/policies/{block,clear,clear-or-private,private,private-or-clear}) -source=(http://download.openswan.org/openswan/openswan-$pkgver.tar.gz +source=(http://download.openswan.org/openswan/openswan-$pkgver.tar.gz{,.asc} openswan.service) +validpgpkeys=('9A9A392AA8D738BA263458AAF51005129FC816CA') +md5sums=('22240ce28be48f051bfdc874083c8947' + 'SKIP' + 'd8b465c10838c72e31329d65011002b6') prepare() { - cd $srcdir/openswan-$pkgver + cd "${srcdir}/${pkgname}-${pkgver}" # Change install paths to Arch defaults sed -i 's|/usr/local|/usr|;s|libexec/ipsec|lib/openswan|;s|)/sbin|)/bin|' Makefile.inc + + # Replace invalid init script paths with systemd script path + sed -i 's/^INC_RCDIRS.*/INC_RCDIRS\?\=\/usr\/lib\/systemd\/scripts/' Makefile.inc } build() { - cd $srcdir/openswan-$pkgver - + cd "${srcdir}/${pkgname}-${pkgver}" make USE_XAUTH=true USE_OBJDIR=true programs } package() { - # Create /etc/rc.d for init script, and license directory - mkdir -p $pkgdir/{etc/rc.d,usr/share/licenses/openswan} + cd "${srcdir}/${pkgname}-${pkgver}" + + # Pre-create init script directory + mkdir -p "${pkgdir}"/usr/lib/systemd/scripts/ - cd $srcdir/openswan-$pkgver - make DESTDIR=$pkgdir install + make DESTDIR="${pkgdir}" install # Change permissions in /var - chmod 700 $pkgdir/var/run/pluto + mv "${pkgdir}"/var/run "${pkgdir}"/ + rm -r "${pkgdir}"/var + chmod 700 "${pkgdir}"/run/pluto # Copy License - cp LICENSE $pkgdir/usr/share/licenses/openswan + install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/openswan/LICENSE # Install init script - install -Dm644 ../openswan.service $pkgdir/usr/lib/systemd/system/openswan.service - mkdir $pkgdir/usr/lib/systemd/scripts/ - mv $pkgdir/etc/rc.d/ipsec $pkgdir/usr/lib/systemd/scripts/ipsec + install -Dm644 "${srcdir}"/openswan.service "${pkgdir}"/usr/lib/systemd/system/openswan.service + # fix manpages - mv $pkgdir/usr/man $pkgdir/usr/share/ + mv "${pkgdir}"/usr/man "${pkgdir}"/usr/share/ + # fix python2 - sed -i '1s|python|python2|' $pkgdir/usr/lib/openswan/verify + sed -i '1s|python|python2|' "${pkgdir}"/usr/lib/openswan/verify } -md5sums=('da2e8b02ecc30a408cc5766767fef84f' - 'd8b465c10838c72e31329d65011002b6') |