summaryrefslogtreecommitdiff
path: root/pcr/openswan
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/openswan')
-rw-r--r--pcr/openswan/PKGBUILD48
-rw-r--r--pcr/openswan/compile.patch11
-rwxr-xr-xpcr/openswan/openswan43
-rwxr-xr-xpcr/openswan/openswan.rc.d43
4 files changed, 28 insertions, 117 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')
diff --git a/pcr/openswan/compile.patch b/pcr/openswan/compile.patch
deleted file mode 100644
index 8ddff67f2..000000000
--- a/pcr/openswan/compile.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- openswan-2.6.23/Makefile 2009-09-09 02:42:54.000000000 +0200
-+++ Makefile 2009-12-30 10:13:53.000000000 +0100
-@@ -12,6 +12,8 @@
- # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- # for more details.
- #
-+CFLAGS=-fno-strict-aliasing
-+CXXFLAGS=-fno-strict-aliasing
-
-
- OPENSWANSRCDIR?=$(shell pwd)
diff --git a/pcr/openswan/openswan b/pcr/openswan/openswan
deleted file mode 100755
index 30bd0d56e..000000000
--- a/pcr/openswan/openswan
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
- start)
- stat_busy "Starting Openswan IPsec"
- /etc/rc.d/ipsec --start
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- add_daemon openswan
- fi
- ;;
- stop)
- stat_busy "Stopping Openswan IPsec"
- /etc/rc.d/ipsec --stop
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- rm_daemon openswan
- fi
- ;;
- restart)
- stat_busy "Restarting Openswan IPsec"
- /etc/rc.d/ipsec --restart
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- add_daemon openswan
- fi
- ;;
- status)
- /etc/rc.d/ipsec --status
- ;;
- *)
- echo "usage: $0 {start|stop|restart|status}"
-esac
-
diff --git a/pcr/openswan/openswan.rc.d b/pcr/openswan/openswan.rc.d
deleted file mode 100755
index 30bd0d56e..000000000
--- a/pcr/openswan/openswan.rc.d
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-case "$1" in
- start)
- stat_busy "Starting Openswan IPsec"
- /etc/rc.d/ipsec --start
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- add_daemon openswan
- fi
- ;;
- stop)
- stat_busy "Stopping Openswan IPsec"
- /etc/rc.d/ipsec --stop
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- rm_daemon openswan
- fi
- ;;
- restart)
- stat_busy "Restarting Openswan IPsec"
- /etc/rc.d/ipsec --restart
- if [ $? -gt 0 ]; then
- stat_fail
- else
- stat_done
- add_daemon openswan
- fi
- ;;
- status)
- /etc/rc.d/ipsec --status
- ;;
- *)
- echo "usage: $0 {start|stop|restart|status}"
-esac
-