blob: 73f4d9647e0b75a18ef1366c46659df09f75e186 (
plain) (
blame)
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
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Lee Starnes <lee@canned-death.us>
pkgname=openvpn
pkgver=2.4.6
pkgrel=1
pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
url="http://openvpn.sourceforge.net/"
arch="all"
license="custom"
subpackages="$pkgname-doc $pkgname-dev $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"
build() {
cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc/openvpn \
--enable-crypto \
--enable-iproute2
make
}
check() {
cd "$builddir"
make check
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
# install samples
mkdir -p "$pkgdir"/usr/share/doc/$pkgname/samples
cp -a sample/sample-* "$pkgdir"/usr/share/doc/$pkgname/samples
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/
}
sha512sums="cdd70bfd03177bc6cb70d0d614e40389df00816b7097740b4cda9d7bee094d1463fdb5afeaf604c52c7b3167d1edb098a2e095e131a8b9fed0ed8b29da90cbe8 openvpn-2.4.6.tar.gz
3594937d4cc9d7b87ac6a3af433f651ed9695f41586994f9d9789554fbe3f87f054b997b89486eda4ae0b852d816aac9007222168d585910aa9f255073324bd9 openvpn.initd
6b2353aca9df7f43044e4e37990491b4ba077e259ebe13b8f2eb43e35ca7a617c1a65c5bfb8ab05e87cf12c4444184ae064f01f9abbb3c023dbbc07ff3f9c84e openvpn.confd
cdb73c9a5b1eb56e9cbd29955d94297ce5a87079419cd626d6a0b6680d88cbf310735a53f794886df02030b687eaea553c7c569a8ea1282a149441add1c65760 openvpn.up
4456880d5c2db061219ba94e4052786700efa5e685f03b0d12d75a6023e3c0fc7b5242cc3d2bd3988e42fcd99701ab13a6257b1a0943b812318d30c64843ad27 openvpn.down"
|