blob: 26a2830d65c29eacc8b5aef07aeeb7110d366e97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Contributor: xjpvictor Huang <ke [AT] xjpvictor [DOT] info>
pkgname=openswan
pkgver=2.6.38
pkgrel=1
pkgdesc="Open Source implementation of IPsec for the Linux operating system"
url="http://www.openswan.org"
license=('GPL' 'custom')
arch=('i686' 'x86_64' 'mips64el')
depends=('iproute2>=2.6.8' 'gmp' 'perl')
makedepends=('flex' 'bison')
conflicts=('ipsec-tools' 'openswan')
provides=('openswan')
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
openswan.service)
build() {
cd $srcdir/openswan-$pkgver
# Change install paths to Arch defaults
sed -i 's|/usr/local|/usr|;s|libexec/ipsec|lib/openswan|' Makefile.inc
make USE_XAUTH=true USE_OBJDIR=true programs
}
package() {
cd $srcdir/openswan-$pkgver
# Create /etc/rc.d for init script, and license directory
mkdir -p $pkgdir/{etc/rc.d,usr/share/licenses/openswan}
make DESTDIR=$pkgdir install
# Change permissions in /var
chmod 700 $pkgdir/var/run/pluto
# Copy License
cp LICENSE $pkgdir/usr/share/licenses/openswan
# Install init script
install -Dm755 ../openswan $pkgdir/etc/rc.d/openswan
install -Dm644 ../openswan.service $pkgdir/usr/lib/systemd/system/openswan.service
mkdir $pkgdir/usr/lib/systemd/scripts/
cp $pkgdir/etc/rc.d/ipsec $pkgdir/usr/lib/systemd/scripts/ipsec
# fix manpages
mv $pkgdir/usr/man $pkgdir/usr/share/
}
md5sums=('13073eb5314b83a31be88e4117e8bbcd'
'543d84162761b9cc9ec319e938c4dd2a'
'd8b465c10838c72e31329d65011002b6')
|