void-packages/srcpkgs/rest/template

45 lines
1.3 KiB
Bash

# Template file for 'rest'
pkgname=rest
version=0.9.1
revision=1
build_style=meson
build_helper="gir"
configure_args="$(vopt_bool gir introspection) -Dexamples=false -Dsoup2=false
-Dca_certificates_path=/etc/ssl/certs/ca-certificates.crt"
hostmakedepends="pkg-config glib-devel gi-docgen"
makedepends="libsoup3-devel json-glib-devel libxml2-devel"
depends="ca-certificates"
short_desc="RESTful library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://gitlab.gnome.org/GNOME/librest"
changelog="https://gitlab.gnome.org/GNOME/librest/-/raw/master/NEWS"
distfiles="${GNOME_SITE}/rest/${version%.*}/rest-${version}.tar.xz"
checksum=9266a5c10ece383e193dfb7ffb07b509cc1f51521ab8dad76af96ed14212c2e3
# Package build options
build_options="gir"
build_options_default="gir"
pre_build() {
# help gi-docgen find gi files on cross
if [ -n "$CROSS_BUILD" ]; then
export XDG_DATA_DIRS=/usr/$XBPS_CROSS_TRIPLET/usr/share/
fi
}
rest-devel_package() {
depends="${sourcepkg}>=${version}_${revision} libglib-devel libsoup3-devel
libxml2-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/share/doc
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
}
}