summaryrefslogtreecommitdiff
path: root/openvpn3/PKGBUILD
blob: 3939d99d023cdc08809d7dbdbb3e8e2bd3869eda (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
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Byeonghoon Yoo <bh322yoo gmail com>

_pkgname=openvpn3-linux
pkgname=openvpn3
pkgver=20
pkgrel=9
pkgdesc='OpenVPN 3 Linux client'
arch=('i486' 'i686' 'pentium4' 'x86_64' 'aarch64' 'armv7h')
url="https://github.com/OpenVPN/$_pkgname"
license=('AGPL3')
_pinned_dependencies=(
  'abseil-cpp=20230802.1'
  'gcc-libs=13.2.1'
  'glibc>=2.37'
  'libcap-ng.so=0'
  'libcrypto.so=3'
  'libgio-2.0.so=0'
  'libglib-2.0.so=0'
  'libgobject-2.0.so=0'
  'libjsoncpp.so=25'
  'libnl-3.so=200'
  'libnl-genl-3.so=200'
  'libprotobuf.so=25'
  'libssl.so=3'
  'libsystemd.so=0'
  'libuuid.so=1'
  'lz4=1:1.9.4'
  'tinyxml2=10.0.0'
)
depends=(
  'glib2>=2.50' 'jsoncpp>=0.10.5' 'libcap-ng>=0.7.5' 'lz4>=1.7.3' 'util-linux-libs>=2.23.2' 'protobuf>=2.4.0'
  'python-dbus' 'python-gobject' 'python-systemd' 'tinyxml2>=2.1.0' 'libnl>=3.2.29'
  "${_pinned_dependencies[@]}"
)
optdepends=(
  'openssl: OpenSSL version' 'mbedtls: mbed TLS version' 'polkit>=0.105: for systemd-resolved integration'
  'repkg: Automatically rebuild the package on dependency updates'
)
makedepends=(
  'autoconf-archive' 'git' 'python-docutils' 'python-jinja' 'bash'
)
source=(
  "git+https://github.com/OpenVPN/$_pkgname.git#tag=v${pkgver}"
  'openvpn3.rule'
  'openvpn3.install'
  'sysusers-openvpn3.conf'
)
sha256sums=(
  'SKIP'
  'ec0b8e28ae77b4b074d3eb8a084626e6dcfc587a07bef5d53fe1c6e160c0fc01'
  'a5879d9e637658f5127e849d17f4050bae1f82fa9b25f05bbbbb531867120e8b'
  '045e914bb6fff5a082314dfc805bb511c9a80170619fa1e94a07825fa977c90a'
)

build() {
  cd "$_pkgname"
  ./bootstrap.sh
  ./configure \
    --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --localstatedir=/var \
    --enable-bash-completion --enable-dco
  make
}

check() {
  cd "$_pkgname"

  make check
}

package() {
  cd "$_pkgname"
  make DESTDIR="$pkgdir" install
  install -Dm644 "$srcdir/$_pkgname/src/shell/bash-completion/openvpn3" "$pkgdir/usr/share/bash-completion/completions/openvpn3"
  install -Dm644 "../${pkgname}.rule" "$pkgdir/etc/repkg/rules/system/${pkgname}.rule"
  install -Dm644 "../sysusers-$pkgname.conf"  "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
}