diff --git a/srcpkgs/pika-backup/patches/remove-git-describe.patch b/srcpkgs/pika-backup/patches/remove-git-describe.patch new file mode 100644 index 00000000000..37c0a028921 --- /dev/null +++ b/srcpkgs/pika-backup/patches/remove-git-describe.patch @@ -0,0 +1,17 @@ +diff --git a/src/meson.build b/src/meson.build +index 8f5e24f..f7444c4 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -19,12 +19,6 @@ cargo_env = { + 'CARGO_HOME': meson.project_build_root() / 'cargo', + 'LOCALEDIR': get_option('prefix') / get_option('localedir'), + 'APPLICATION_ID_SUFFIX': get_option('app_id_suffix'), +- 'GIT_DESCRIBE': run_command( +- 'git', +- '-C', meson.project_source_root(), +- 'rev-parse', '--short', 'HEAD', +- check: false +- ).stdout().strip(), + } + + cargo_build = custom_target( diff --git a/srcpkgs/pika-backup/template b/srcpkgs/pika-backup/template new file mode 100644 index 00000000000..a50a324cabc --- /dev/null +++ b/srcpkgs/pika-backup/template @@ -0,0 +1,25 @@ +# Template file for 'pika-backup' +pkgname=pika-backup +version=0.7.4 +revision=1 +build_style=meson +build_helper=rust +hostmakedepends="cargo pkg-config gettext itstool" +makedepends="rust-std libadwaita-devel gtk4-devel" +depends="borg" +checkdepends="borg openssh xvfb-run" +short_desc="GNOME Frontend for BorgBackup" +maintainer="fanyx " +license="GPL-3.0-or-later" +homepage="https://apps.gnome.org/en/PikaBackup/" +changelog="https://gitlab.gnome.org/World/pika-backup/-/raw/main/CHANGELOG.md" +distfiles="https://gitlab.gnome.org/World/pika-backup/-/archive/v${version}/pika-backup-v${version}.tar.gz" +checksum=80952f0b297d4269ff9080919e4d08ccbc1a4f50582f41f100c1296cc1a68abf +make_check_pre="xvfb-run" + +post_patch() { + if [ "$CROSS_BUILD" ]; then + vsed -i src/meson.build \ + -e "s%rust_target /%'${RUST_TARGET}' / &%" + fi +}