# # spec file for package kde4-l10n (Version 4.2.2) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild # icecream 0 BuildRequires: cmake libkde4-devel recode update-desktop-files %if %suse_version > 1020 BuildRequires: fdupes %endif Name: kde4-l10n Url: http://l10n.kde.org/ License: GPL v2 or later Group: System/Localization Summary: English translations for KDE Version: 4.3.5 Release: 1 %define kdepim_version %version BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch #@SOURCES@ Source100: COPYING Source101: texts Source102: update_spec.pl Source103: pre_checkin.sh %define build_languages @LANGUAGES@ %define split_languages @SPLITLANGS@ %description All the requirements for a translated desktop. This package contains application translations, help files, and screenshots. Authors: -------- The KDE Team #@PACKAGES@ %prep mkdir %name-%version %setup -q @SETUP_LIST@ #@EXTRACT@ for i in %build_languages; do cd ../kde-l10n-$i-%version || exit 1 if test "%{kdepim_version}" != "%version"; then for skip in koffice kdepim; do rm -rf */$skip for c in */CMakeLists.txt; do sed -i -e "s,add_subdirectory( *$skip *),," $c done done for d in data docs messages; do for m in kdepimlibs kdepim; do if test -d ../kde-l10n-$i-%{kdepim_version}/$d/$m ; then rm -rf $d/$m mv ../kde-l10n-$i-%{kdepim_version}/$d/$m $d/$m fgrep -q "($m)" $d/CMakeLists.txt || echo "add_subdirectory($m)" >> $d/CMakeLists.txt fi done done fi done %build for i in %build_languages; do pushd ../kde-l10n-$i-%version %cmake_kde4 %make_jobs popd done %install for i in %build_languages; do pushd ../kde-l10n-$i-%version make DESTDIR=%{buildroot} install/fast popd mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i install -m 644 %{SOURCE100} $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i done for i in %split_languages; do mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i-doc install -m 644 %{SOURCE100} $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i-doc mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i-data install -m 644 %{SOURCE100} $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i-data done # hacks rm -f $RPM_BUILD_ROOT/usr/share/locale/*/flag.png rm -f $RPM_BUILD_ROOT/usr/share/locale/*/charset # # convert man-pages from xml to utf-8: # for i in $RPM_BUILD_ROOT/usr/share/man/*/*/*.[0-9].gz do if [ -f $i ] ; then gunzip $i; fi done for i in $RPM_BUILD_ROOT/usr/share/man/*/*/*.[0-9] do if [ ! -f $i ]; then break fi if iconv -s -c -f ascii -t ascii >/dev/null ; then # it is ascii, conversion from xml to utf-8 is safe recode xml..utf-8 $i else if iconv -s -c -f utf-8 -t utf-8 >/dev/null ; then # it is already utf-8, do nothing : else # it is iso-8859-1, conversion from xml to utf-8 is safe recode xml..utf-8 $i fi fi done # # remove unwanted files # rm -f ${RPM_BUILD_ROOT}/opt/kde3/share/locale/*/charset find ${RPM_BUILD_ROOT}/usr/share/doc/kde/HTML/ -type l -name common -print0 | xargs -0 rm # rm -f files.* files.data.* files.doc.* for i in %build_languages sr@latin; do turtlelang=$i filename=$i case $i in de) turtlelang=de_DE ;; mk) turtlelang=mk_MK ;; fr) turtlelang=fr_FR ;; sr@latin) filename=sr ;; esac { echo "%defattr(-,root,root)" if test -d $RPM_BUILD_ROOT/usr/share/locale/$i; then echo "%lang($i) /usr/share/locale/$i/LC_MESSAGES/*.mo" fi if test -d $RPM_BUILD_ROOT/usr/share/locale/$i/LC_SCRIPTS; then echo "%lang($i) /usr/share/locale/$i/LC_SCRIPTS/*" echo "%dir /usr/share/locale/$i/LC_SCRIPTS" fi if test -f $RPM_BUILD_ROOT/usr/share/locale/$i/entry.desktop; then echo "%lang($i) /usr/share/locale/$i/entry.desktop" fi if test -d $RPM_BUILD_ROOT/usr/share/man/$i; then echo "%lang($i) /usr/share/man/$i" fi for d in $RPM_BUILD_ROOT/usr/share/icons/*/*/*/l10n/$i $RPM_BUILD_ROOT/usr/share/icons/*/scalable/*/*/*/l10n/$i; do if test -d $d; then echo "%lang($i) ${d##$RPM_BUILD_ROOT}" echo "%dir ${d##$RPM_BUILD_ROOT}/../" fi done if test "$i" = "sr@latin"; then echo "/usr/share/doc/packages/kde4-l10n-sr" else echo "/usr/share/doc/packages/kde4-l10n-$i" fi if test "$i" = "hne" -a %suse_version -lt 1120; then echo "%dir /usr/share/locale/hne" echo "%dir /usr/share/locale/hne/LC_MESSAGES" fi } >> files.$filename { echo "%defattr(-,root,root)" if test -d $RPM_BUILD_ROOT%{_kde_share_dir}/apps/khangman/data/$i; then echo "%lang($i) %{_kde_share_dir}/apps/khangman/data/$i" echo "%dir %{_kde_share_dir}/apps/khangman" echo "%dir %{_kde_share_dir}/apps/khangman/data" fi if test -d $RPM_BUILD_ROOT%{_kde_share_dir}/apps/kanagram/data/$i; then echo "%lang($i) %{_kde_share_dir}/apps/kanagram/data/$i" echo "%dir %{_kde_share_dir}/apps/kanagram" echo "%dir %{_kde_share_dir}/apps/kanagram/data" fi if test -f $RPM_BUILD_ROOT%{_kde_share_dir}/apps/step/objinfo/l10n/$i/Box.html; then echo "%dir %{_kde_share_dir}/apps/step" echo "%dir %{_kde_share_dir}/apps/step/objinfo" echo "%dir %{_kde_share_dir}/apps/step/objinfo/l10n" echo "%dir %{_kde_share_dir}/apps/step/objinfo/l10n/$i" echo "%lang($i) %{_kde_share_dir}/apps/step/objinfo/l10n/$i/*" fi if test -f $RPM_BUILD_ROOT%{_kde_share_dir}/apps/khangman/$i.txt; then echo "%dir %{_kde_share_dir}/apps/khangman" echo "%lang($i) %{_kde_share_dir}/apps/khangman/$i.txt" fi if test -f $RPM_BUILD_ROOT%{_kde_share_dir}/apps/katepart/syntax/logohighlightstyle.$turtlelang.xml; then echo "%lang($i) %{_kde_share_dir}/apps/katepart/syntax/logohighlightstyle.$turtlelang.xml" echo "%dir %{_kde_share_dir}/apps/katepart/syntax" echo "%dir %{_kde_share_dir}/apps/katepart" fi kturtle=0 if test -f $RPM_BUILD_ROOT%{_kde_share_dir}/apps/kturtle/data/logokeywords.$turtlelang.xml; then echo "%lang($i) %{_kde_share_dir}/apps/kturtle/data/logokeywords.$turtlelang.xml" echo "%dir %{_kde_share_dir}/apps/kturtle/data" echo "%dir %{_kde_share_dir}/apps/kturtle" kturtle=1 fi if test -d $RPM_BUILD_ROOT%{_kde_share_dir}/apps/kturtle/examples/$turtlelang; then echo "%lang($i) %{_kde_share_dir}/apps/kturtle/examples/$turtlelang" echo "%dir %{_kde_share_dir}/apps/kturtle/examples" if test "$kturtle" = 0; then echo "%dir %{_kde_share_dir}/apps/kturtle" fi fi if test -d $RPM_BUILD_ROOT%{_kde_share_dir}/apps/klettres/$i; then echo "%lang($i) %{_kde_share_dir}/apps/klettres/$i" echo "%dir %{_kde_share_dir}/apps/klettres" fi if test -d $RPM_BUILD_ROOT%{_kde_share_dir}/apps/ktuberling/sounds/$i; then echo "%lang($i) %{_kde_share_dir}/apps/ktuberling/sounds/$i.soundtheme" if test -f "$RPM_BUILD_ROOT/%{_kde_share_dir}/apps/ktuberling/sounds/$i@latin.soundtheme"; then echo "%lang($i) %{_kde_share_dir}/apps/ktuberling/sounds/$i@latin.soundtheme" fi echo "%lang($i) %{_kde_share_dir}/apps/ktuberling/sounds/$i" echo "%dir %{_kde_share_dir}/apps/ktuberling" echo "%dir %{_kde_share_dir}/apps/ktuberling/sounds" fi if test -d $RPM_BUILD_ROOT%{_kde_share_dir}/apps/ksplash/Themes/Default/*/l10n/$i; then echo "%lang($i) %{_kde_share_dir}/apps/ksplash/Themes/Default/*/l10n/$i" echo "%dir %{_kde_share_dir}/apps/ksplash/Themes/Default/*/l10n" echo "%dir %{_kde_share_dir}/apps/ksplash/Themes/Default/*" echo "%dir %{_kde_share_dir}/apps/ksplash/Themes/Default" echo "%dir %{_kde_share_dir}/apps/ksplash/Themes" echo "%dir %{_kde_share_dir}/apps/ksplash" fi if test -d $RPM_BUILD_ROOT%{_kde_share_dir}/apps/kvtml/$i; then echo "%lang($i) %{_kde_share_dir}/apps/kvtml/$i" echo "%dir %{_kde_share_dir}/apps/kvtml" fi for d in $RPM_BUILD_ROOT%{_kde_share_dir}/apps/desktoptheme/*/widgets/l10n/$i; do if test -d $d; then echo "%lang($i) %{_kde_share_dir}/apps/desktoptheme/*/widgets/l10n/$i" echo "%dir %{_kde_share_dir}/apps/desktoptheme/*/widgets/l10n" echo "%dir %{_kde_share_dir}/apps/desktoptheme/*/widgets" echo "%dir %{_kde_share_dir}/apps/desktoptheme/*" echo "%dir %{_kde_share_dir}/apps/desktoptheme" fi done if test "$i" = "ca" ; then echo "%lang($i) %{_kde_share_dir}/apps/kvtml/latinCatalan*.kvtml" fi if test -d $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i-data; then echo "/usr/share/doc/packages/kde4-l10n-$i-data" fi } >> files.data.$filename { echo "%defattr(-,root,root)" if test -d $RPM_BUILD_ROOT%_kde_html_dir/$i; then echo "%lang($i) %doc %_kde_html_dir/$i" fi if test -d $RPM_BUILD_ROOT/usr/share/doc/packages/kde4-l10n-$i-doc ; then echo "/usr/share/doc/packages/kde4-l10n-$i-doc" fi } >> files.doc.$filename cat files.$filename files.data.$filename files.doc.$filename >files.all.$filename done %if %suse_version > 1020 %fdupes $RPM_BUILD_ROOT %endif for file in $RPM_BUILD_ROOT/usr/share/locale/*/entry.desktop; do grep -q "X-SuSE-translate" "$file" || %suse_update_desktop_file $file done #@FILES@ %clean rm -rf $RPM_BUILD_ROOT %changelog -n kde4-l10n