Hi everyone,
for GNOME packages is the find-lang.sh script from the rpm-build package
especially useful, because it can find all the help files of a given program.
This works by adding the content of /usr/share/gnome/help/%name to the file
list (tagged with lang(language) for all language subdirs.
Most of the time it would be more useful if all help dirs of a given package
would be added by find-lang.
For instance, the gnome-core package contains help dirs for several programs,
including clock_applet, desk-guide_applet, fdl, fish_applet, ...
That's why I've added a switch for the find-lang script to make the above
easyer. Please have a look at the attached patch file.
CU
--
G�tz Waschk <> student of computer science <> university Rostock
http://www.informatik.uni-rostock.de/~waschk/waschk.asc for PGP key
--> Logout Fascism! <--
--- /usr/lib/rpm/find-lang.sh Wed Nov 14 18:57:20 2001
+++ find-lang.sh Wed Nov 21 12:31:00 2001
@@ -15,6 +15,9 @@
# 1999-10-19 Artur Frysiak <[EMAIL PROTECTED]>
# * added support for GNOME help files
# * start support for KDE help files
+# 2001-11-21 G�tz Waschk <[EMAIL PROTECTED]>
+# * added --with-all-gnome option
+# * removed unused KDE option
usage () {
cat <<EOF
@@ -30,7 +33,7 @@
to \$3.
Additional options:
--with-gnome find GNOME help files
- --with-kde find KDE help files (not implemented yet)
+ --with-all-gnome find all GNOME help files in TOP_DIR
--without-mo not find locales files
EOF
exit 1
@@ -51,7 +54,6 @@
shift
GNOME=#
-KDE=#
MO=
MO_NAME=$NAME.lang
@@ -59,10 +61,12 @@
case "${1}" in
--with-gnome )
GNOME=
+ GNAME=$NAME
shift
;;
- --with-kde )
- KDE_HELP=
+ --with-all-gnome)
+ GNOME=
+ GNAME='[^/]*'
shift
;;
--without-mo )
@@ -81,15 +85,15 @@
%defattr (644, root, root, 755)
s:'"$TOP_DIR"'::
'"$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
-'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%lang(\2) \1\2:
+'"$GNOME"'s:\(.*/gnome/help/'"$GNAME"'/\)\([^/_]\+\):%lang(\2) \1\2:
s:^\([^%].*\)::
s:%lang(C) ::
' > $MO_NAME
find $TOP_DIR -type d|sed '
s:'"$TOP_DIR"'::
-'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1:
-'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%dir %lang(\2) \1\2:
+'"$GNOME"'s:\(.*/gnome/help/'"$GNAME"'$\):%dir \1:
+'"$GNOME"'s:\(.*/gnome/help/'"$GNAME"'/\)\([^/_]\+\):%dir %lang(\2) \1\2:
s:^\([^%].*\)::
s:%lang(C) ::
' >> $MO_NAME