blob: 511cf2d91e5b435d74ea66a023dec878df722cd7 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openvpn
pkgver=2.3.7
pkgrel=0
pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
url="http://openvpn.sourceforge.net/"
arch="all"
license="custom"
subpackages="$pkgname-dev $pkgname-doc $pkgname-auth-pam:pam"
depends="iproute2"
makedepends="openssl-dev lzo-dev linux-pam-dev linux-headers"
install="$pkgname.pre-install"
source="http://swupdate.openvpn.net/community/releases/$pkgname-$pkgver.tar.gz
openvpn.initd
openvpn.confd
openvpn.up
openvpn.down
"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc/openvpn \
--enable-ssl \
--enable-crypto \
--enable-password-save \
--enable-iproute2 \
|| return 1
make || return 1
cd plugin/down-root
make || return 1
cd ../..
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
rm "$pkgdir"/usr/lib/openvpn/plugins/*.la || return 1
# install samples
mkdir -p "$pkgdir"/usr/share/doc/$pkgname/samples
cp -a sample/sample-* "$pkgdir"/usr/share/doc/$pkgname/samples \
|| return 1
install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
# install init.d and conf.d
install -Dm755 "$srcdir"/openvpn.initd "$pkgdir"/etc/init.d/openvpn
install -Dm644 "$srcdir"/openvpn.confd "$pkgdir"/etc/conf.d/openvpn
# install up and down scripts
install -Dm755 "$srcdir"/openvpn.up "$pkgdir"/etc/openvpn/up.sh
install -Dm755 "$srcdir"/openvpn.down "$pkgdir"/etc/openvpn/down.sh
}
pam() {
pkgdesc="OpenVPN plugin for PAM authentication"
mkdir -p "$subpkgdir"/usr/lib/openvpn/plugins
mv "$pkgdir"/usr/lib/openvpn/plugins/*-auth-pam* \
"$subpkgdir"/usr/lib/openvpn/plugins/
}
md5sums="070bca95e478f88dff9ec6a221e2c3f7 openvpn-2.3.7.tar.gz
6587953f1ac10cf9261041b7527a6b55 openvpn.initd
9eca88cac6294027ec1bb7be74185c3a openvpn.confd
dc72fecd1a1bcef937603057cd6574b1 openvpn.up
dc3ff0bae442b9aedd947b8ffda1687a openvpn.down"
sha256sums="1f02a4cd6aeb6250ca9311560875b10ce8957a3c9101a8005bd1e17e5b03146e openvpn-2.3.7.tar.gz
ab7291aaf161020fb4c27a6f24ef0346c66d86f92d29cbd31723cc305502c247 openvpn.initd
330149a83684ddabe413d134d4c8efad4c88b18c2ab67165014deff5f7fffad2 openvpn.confd
848da0929c37b2112769232fbbdf61961b6107c6726d4b74d1ceb034b39ad5dd openvpn.up
39debebcd8c899f20e6d355cbc8eaab46e28b83a9f6c33a94c065688a4f3d2c7 openvpn.down"
sha512sums="35030eb432568e954d7d9543565c3c7d1268ff323e1a2da81047c497f3eeb6f4061d9cfc360aa98fe7c413282ee6d0eb70957d6d4a38d928348c706f20cb66df openvpn-2.3.7.tar.gz
7c7ca6c55a9d0b17bd0e525e2fa5b02895f9ee9cc7fa6be7d540a1a95ab1c5e36f7756b69f42e17b98cf15d94ce80c4315e567121d948be1a826e77dfcf66ff0 openvpn.initd
982ade883afbe2e656a9cbbe36c31c0e8b4f7bbbe5b63df9f7b834f02a9153032fb7445c85d3e91f62c68a7ddd13c3afbf420fb71cdd13d9c4b69f867bdd9f37 openvpn.confd
f904d6125ed1ddb48ea632c3b290a7a4a7a7436be0d46b323fc8c92f919f9d076fdc78ff7bed0dd65675f0bc3559e531e372b805fc11ef287efeeb4d54fe52f4 openvpn.up
5defd61edf11cc63f3f8f60bef7fa730c4bcdd2545d664bd94666dd3aea80bd9d190263d8835a555e4287a594f6fce0f52426aed49c60233ff637a2a6164a997 openvpn.down"
|