summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordacoit2015-06-15 19:40:11 -0500
committerdacoit2015-06-15 19:40:11 -0500
commitf61d891aab76108097bebb85ab99f5455f57577b (patch)
treef26ecef7ff993179e46c59059d6a5b7835676433
downloadaur-f61d891aab76108097bebb85ab99f5455f57577b.tar.gz
Initial commit to aur4. Version bump 2.6.42 -> 2.6.43
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD61
-rwxr-xr-xopenswan.service13
3 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..21378cd4e3fd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = openswan
+ pkgdesc = Open Source implementation of IPsec for the Linux operating system
+ pkgver = 2.6.43
+ pkgrel = 1
+ url = https://www.openswan.org
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = custom
+ makedepends = flex
+ makedepends = bison
+ depends = gmp
+ depends = perl
+ depends = iproute2
+ optdepends = python2
+ conflicts = ipsec-tools
+ backup = etc/ipsec.conf
+ backup = etc/ipsec.d/policies/block
+ backup = etc/ipsec.d/policies/clear
+ backup = etc/ipsec.d/policies/clear-or-private
+ backup = etc/ipsec.d/policies/private
+ backup = etc/ipsec.d/policies/private-or-clear
+ source = http://download.openswan.org/openswan/openswan-2.6.43.tar.gz
+ source = openswan.service
+ md5sums = 87c4d7d4e537df57dc8e67c60e514724
+ md5sums = d8b465c10838c72e31329d65011002b6
+
+pkgname = openswan
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ba73e6ca6f5e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: dacoit <dacoit at shazzlemail.com>
+# Contributor: xjpvictor Huang <ke [AT] xjpvictor [DOT] info>
+# Contributor: uuwe
+pkgname=openswan
+pkgver=2.6.43
+pkgrel=1
+pkgdesc='Open Source implementation of IPsec for the Linux operating system'
+url='https://www.openswan.org'
+arch=('i686' 'x86_64')
+license=('GPL' 'custom')
+depends=('gmp' 'perl' 'iproute2')
+makedepends=('flex' 'bison')
+optdepends=('python2')
+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"
+ 'openswan.service')
+
+prepare() {
+ cd "$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 "$pkgname-$pkgver"
+ make USE_XAUTH=true USE_OBJDIR=true programs || return 1
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ # Pre-create init script directory
+ mkdir -p "$pkgdir/usr/lib/systemd/scripts"
+
+ make DESTDIR="$pkgdir" install
+
+ # Change permissions in /var
+ mv "$pkgdir/var/run" "$pkgdir/"
+ rm -r "$pkgdir/var"
+ chmod 700 "$pkgdir/run/pluto"
+
+ # Copy License
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/openswan/LICENSE"
+
+ # Install service unit
+ install -Dm644 "$srcdir/openswan.service" "$pkgdir/usr/lib/systemd/system/openswan.service"
+
+ # fix manpages
+ mv "$pkgdir/usr/man" "$pkgdir/usr/share/"
+
+ # fix python2
+ sed -i '1s|python|python2|' "$pkgdir/usr/lib/openswan/verify"
+}
+md5sums=('87c4d7d4e537df57dc8e67c60e514724'
+ 'd8b465c10838c72e31329d65011002b6')
diff --git a/openswan.service b/openswan.service
new file mode 100755
index 000000000000..6d899705ccfb
--- /dev/null
+++ b/openswan.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Openswan daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/lib/systemd/scripts/ipsec --start
+ExecStop=/usr/lib/systemd/scripts/ipsec --stop
+ExecReload=/usr/lib/systemd/scripts/ipsec --restart
+Restart=always
+
+[Install]
+WantedBy=multi-user.target