[packages/rpm-build-macros/fl] - find_lang 1.36: add --with-mate

glen glen at pld-linux.org
Sat Dec 22 19:45:52 CET 2012


commit 91511b26032dd68fd577b9973f18e95303456af2
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Dec 22 20:42:34 2012 +0200

    - find_lang 1.36: add --with-mate

 rpm-find-lang => find-lang.sh | 42 ++++++++++++++++++++++++++++++++++--------
 rpm-build-macros.spec         |  6 +++---
 2 files changed, 37 insertions(+), 11 deletions(-)
---
diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec
index 262b927..fe9c54a 100644
--- a/rpm-build-macros.spec
+++ b/rpm-build-macros.spec
@@ -1,15 +1,15 @@
 %define		rpm_macros_rev	1.654
-%define		find_lang_rev	1.35
+%define		find_lang_rev	1.36
 Summary:	PLD Linux RPM build macros
 Summary(pl.UTF-8):	Makra do budowania pakietów RPM dla Linuksa PLD
 Name:		rpm-build-macros
 Version:	%{rpm_macros_rev}
-Release:	1
+Release:	2
 License:	GPL
 Group:		Development/Building
 Source0:	rpm.macros
 Source1:	service_generator.sh
-Source3:	rpm-find-lang
+Source3:	find-lang.sh
 Source4:	dokuwiki-find-lang.sh
 Patch0:		disable-systemd.patch
 #Patchx: %{name}-pydebuginfo.patch
diff --git a/rpm-find-lang b/find-lang.sh
old mode 100644
new mode 100755
similarity index 84%
rename from rpm-find-lang
rename to find-lang.sh
index 8b440fa..14ae32d
--- a/rpm-find-lang
+++ b/find-lang.sh
@@ -14,27 +14,29 @@
 
 # Changes:
 #
-# 2006-08-28 Elan Ruusam�e <glen at pld-linux.org>
+# 2012-12-22 Elan Ruusamäe <glen at pld-linux.org>
+#   * added --with-mate
+# 2006-08-28 Elan Ruusamäe <glen at pld-linux.org>
 #   * fixed --all-name which got broken with last change.
-# 2006-08-09 Elan Ruusam�e <glen at pld-linux.org>
+# 2006-08-09 Elan Ruusamäe <glen at pld-linux.org>
 #   * huge performance boost for packages calling %find_lang multiple times (kde*i18n)
-# 2001-01-08 Micha� Kochanowicz <mkochano at pld.org.pl>
+# 2001-01-08 Michał Kochanowicz <mkochano at pld.org.pl>
 #   * --all-name support for KDE.
-# 2000-11-28 Rafa� Cygnarowski <pascalek at pld.org.pl>
+# 2000-11-28 Rafał Cygnarowski <pascalek at pld.org.pl>
 #   * next simple rule for KDE
-# 2000-11-12 Rafa� Cygnarowski <pascalek at pld.org.pl>
+# 2000-11-12 Rafał Cygnarowski <pascalek at pld.org.pl>
 #   * simple rules for KDE help files
-# 2000-06-05 Micha� Kochanowicz <mkochano at pld.org.pl>
+# 2000-06-05 Michał Kochanowicz <mkochano at pld.org.pl>
 #   * exact, not substring matching $NAME, i.e. find-lang top_dir NAME will
 #     no longer find /usr/share/locale/pl/LC_MESSAGES/<anything>NAME.mo.
-# 2000-04-17 Arkadiusz Mi�kiewicz <misiek at pld.org.pl>
+# 2000-04-17 Arkadiusz Miśkiewicz <misiek at pld.org.pl>
 #   * exit 1 when no files found
 # 1999-10-19 Artur Frysiak <wiget at pld.org.pl>
 #   * added support for GNOME help files
 #   * start support for KDE help files
 
 PROG=${0##*/}
-VERSION=1.35
+VERSION=1.36
 
 usage () {
 cat <<EOF
@@ -49,6 +51,7 @@ PACKAGE_NAME.lang unless \$3 is given in which case output is written
 to \$3.
 Additional options:
   --with-gnome		find GNOME help files
+  --with-mate		find MATE help files
   --with-kde		find KDE help files
   --with-omf		find OMF files
   --with-qm			find QT .qm files
@@ -81,6 +84,7 @@ fi
 shift
 
 GNOME='#'
+MATE='#'
 KDE='#'
 OMF='#'
 QM='#'
@@ -96,6 +100,11 @@ while test $# -gt 0; do
 		echo "$PROG: Enabling with GNOME"
 		shift
 		;;
+	--with-mate)
+  		MATE=''
+		echo "$PROG: Enabling with MATE"
+		shift
+		;;
 	--with-kde)
 		echo "$PROG: Enabling with KDE"
 		KDE=''
@@ -236,6 +245,23 @@ fi
 /^[^%]/d
 s:%lang(C) ::' >> $MO_NAME
 
+# mate
+(
+	if [ "$ALL_NAME" ]; then
+		fgrep $NAME __find.dirs
+	else
+		cat __find.dirs
+	fi
+) | sed '
+'"$NO_ALL_NAME$MATE"'s:\(.*/share/help/\)\([^/]\+\)\(/'"$NAME"'\)$:%lang(\2) \1\2\3:
+'"$NO_ALL_NAME$MATE"'s:\(.*/mate/help/'"$NAME"'$\):%dir \1:
+'"$NO_ALL_NAME$MATE"'s:\(.*/mate/help/'"$NAME"'/\)\([^/]\+\)$:%lang(\2) \1\2:
+'"$ALL_NAME$MATE"'s:\(.*/share/help/\)\([^/]\+\)\(/[^/]\+\)$:%lang(\2) \1\2\3:
+'"$ALL_NAME$MATE"'s:\(.*/mate/help/[^/]\+$\):%dir \1:
+'"$ALL_NAME$MATE"'s:\(.*/mate/help/[^/]\+/\)\([^/]\+\)$:%lang(\2) \1\2:
+/^[^%]/d
+s:%lang(C) ::' >> $MO_NAME
+
 # kde
 (
 	if [ "$ALL_NAME" ]; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-macros.git/commitdiff/91511b26032dd68fd577b9973f18e95303456af2



More information about the pld-cvs-commit mailing list