commit 91511b26032dd68fd577b9973f18e95303456af2
Author: Elan Ruusamäe <[email protected]>
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 <[email protected]>
+# 2012-12-22 Elan Ruusamäe <[email protected]>
+#   * added --with-mate
+# 2006-08-28 Elan Ruusamäe <[email protected]>
 #   * fixed --all-name which got broken with last change.
-# 2006-08-09 Elan Ruusam�e <[email protected]>
+# 2006-08-09 Elan Ruusamäe <[email protected]>
 #   * huge performance boost for packages calling %find_lang multiple times 
(kde*i18n)
-# 2001-01-08 Micha� Kochanowicz <[email protected]>
+# 2001-01-08 Michał Kochanowicz <[email protected]>
 #   * --all-name support for KDE.
-# 2000-11-28 Rafa� Cygnarowski <[email protected]>
+# 2000-11-28 Rafał Cygnarowski <[email protected]>
 #   * next simple rule for KDE
-# 2000-11-12 Rafa� Cygnarowski <[email protected]>
+# 2000-11-12 Rafał Cygnarowski <[email protected]>
 #   * simple rules for KDE help files
-# 2000-06-05 Micha� Kochanowicz <[email protected]>
+# 2000-06-05 Michał Kochanowicz <[email protected]>
 #   * 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 <[email protected]>
+# 2000-04-17 Arkadiusz Miśkiewicz <[email protected]>
 #   * exit 1 when no files found
 # 1999-10-19 Artur Frysiak <[email protected]>
 #   * 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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to