Name libproxy
Description Library handling all the details of proxy configuration
Version 0.5.10-r0
Package Base libproxy
Homepage https://github.com/libproxy/libproxy
Maintainers ['Natanael Copa <ncopa@alpinelinux.org>']
Contributors []
Distro-repo https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/community/libproxy
Sources ['$pkgname-0.5.10-r0.tar.gz::https://github.com/libproxy/libproxy/archive/refs/tags/0.5.10-r0.tar.gz']
Dependencies ['libc.musl-x86_64.so.1', 'libcurl.so.4', 'libduktape.so.207', 'libgio-2.0.so.0', 'libglib-2.0.so.0', 'libgobject-2.0.so.0']
Optional-Dependencies []
Build-Dependencies ['curl-dev', 'duktape-dev', 'glib-dev', 'gobject-introspection-dev', 'gsettings-desktop-schemas-dev', 'meson', 'python3', 'vala']
Provides ['so:libproxy.so.1=0.5.10', 'so:libpxbackend-1.0.so=0']
Builddate 29-06-2025 14:45:59
Architecture x86_64
Distro-Version v3.22
Licenses ['LGPL-2.0-or-later']
Hash Q1LeM+YMgTUK5ASjvAkHgqyVPsknY=
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libproxy
pkgver=0.5.10
pkgrel=0
pkgdesc="Library handling all the details of proxy configuration"
url="https://github.com/libproxy/libproxy"
arch="all"
license="LGPL-2.0-or-later"
makedepends="
	curl-dev
	duktape-dev
	glib-dev
	gobject-introspection-dev
	gsettings-desktop-schemas-dev
	meson
	python3
	vala
	"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-bin
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/libproxy/libproxy/archive/refs/tags/$pkgver.tar.gz"

# secfixes:
#   0.4.15-r9:
#     - CVE-2020-26154
#   0.4.15-r8:
#     - CVE-2020-25219

build() {
	abuild-meson \
		-Db_lto=true \
		-Dtests="$(want_check && echo true || echo false)" \
		-Ddocs=false \
		-Drelease=true \
		. output
	meson compile -C output
}

check() {
	meson test --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

bin() {
	pkgdesc="Binary to test libproxy"

	amove usr/bin/proxy
}

gnome3() {
	pkgdesc="$pkgdesc (GNOME 3 integration)"
	install_if="$pkgname=$pkgver-r$pkgrel gnome-desktop"

	amove usr/lib/libproxy/$pkgver/modules/config_gnome3.so
	amove usr/lib/pxgsettings
}

kde() {
	pkgdesc="$pkgdesc (KDE integration)"
	install_if="$pkgname=$pkgver-r$pkgrel plasma-desktop"

	amove usr/lib/libproxy/$pkgver/modules/config_kde.so
}

pacrunner() {
	pkgdesc="$pkgdesc (pacrunner integration)"

	amove usr/lib/libproxy/$pkgver/modules/config_pacrunner.so
}

sha512sums="
d1093a7a62ea3f2cfd50ba1c12f999dadc1a976ae778a70e4463a86ac31174541871a6ccbad98003056741303a92cececc80876b197a4319100d0a5b395cd779  libproxy-0.5.10.tar.gz
"