SPECS (DEVEL): kde4-kdebase-runtime.spec - use mapping for l10n %lang taggi...

glen glen at pld-linux.org
Mon Dec 8 02:39:35 CET 2008


Author: glen                         Date: Mon Dec  8 01:39:35 2008 GMT
Module: SPECS                         Tag: DEVEL
---- Log message:
- use mapping for l10n %lang tagging, with best guess

---- Files affected:
SPECS:
   kde4-kdebase-runtime.spec (1.53.2.33 -> 1.53.2.34) 

---- Diffs:

================================================================
Index: SPECS/kde4-kdebase-runtime.spec
diff -u SPECS/kde4-kdebase-runtime.spec:1.53.2.33 SPECS/kde4-kdebase-runtime.spec:1.53.2.34
--- SPECS/kde4-kdebase-runtime.spec:1.53.2.33	Mon Dec  8 01:52:55 2008
+++ SPECS/kde4-kdebase-runtime.spec	Mon Dec  8 02:39:29 2008
@@ -19,6 +19,7 @@
 Source0:	ftp://ftp.kde.org/pub/kde/%{_state}/%{version}/src/%{orgname}-%{version}.tar.bz2
 # Source0-md5:	4e1bd6b7526ae273d1702dca266acdc2
 Source1:	kdebase-searchproviders.tar.bz2
+Source2:	l10n-iso639-1
 # Source1-md5:  126c3524b5367f5096a628acbf9dc86f
 URL:		http://www.kde.org/
 BuildRequires:	automoc4
@@ -119,18 +120,23 @@
 install -d $RPM_BUILD_ROOT%{_datadir}/kde4/services/searchproviders/pld
 cp -a kdebase-searchproviders/*.desktop $RPM_BUILD_ROOT%{_datadir}/kde4/services/searchproviders/pld
 
-rm -f %{name}-files
-WORKDIR=`pwd`
-cd $RPM_BUILD_ROOT%{_datadir}/locale/l10n
-# ARGH, l10n != %lang glibc locales (et = etiopia not estonia!)
-for DIR in *; do
-	if [ -d $DIR ] ; then
-	# ARGH, these l10n != %lang glibc locales (et = Etiopia not Estonia!)
-#		echo "%lang($DIR) "
-		echo "%{_datadir}/locale/l10n/$DIR" >> $WORKDIR/%{name}-files
-	fi
-done
-cd -
+collect_l10n_files() {
+	while read country language comment; do
+		[ "$country" != "#" ] || continue
+		if [ "$language" = "-" ]; then
+			# no mapping. just add for now
+			echo >&2 "No mapping for $country $comment, adding without %%lang tag"
+			echo "%{_datadir}/locale/l10n/$country"
+		else
+			echo "%lang($language) %{_datadir}/locale/l10n/$country"
+		fi
+	done
+} < %{SOURCE2}
+collect_l10n_files > %{name}.files
+
+rm -f $RPM_BUILD_ROOT%{_datadir}/icons/default.kde4
+# provided (conflicts) by hicolor-icon-theme
+rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/index.theme
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -138,7 +144,7 @@
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
-%files -f %{name}-files
+%files -f %{name}.files
 %defattr(644,root,root,755)
 %{_sysconfdir}/xdg/menus/kde-information.menu
 %attr(755,root,root) %{_bindir}/kcmshell4
@@ -373,13 +379,16 @@
 %{_datadir}/kde4/servicetypes/searchprovider.desktop
 %{_datadir}/kde4/servicetypes/thumbcreator.desktop
 %{_datadir}/desktop-directories
+
 %{_datadir}/locale/en_US/*
 %dir %{_datadir}/locale/l10n
+%{_datadir}/locale/l10n/C
 %{_datadir}/locale/l10n/caribbean.desktop
 %{_datadir}/locale/l10n/centralafrica.desktop
 %{_datadir}/locale/l10n/centralamerica.desktop
 %{_datadir}/locale/l10n/centralasia.desktop
 %{_datadir}/locale/l10n/centraleurope.desktop
+%{_datadir}/locale/l10n/eastafrica.desktop
 %{_datadir}/locale/l10n/eastasia.desktop
 %{_datadir}/locale/l10n/easteurope.desktop
 %{_datadir}/locale/l10n/middleeast.desktop
@@ -394,6 +403,7 @@
 %{_datadir}/locale/l10n/southeurope.desktop
 %{_datadir}/locale/l10n/westafrica.desktop
 %{_datadir}/locale/l10n/westeurope.desktop
+
 %{_desktopdir}/kde4/Help.desktop
 %{_desktopdir}/kde4/knetattach.desktop
 %lang(en) %{_kdedocdir}/en/kcontrol/*
@@ -416,11 +426,10 @@
 %lang(en) %{_kdedocdir}/en/kioslave/thumbnail
 %lang(en) %{_kdedocdir}/en/knetattach
 %lang(en) %{_mandir}/man1/kdesu.1*
+
 %{_datadir}/sounds/*
 %{_iconsdir}/hicolor/*/*/*.png
 %{_iconsdir}/hicolor/scalable/apps/*.svgz
-# conflicts with hicolor-icon-theme
-#%{_iconsdir}/hicolor/index.theme
 %dir %{_datadir}/apps/ksmserver
 %dir %{_datadir}/apps/ksmserver/windowmanagers
 %{_datadir}/apps/ksmserver/windowmanagers/compiz-custom.desktop
@@ -428,7 +437,6 @@
 %{_datadir}/apps/ksmserver/windowmanagers/metacity.desktop
 %{_datadir}/apps/ksmserver/windowmanagers/openbox.desktop
 
-
 %files devel
 %defattr(644,root,root,755)
 %{_libdir}/libkwalletbackend.so
@@ -509,6 +517,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.53.2.34  2008/12/08 01:39:29  glen
+- use mapping for l10n %lang tagging, with best guess
+
 Revision 1.53.2.33  2008/12/08 00:52:55  glen
 - l10n/et = ethiopia not Estonian, so disable lang tagging; rel 3
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/kde4-kdebase-runtime.spec?r1=1.53.2.33&r2=1.53.2.34&f=u



More information about the pld-cvs-commit mailing list