OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/update-desktop-files?expand=0&rev=3
This commit is contained in:
parent
c0d3a25ced
commit
0a251144c9
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bd4dd05c2a1a10e498023bcca332c130006fb0ce66ad0279a6bf57838c82c8ee
|
||||
size 3229925
|
||||
oid sha256:68921b3e1210bcbfe825dbe933b7d597cad694bee9677e984c1ae84e2ccd9f10
|
||||
size 54888
|
||||
|
@ -1,175 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# gnome1desktopiconv
|
||||
# Converts GNOME1 style desktop and directory files to UTF-8.
|
||||
# Author: Stanislav Brabec <sbrabec@suse.cz>
|
||||
|
||||
unset ${!CHARSET_*}
|
||||
CHARSET_aa=ISO-8859-1
|
||||
CHARSET_af=ISO-8859-1
|
||||
CHARSET_am=UTF-8
|
||||
CHARSET_an=ISO-8859-15
|
||||
CHARSET_ar=ISO-8859-6
|
||||
CHARSET_az=UTF-8
|
||||
CHARSET_be=CP1251
|
||||
CHARSET_bg=CP1251
|
||||
CHARSET_bn=UTF-8
|
||||
CHARSET_br=ISO-8859-1
|
||||
CHARSET_bs=ISO-8859-2
|
||||
CHARSET_byn=UTF-8
|
||||
CHARSET_ca=ISO-8859-1
|
||||
CHARSET_cs=ISO-8859-2
|
||||
CHARSET_cy=ISO-8859-14
|
||||
CHARSET_da=ISO-8859-1
|
||||
CHARSET_de=ISO-8859-1
|
||||
CHARSET_el=ISO-8859-7
|
||||
CHARSET_en=ISO-8859-1
|
||||
CHARSET_es=ISO-8859-1
|
||||
CHARSET_et=ISO-8859-1
|
||||
CHARSET_eu=ISO-8859-1
|
||||
CHARSET_fa=UTF-8
|
||||
CHARSET_fi=ISO-8859-1
|
||||
CHARSET_fo=ISO-8859-1
|
||||
CHARSET_fr=ISO-8859-1
|
||||
CHARSET_ga=ISO-8859-1
|
||||
CHARSET_gd=ISO-8859-15
|
||||
CHARSET_gez=UTF-8
|
||||
CHARSET_gl=ISO-8859-1
|
||||
CHARSET_gu=UTF-8
|
||||
CHARSET_gv=ISO-8859-1
|
||||
CHARSET_he=ISO-8859-8
|
||||
CHARSET_hi=UTF-8
|
||||
CHARSET_hr=ISO-8859-2
|
||||
CHARSET_hu=ISO-8859-2
|
||||
CHARSET_id=ISO-8859-1
|
||||
CHARSET_is=ISO-8859-1
|
||||
CHARSET_it=ISO-8859-1
|
||||
CHARSET_iw=ISO-8859-8
|
||||
CHARSET_ja=eucjp
|
||||
CHARSET_ka=GEORGIAN-PS
|
||||
CHARSET_kl=ISO-8859-1
|
||||
CHARSET_kn=UTF-8
|
||||
CHARSET_ko=euckr
|
||||
CHARSET_kw=ISO-8859-1
|
||||
CHARSET_lg=ISO-8859-10
|
||||
CHARSET_lo=UTF-8
|
||||
CHARSET_lt=ISO-8859-13
|
||||
CHARSET_lv=ISO-8859-13
|
||||
CHARSET_mi=ISO-8859-13
|
||||
CHARSET_mk=ISO-8859-5
|
||||
CHARSET_ml=UTF-8
|
||||
CHARSET_mn=UTF-8
|
||||
CHARSET_mr=UTF-8
|
||||
CHARSET_ms=ISO-8859-1
|
||||
CHARSET_mt=ISO-8859-3
|
||||
CHARSET_nb=ISO-8859-1
|
||||
CHARSET_ne=UTF-8
|
||||
CHARSET_nl=ISO-8859-1
|
||||
CHARSET_nn=ISO-8859-1
|
||||
CHARSET_no=ISO-8859-1
|
||||
CHARSET_oc=ISO-8859-1
|
||||
CHARSET_om=ISO-8859-1
|
||||
CHARSET_pa=UTF-8
|
||||
CHARSET_pl=ISO-8859-2
|
||||
CHARSET_pt=ISO-8859-1
|
||||
# Warning: Default is ISO-8859-5, but Russian GNOME1 translators have used KOI8-R without notify.
|
||||
CHARSET_ru=KOI8-R #ISO-8859-5
|
||||
CHARSET_ru_UA=KOI8-U
|
||||
CHARSET_ro=ISO-8859-2
|
||||
CHARSET_se=UTF-8
|
||||
CHARSET_sh=ISO-8859-2
|
||||
CHARSET_sid=UTF-8
|
||||
CHARSET_sk=ISO-8859-2
|
||||
CHARSET_sl=ISO-8859-2
|
||||
CHARSET_so=ISO-8859-1
|
||||
CHARSET_sq=ISO-8859-1
|
||||
CHARSET_sr=ISO-8859-2
|
||||
CHARSET_sr__Latn=ISO-8859-2
|
||||
CHARSET_st=ISO-8859-1
|
||||
CHARSET_sv=ISO-8859-1
|
||||
CHARSET_ta=UTF-8
|
||||
CHARSET_te=UTF-8
|
||||
CHARSET_tg=KOI8-T
|
||||
CHARSET_th=TIS-620
|
||||
CHARSET_tig=UTF-8
|
||||
CHARSET_ti=UTF-8
|
||||
CHARSET_tl=ISO-8859-1
|
||||
CHARSET_tr=ISO-8859-9
|
||||
CHARSET_uk=KOI8-U
|
||||
CHARSET_ur=UTF-8
|
||||
CHARSET_uz=ISO-8859-1
|
||||
CHARSET_vi=UTF-8
|
||||
CHARSET_wa=ISO-8859-1
|
||||
CHARSET_xh=ISO-8859-1
|
||||
CHARSET_yi=CP1255
|
||||
CHARSET_zu=ISO-8859-1
|
||||
CHARSET_zh=GB2312
|
||||
CHARSET_zh_SG=GB2312
|
||||
CHARSET_zh_HK=BIG5-HKSCS
|
||||
CHARSET_zh_TW=BIG5
|
||||
CHARSET_zh_TW___Big5=BIG5
|
||||
|
||||
if ! grep -q ^Encoding=Legacy-Mixed $1 ; then
|
||||
if grep -q ^Encoding= $1 ; then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo >&2 "$0 warning: File $1 is probably in deprecated Legacy-Mixed encoding. Converting to UTF-8."
|
||||
|
||||
exec <$1
|
||||
exec >$1.utf8
|
||||
|
||||
while read LINE ; do
|
||||
LNG=${LINE%%]=*}
|
||||
LNG=${LNG#Name[}
|
||||
LNG=${LNG#GenericName[}
|
||||
LNG=${LNG#Comment[}
|
||||
if test "$LNG" = "$LINE" ; then
|
||||
if test "$LINE" = Encoding=Legacy-Mixed ; then
|
||||
continue
|
||||
fi
|
||||
echo $LINE
|
||||
if test "$LINE" = "[Desktop Entry]" ; then
|
||||
echo "Encoding=UTF-8"
|
||||
fi
|
||||
else
|
||||
LNG=${LNG//@/__}
|
||||
LNG=${LNG//./___}
|
||||
eval LNC=\$CHARSET_$LNG
|
||||
if test -z "$LNC" ; then
|
||||
LNG=${LNG%%_*}
|
||||
eval LNC=\$CHARSET_$LNG
|
||||
if test -z "$LNC" ; then
|
||||
echo >&2 "$0 warning: Unknown encoding for $LNG. Assuming UTF-8."
|
||||
LNC=UTF-8
|
||||
fi
|
||||
fi
|
||||
# Try whether it is parsable as UTF-8.
|
||||
if test $LNC = UTF-8 ; then
|
||||
UTFLINE=$LINE
|
||||
else
|
||||
UTFLINE=$(echo "$LINE" | iconv 2>/dev/null -f UTF-8 -t UTF-8)
|
||||
if test $? -eq 0 ; then
|
||||
UTFLINE=$(echo "$LINE" | iconv 2>/dev/null -f UTF-8 -t ASCII)
|
||||
if test $? -gt 0 ; then
|
||||
echo >&2 "$0 warning: Following line seems to be already in UTF-8 instead of Legacy."
|
||||
echo >&2 "$LINE"
|
||||
UTFLINE=$LINE
|
||||
else
|
||||
UTFLINE=$LINE
|
||||
fi
|
||||
else
|
||||
UTFLINE=$(echo "$LINE" | iconv -f $LNC -t UTF-8)
|
||||
if test $? -gt 0 ; then
|
||||
echo >&2 "$0 error: Cannot convert following line."
|
||||
echo >&2 "$LINE"
|
||||
UTFLINE=$LINE
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
echo $UTFLINE
|
||||
fi
|
||||
done
|
||||
|
||||
mv $1.utf8 $1
|
@ -43,7 +43,7 @@ while [ "${1:0:1}" = "-" ]; do
|
||||
-D|--docpath)
|
||||
shift
|
||||
DOCPATH="${1}"
|
||||
if ! [ -r "$RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/en/$DOCPATH/index.docbook" -o -r $RPM_BUILD_ROOT/opt/gnome/share/gnome/help/$DOCPATH/C/$DOCPATH.xml -o -r $RPM_BUILD_ROOT/opt/gnome/share/gnome/help/${DOCPATH/\///C/} ] ; then
|
||||
if ! [ -r "$RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/en/$DOCPATH/index.docbook" -o -r $RPM_BUILD_ROOT/usr/share/gnome/help/$DOCPATH/C/$DOCPATH.xml -o -r $RPM_BUILD_ROOT/usr/share/gnome/help/${DOCPATH/\///C/} ] ; then
|
||||
echo WARNING: suse_update_desktop_file: DocPath target $DOCPATH for $FILE does not exist
|
||||
fi
|
||||
shift
|
||||
@ -129,7 +129,7 @@ fi
|
||||
#
|
||||
# find file
|
||||
#
|
||||
for i in /$RPM_BUILD_ROOT/opt/kde3/share/applications/kde/ /$RPM_BUILD_ROOT/opt/kde3/share/applnk /$RPM_BUILD_ROOT/opt/gnome/share/applications/ /$RPM_BUILD_ROOT/opt/gnome/share/gnome/apps/ /$RPM_BUILD_ROOT/usr/share/applications/ ; do
|
||||
for i in /$RPM_BUILD_ROOT/opt/kde3/share/applications/kde/ /$RPM_BUILD_ROOT/opt/kde3/share/applnk /$RPM_BUILD_ROOT/usr/share/applications/ /$RPM_BUILD_ROOT/usr/share/gnome/apps/ /$RPM_BUILD_ROOT/usr/share/applications/ ; do
|
||||
[ -e "$i" ] && DIRS="$DIRS $i"
|
||||
done
|
||||
if [ "${APPLICATION:0:1}" == "/" -a -e "$APPLICATION" ]; then
|
||||
@ -181,7 +181,7 @@ fi
|
||||
# esp. for susehelp
|
||||
FILE_DOCPATH=`sed -n -e '/^\[Desktop Entry\]/,/(\[.*|$)/ s,;, ,g' -e 's,^DocPath=\\(.*\\),\\1,p' ${FILE}`
|
||||
if [ -n "$FILE_DOCPATH" ] ; then
|
||||
if [ ! -r "$RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/en/$FILE_DOCPATH/index.docbook" ] && [ ! -r "$RPM_BUILD_ROOT/opt/gnome/share/gnome/help/$FILE_DOCPATH/C/$FILE_DOCPATH.xml" ] && [ ! -r $RPM_BUILD_ROOT/opt/gnome/share/gnome/help/${DOCPATH/\///C/} ] ; then
|
||||
if [ ! -r "$RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/en/$FILE_DOCPATH/index.docbook" ] && [ ! -r "$RPM_BUILD_ROOT/usr/share/gnome/help/$FILE_DOCPATH/C/$FILE_DOCPATH.xml" ] && [ ! -r $RPM_BUILD_ROOT/usr/share/gnome/help/${DOCPATH/\///C/} ] ; then
|
||||
echo WARNING: suse_update_desktop_file: DocPath target $FILE_DOCPATH for $FILE does not exist
|
||||
fi
|
||||
fi
|
||||
@ -196,7 +196,7 @@ CATIN="$CATIN ${CATEGORIES//;/ }"
|
||||
if [ -z "$CATIN" ]; then
|
||||
case "${FILE%/*}" in
|
||||
*/opt/kde3/*) CATIN="Qt KDE" ;;
|
||||
*/opt/gnome/*) CATIN="GTK" ;;
|
||||
*/usr/share/gnome*) CATIN="GTK" ;;
|
||||
esac
|
||||
fi
|
||||
unset CAT
|
||||
@ -236,7 +236,7 @@ fi
|
||||
#
|
||||
DOCPATH_IS_GUESS=false
|
||||
if [ -z "$DOCPATH" ] ; then
|
||||
if [ -f $RPM_BUILD_ROOT/opt/gnome/share/gnome/help/$APPLICATION/C/$APPLICATION.xml ] ; then
|
||||
if [ -f $RPM_BUILD_ROOT/usr/share/gnome/help/$APPLICATION/C/$APPLICATION.xml ] ; then
|
||||
DOCPATH=$APPLICATION
|
||||
DOCPATH_IS_GUESS=true
|
||||
fi
|
||||
@ -325,14 +325,6 @@ else
|
||||
X-SuSE-translate=false' $FILE > ${FILE}_ && mv ${FILE}_ $FILE
|
||||
fi
|
||||
|
||||
#
|
||||
# autoconvert old mixed encoded desktop files to Utf8
|
||||
#
|
||||
echo "$FILE" | grep -q /opt/gnome/share/gnome/apps/
|
||||
if [ "$?" == "0" ]; then
|
||||
sh /usr/share/update-desktop-files/legacy-mixed_to_utf8 "$FILE"
|
||||
fi
|
||||
|
||||
#
|
||||
# CheckHardware checking
|
||||
#
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 24 13:46:03 CEST 2007 - coolo@suse.de
|
||||
|
||||
- flush translations for another translation round
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 24 13:40:08 CEST 2007 - coolo@suse.de
|
||||
|
||||
- move /opt/gnome to /usr
|
||||
- deprecate GNOME1 support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 15 00:04:27 CET 2007 - dmueller@suse.de
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
Name: update-desktop-files
|
||||
Version: 10.3
|
||||
Release: 1
|
||||
Release: 7
|
||||
Summary: A Build Tool to Update Desktop Files
|
||||
License: GNU General Public License (GPL)
|
||||
Group: Development/Tools/Building
|
||||
@ -23,7 +23,6 @@ Source: suse_update_desktop_file.sh
|
||||
Source1: map-desktop-category.sh
|
||||
Source2: kappfinder.tar.bz2
|
||||
Source3: translate.pl
|
||||
Source4: legacy-mixed_to_utf8
|
||||
# pdb query --filter "needshw:sound" | sed -e "s, ,,g"
|
||||
Source5: packages-sound
|
||||
# pdb query --filter "needshw:3d" | sed -e "s, ,,g"
|
||||
@ -82,7 +81,7 @@ for lang in *; do
|
||||
done
|
||||
fi
|
||||
done
|
||||
install -m 0644 %SOURCE4 %SOURCE5 %SOURCE6 %SOURCE3 $RPM_BUILD_ROOT/usr/share/%name/
|
||||
install -m 0644 %SOURCE5 %SOURCE6 %SOURCE3 $RPM_BUILD_ROOT/usr/share/%name/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/%name/templates
|
||||
tar xfj %SOURCE2 -C $RPM_BUILD_ROOT/usr/share/%name/templates
|
||||
tar xfj %SOURCE7 -C $RPM_BUILD_ROOT/usr/share/%name/
|
||||
@ -122,6 +121,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/share/locale/*/LC_MESSAGES/*mo
|
||||
|
||||
%changelog
|
||||
* Tue Apr 24 2007 - coolo@suse.de
|
||||
- flush translations for another translation round
|
||||
* Tue Apr 24 2007 - coolo@suse.de
|
||||
- move /opt/gnome to /usr
|
||||
- deprecate GNOME1 support
|
||||
* Thu Mar 15 2007 - dmueller@suse.de
|
||||
- bump version
|
||||
* Thu Dec 07 2006 - coolo@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user