vp-build/srcpkgs/ghex/template

53 lines
1.4 KiB
Bash

# Template file for 'ghex'
pkgname=ghex
version=42.3
revision=1
build_style=meson
build_helper=gir
configure_args="-Dintrospection=$(vopt_if gir enabled disabled)
$(vopt_bool gtk_doc gtk_doc)"
hostmakedepends="pkg-config iso-codes gettext itstool glib-devel
desktop-file-utils gtk-update-icon-cache $(vopt_if gtk_doc gi-docgen)"
makedepends="gtk4-devel"
depends="hicolor-icon-theme desktop-file-utils iso-codes"
short_desc="Simple binary editor for GNOME"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only, GFDL-1.1-only"
homepage="https://gitlab.gnome.org/GNOME/ghex"
changelog="https://gitlab.gnome.org/GNOME/ghex/-/raw/ghex-42/NEWS"
distfiles="${GNOME_SITE}/ghex/${version%.*}/ghex-$version.tar.xz"
checksum=add40f8ab24921db30d27be58f00273201977d87fdc8d79eceadfa8b0e354def
build_options="gir gtk_doc"
build_options_default="gir gtk_doc"
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
}
libgtkhex_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove usr/lib/*.so.*
}
}
ghex-devel_package() {
depends="gtk4-devel libgtkhex>=${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_gtk_doc" ]; then
vmove usr/share/doc
fi
}
}