void-packages/srcpkgs/keypunch/template
2025-03-20 00:22:02 +01:00

28 lines
986 B
Bash

# Template file for 'keypunch'
pkgname=keypunch
version=5.1
revision=2
build_helper="rust"
build_style=meson
hostmakedepends="cargo rust gettext glib pkg-config blueprint-compiler
gtk4-devel libadwaita-devel"
makedepends="gtk4-devel libadwaita-devel rust-std"
short_desc="Practice your typing skills"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://apps.gnome.org/Keypunch/"
distfiles="https://github.com/bragefuglseth/keypunch/archive/refs/tags/v${version}.tar.gz"
checksum=98e69f91150373eea2a9ffb9c175db19ce867e62825c74ebf921923c6ae79408
post_patch() {
vsed -e 's/\(gtk_update_icon_cache: \)true/\1false/' \
-e 's/\(update_desktop_database: \)true/\1false/' \
-e "s/\(get_option('buildtype') != \)'release'/\1'plain'/" \
-i meson.build
vsed -e "s/\(get_option('buildtype') == \)'release'/\1'plain'/" \
-i src/meson.build
if [ "$CROSS_BUILD" ]; then
vsed -i src/meson.build \
-e "s%rust_target /%'${RUST_TARGET}' / &%"
fi
}