blob: aacedeecb69eb4ee24f965942a14b59159140f4a (
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
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openvpn
pkgver=2.4.8
pkgrel=4
pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
url="https://openvpn.net/"
arch="all"
license="custom"
subpackages="$pkgname-doc $pkgname-dev $pkgname-openrc $pkgname-auth-pam:pam"
depends="iproute2"
makedepends="openssl-dev lzo-dev linux-pam-dev linux-headers"
install="$pkgname.pre-install"
source="https://swupdate.openvpn.net/community/releases/openvpn-$pkgver.tar.xz
openvpn.initd
openvpn.confd
openvpn.up
openvpn.down
"
build() {
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc/openvpn \
--enable-crypto \
--enable-iproute2
make
}
check() {
make check
}
package() {
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="d37a768c7f8683c23ae0d73d7e9947b5a1dac26580b0d7fe72454319acfe40375fbe150e68daee865a78e0269740e4ac5c96cdb8a7f02a1287ea93752ee0be06 openvpn-2.4.8.tar.xz
111a1ce79bdb41b8a03c0d43f1fd87de8a0d5592a8b1bd878113af79adce3d0a3109badd92b5af9a0f80b6585473a1e01638f7e78e6baa8aac439f0708bc2a72 openvpn.initd
1f14d4bd7a4a026c276af048ce647501c15358c6b0d184e95c49be5b8184188c8edafb76ed94835cdbb314187ee3b5b3ccd852e3a47add0599814c402309bece openvpn.confd
cdb73c9a5b1eb56e9cbd29955d94297ce5a87079419cd626d6a0b6680d88cbf310735a53f794886df02030b687eaea553c7c569a8ea1282a149441add1c65760 openvpn.up
4456880d5c2db061219ba94e4052786700efa5e685f03b0d12d75a6023e3c0fc7b5242cc3d2bd3988e42fcd99701ab13a6257b1a0943b812318d30c64843ad27 openvpn.down"
|