# Maintainer: Erich Eckner # Contributor: Byeonghoon Yoo _pkgname=openvpn3-linux pkgname=openvpn3 pkgver=22_dev pkgrel=14 pkgdesc='OpenVPN 3 Linux client' arch=('i486' 'i686' 'pentium4' 'x86_64' 'aarch64' 'armv7h') url="https://codeberg.org/OpenVPN/$_pkgname" license=('AGPL3') _pinned_dependencies=( 'abseil-cpp=20240722.0' 'gcc-libs=14.2.1+r134+gab884fffe3fc' 'glibc>=2.37' 'libcap-ng.so=0' 'libcrypto.so=3' 'libgdbuspp.so=1' 'libgio-2.0.so=0' 'libglib-2.0.so=0' 'libjsoncpp.so=26' 'liblz4.so=1' 'libnl-3.so=200' 'libnl-genl-3.so=200' 'libprotobuf.so=28.3.0' 'libssl.so=3' 'libsystemd.so=0' 'libuuid.so=1' 'tinyxml2=10.0.0' ) depends=( 'glib2>=2.56' 'jsoncpp>=0.10.5' 'libcap-ng>=0.7.5' 'lz4>=1.8.4' 'util-linux-libs>=2.23.2' 'protobuf>=2.4.0' 'python-dbus' 'python-gobject' 'python-systemd' 'tinyxml2>=2.1.0' 'libnl>=3.2.29' gdbuspp "${_pinned_dependencies[@]}" ) optdepends=( 'openssl: OpenSSL version' 'mbedtls: mbed TLS version' 'polkit>=0.112: for systemd-resolved integration' 'repkg: Automatically rebuild the package on dependency updates' ) makedepends=( 'python-docutils' 'python-jinja' 'meson' ) source=( "https://swupdate.openvpn.net/community/releases/${_pkgname}-${pkgver}.tar.xz" 'openvpn3.rule' 'sysusers-openvpn3.conf' ) sha256sums=( 'ad8f373814bfbefd12f9824d57badef4535f6c1fde68d2c73d7ee14863547cb6' 'ec0b8e28ae77b4b074d3eb8a084626e6dcfc587a07bef5d53fe1c6e160c0fc01' '045e914bb6fff5a082314dfc805bb511c9a80170619fa1e94a07825fa977c90a' ) install=openvpn3.install prepare() { meson subprojects download --sourcedir="${_pkgname}-${pkgver}" } build() { env CXXFLAGS="$CXXFLAGS -Wno-error=non-virtual-dtor" \ arch-meson \ -Dselinux=disabled \ -Dselinux_policy=disabled \ -Dbash-completion=enabled \ -Dtest_programs=disabled \ -Dunit_tests=disabled \ "${_pkgname}-${pkgver}" \ _builddir meson compile -C _builddir } package() { meson install -C _builddir --destdir "$pkgdir" install -Dm644 "${pkgname}.rule" "$pkgdir/etc/repkg/rules/system/${pkgname}.rule" install -Dm644 "sysusers-$pkgname.conf" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" } post_install() { openvpn3-admin init-config --write-configs --force systemctl reload dbus }