!26 Fix install-gmo target to recompile gmo files only if needed

From: @cao-fei8 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
This commit is contained in:
openeuler-ci-bot 2023-01-06 09:51:02 +00:00 committed by Gitee
commit 9d8142e92f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From 9e4eeb1268149b24b7fbe0fc0fe91e3a266e6261 Mon Sep 17 00:00:00 2001
From: Aleksey <rhash.admin@gmail.com>
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

View File

@ -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 <caofei@xfusion.com> - 1.4.2-5
- Fix install-gmo target to recompile gmo files only if needed
* Fri Jan 6 2023 caofei<caofei@xfusion.com> - 1.4.2-4
- fix incorrect total message in check-embedded mode