From 7f61253c682650026b3fe4c233410d2c0af06acb Mon Sep 17 00:00:00 2001 From: cao-fei8 Date: Fri, 6 Jan 2023 17:27:19 +0800 Subject: [PATCH] Fix install-gmo target to recompile gmo files only if needed Signed-off-by: cao-fei8 --- ...target-to-recompile-gmo-files-only-i.patch | 41 +++++++++++++++++++ rhash.spec | 7 +++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-install-gmo-target-to-recompile-gmo-files-only-i.patch diff --git a/0001-Fix-install-gmo-target-to-recompile-gmo-files-only-i.patch b/0001-Fix-install-gmo-target-to-recompile-gmo-files-only-i.patch new file mode 100644 index 0000000..1b5c184 --- /dev/null +++ b/0001-Fix-install-gmo-target-to-recompile-gmo-files-only-i.patch @@ -0,0 +1,41 @@ +From 9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261 Mon Sep 17 00:00:00 2001 +From: Aleksey +Date: Sun, 31 Oct 2021 02:49:04 +0300 +Subject: [PATCH] Fix install-gmo target to recompile gmo files only if needed + +--- + Makefile | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 6031e43..c127379 100644 +--- a/Makefile ++++ b/Makefile +@@ -293,7 +293,7 @@ clean-bindings: + + clean-local: + rm -f *.o $(RHASH_SHARED) $(RHASH_STATIC) +- rm -f po/*.gmo po/*.po~ ++ rm -f po/*.gmo po/*.po~ po/compile-gmo.tag + + distclean: clean-local + rm -f config.log config.mak $(SPECFILE) $(LIBRHASH_PC) +@@ -309,11 +309,14 @@ update-po: + msgmerge -U $$f po/rhash.pot; \ + done + +-compile-gmo: ++po/compile-gmo.tag: $(I18N_FILES) + for f in $(I18N_FILES); do \ + g=`basename $$f .po`; \ + msgfmt -o po/$$g.gmo $$f; \ + done ++ touch $@ ++ ++compile-gmo: po/compile-gmo.tag + + install-gmo: compile-gmo + for f in $(I18N_FILES); do \ +-- +2.33.0 + diff --git a/rhash.spec b/rhash.spec index 1334af6..e1a5bc8 100644 --- a/rhash.spec +++ b/rhash.spec @@ -1,6 +1,6 @@ Name: rhash Version: 1.4.2 -Release: 4 +Release: 5 Summary: Great utility for computing hash sums License: MIT URL: https://github.com/rhash/RHash @@ -10,6 +10,7 @@ Source0: https://github.com/rhash/RHash/archive/v%{version}/rhash-%{versi Patch0: Fix-bug-with-hash-options-in-check-mode.patch Patch1: RHash-1.4.2-sw.patch Patch2: 0001-fix-incorrect-total-message-in-check-embedded-mode.patch +Patch3: 0001-Fix-install-gmo-target-to-recompile-gmo-files-only-i.patch BuildRequires: gcc @@ -41,6 +42,7 @@ Documentation for rhash %patch1 -p1 %endif %patch2 -p1 +%patch3 -p1 sed -i -e '/^INSTALL_SHARED/s/644/755/' librhash/Makefile %build @@ -73,6 +75,9 @@ make test-shared %{_mandir}/man1/*.1* %changelog +* Fri Jan 6 2023 caofei - 1.4.2-5 +- Fix install-gmo target to recompile gmo files only if needed + * Fri Jan 6 2023 caofei - 1.4.2-4 - fix incorrect total message in check-embedded mode