# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=networkmanager-l2tp
pkgver=1.20.16
pkgrel=1
pkgdesc="L2TP support for NetworkManager"
url="https://github.com/nm-l2tp/NetworkManager-l2tp"
license="GPL-2.0-only"
arch="all"
makedepends="
	autoconf
	automake
	gettext-dev
	glib-dev
	gtk+3.0-dev
	gtk4.0-dev
	libnma-dev
	libsecret-dev
	libtool
	nss-dev
	openssl-dev>3
	ppp-dev
	python3
	"
depends="ppp xl2tpd strongswan"
source="https://github.com/nm-l2tp/NetworkManager-l2tp/releases/download/$pkgver/NetworkManager-l2tp-$pkgver.tar.xz
	gcc14.patch"
options="!check" #no check
builddir="$srcdir/NetworkManager-l2tp-$pkgver"
subpackages="$pkgname-lang"

build() {
	./autogen.sh
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--libexecdir=/usr/lib/NetworkManager \
		--with-pppd-plugin-dir=/usr/lib/pppd/2.5.0 \
		--with-gtk4
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d1a8364bae0116d556e1b554846df4efa415c0b84fa667181daae50ea706f7f62fa016290c35985667e9bda7ac237198575083dc816c05f16d6ac997da02aa7d  NetworkManager-l2tp-1.20.16.tar.xz
de3558ef97ef2b5669ddab39ede13485c849e7765b516e62b42a0eee1e222ae670c2d7dd30042e7a0841c0af0d9ace9613ce96bb14b8f20d6c9e531d8a060bef  gcc14.patch
"
