Name libnice
Description GLib ICE implementation
Version 0.1.22-r0
Package Base libnice
Homepage https://libnice.freedesktop.org/
Maintainers ['Natanael Copa <ncopa@alpinelinux.org>']
Contributors ['Leo <thinkabit.ukim@gmail.com>']
Distro-repo https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/community/libnice
Sources ['https://nice.freedesktop.org/releases/libnice-0.1.22-r0.tar.gz', 'libnice-meson-0.58.patch', 'test-pseudotcp.patch']
Dependencies ['libc.musl-x86_64.so.1', 'libgio-2.0.so.0', 'libglib-2.0.so.0', 'libgnutls.so.30', 'libgobject-2.0.so.0']
Optional-Dependencies []
Build-Dependencies ['glib-dev', 'gnutls-dev', 'gstreamer-dev', 'gobject-introspection-dev', 'meson']
Provides ['so:libnice.so.10=10.14.0', 'cmd:stunbdc=0.1.22-r0', 'cmd:stund=0.1.22-r0']
Builddate 03-01-2025 18:06:09
Architecture x86_64
Distro-Version v3.22
Licenses ['LGPL-2.1-or-later AND MPL-1.1']
Hash Q11vf/CoEozl959ZHec3xWVMVxZJ4=
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnice
pkgver=0.1.22
pkgrel=0
pkgdesc="GLib ICE implementation"
url="https://libnice.freedesktop.org/"
arch="all"
license="LGPL-2.1-or-later AND MPL-1.1"
makedepends="
	glib-dev
	gnutls-dev
	gstreamer-dev
	gobject-introspection-dev
	meson"
subpackages="
	$pkgname-dbg
	$pkgname-dev
	$pkgname-gstreamer:_gst"
source="https://nice.freedesktop.org/releases/libnice-$pkgver.tar.gz
	libnice-meson-0.58.patch
	test-pseudotcp.patch
	"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dgtk_doc=disabled \
		-Dtests="$(want_check && echo enabled || echo disabled)" \
		-Dexamples=disabled \
		-Dintrospection=enabled \
		-Dcrypto-library=gnutls \
		-Dgstreamer=enabled \
		-Dgupnp=disabled builddir
	meson compile -C builddir
}

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

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

_gst() {
	pkgdesc="Gstreamer 1.0 plugin for libnice"
	amove usr/lib/gstreamer-*
}

sha512sums="
c3aae2d36d2cec8654b87ecc464296711a4a64335052dfc1477f43f59e90341f7a6a01ebd4edf91a72d9ec425440e6dd0bd8f817c77e03578854e70193b3306b  libnice-0.1.22.tar.gz
c59962a20d554da909a993f5d83d8d96da927d0ac94cfef2f699468326509f5715e8f7054badd25d07819b733dcea13c308b72aff170c013f7004dadba960dd7  libnice-meson-0.58.patch
c2a7664e441a8f078e82a4557c015894007cf1f332af1055576924e6c5fc583b04bec01d652ae86f438b89ae200094bba391410523761a1911ff8aedf2488d94  test-pseudotcp.patch
"