void-packages/srcpkgs/NetworkManager/template

90 lines
2.9 KiB
Bash

# Template file for 'NetworkManager'
pkgname=NetworkManager
version=1.16.0
revision=2
build_style=meson
build_helper="gir"
configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
-Dlibaudit=no -Dovs=false -Dlibnm_glib=true -Dselinux=false
-Dmodify_system=true -Dpolkit_agent=true -Dsystemdsystemunitdir=no
-Dpppd=/usr/bin/pppd -Dqt=false
-Dpppd_plugin_dir=/usr/lib/pppd/2.4.7 -Dresolvconf=/usr/bin/resolvconf
-Ddhclient=/usr/bin/dhclient -Dkernel_firmware_dir=/usr/lib/firmware
-Ddnsmasq=/usr/bin/dnsmasq -Ddbus_conf_dir=/etc/dbus-1/system.d
-Dudev_dir=/usr/lib/udev -Dintrospection=$(vopt_if gir true false)
-Dvapi=$(vopt_if vala true false)
-Dsession_tracking=$(vopt_if elogind elogind no)"
hostmakedepends="gettext-devel glib-devel libxslt-devel pkg-config
intltool dbus-glib-devel jansson-devel $(vopt_if vala vala)
$(vopt_if gir 'python3-gobject')"
makedepends="libuuid-devel nss-devel dbus-glib-devel libgudev-devel
libnl3-devel polkit-devel ppp-devel iptables-devel libcurl-devel
ModemManager-devel readline-devel libndp-devel newt-devel jansson-devel
libpsl-devel eudev-libudev-devel
$(vopt_if gir libgirepository-devel) $(vopt_if elogind elogind-devel)"
depends="dbus dhclient iproute2 openresolv wpa_supplicant"
short_desc="Network Management daemon"
maintainer="Rasmus Thomsen <oss@cogitri.dev>"
license="GPL-2.0-or-later"
homepage="https://wiki.gnome.org/Projects/NetworkManager"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=8e962833b6ca03edda1bc57ed6614a7b8c2339531b44acef098d05f2324c5d2c
lib32disabled=yes
conf_files="/etc/${pkgname}/${pkgname}.conf"
make_dirs="
/etc/NetworkManager/system-connections 0755 root root
/etc/NetworkManager/dispatcher.d/pre-up.d 0750 root root
/etc/NetworkManager/dispatcher.d/pre-down.d 0750 root root
/etc/NetworkManager/VPN 0755 root root
/var/lib/NetworkManager 0755 root root
"
case "$XBPS_TARGET_MACHINE" in
*-musl)
CFLAGS+=" -DRTLD_DEEPBIND=0"
# Fail to build on musl
configure_args+=" -Dtests=no"
;;
esac
# Package build options
build_options="gir vala elogind"
build_options_default="gir vala"
pre_configure() {
if [ "$CROSS_BUILD" ]; then
# Replace the values from our patch into the system itself
sed -i -e "s|@XBPS_CROSS_BASE@|${XBPS_CROSS_BASE}|g" libnm/meson.build
fi
}
post_install() {
vinstall ${FILESDIR}/${pkgname}.conf 644 etc/${pkgname}
vsv ${pkgname}
}
libnm_package() {
short_desc+=" - shared libraries"
pkg_install() {
vmove "usr/lib/*.so.*"
if [ "$build_option_gir" ]; then
vmove usr/lib/girepository-1.0
fi
}
}
NetworkManager-devel_package() {
depends="dbus-glib-devel libnm-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
if [ "$build_option_vala" ]; then
vmove usr/share/vala
fi
}
}