void-packages/srcpkgs/ghex/template

53 lines
1.5 KiB
Bash

# Template file for 'ghex'
pkgname=ghex
version=43.0
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 libadwaita-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-43/NEWS"
distfiles="${GNOME_SITE}/ghex/${version%.*}/ghex-${version}.tar.xz"
checksum=866c0622c66fdb5ad2a475e9cfcccb219a1c6431f009acb2291d43f2140b147e
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 libadwaita-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
}
}