packages: iceweasel-languages/iceweasel-languages.spec - rel 1; works - thi...

mmazur mmazur at pld-linux.org
Thu Mar 24 16:45:29 CET 2011


Author: mmazur                       Date: Thu Mar 24 15:45:29 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 1; works
- this spec should generate lang packs in a much cleaner and more
  automatic way

---- Files affected:
packages/iceweasel-languages:
   iceweasel-languages.spec (1.24 -> 1.25) 

---- Diffs:

================================================================
Index: packages/iceweasel-languages/iceweasel-languages.spec
diff -u packages/iceweasel-languages/iceweasel-languages.spec:1.24 packages/iceweasel-languages/iceweasel-languages.spec:1.25
--- packages/iceweasel-languages/iceweasel-languages.spec:1.24	Tue Mar 22 18:39:02 2011
+++ packages/iceweasel-languages/iceweasel-languages.spec	Thu Mar 24 16:45:24 2011
@@ -17,7 +17,7 @@
 Summary:	Language packs for Iceweasel
 Name:		iceweasel-languages
 Version:	4.0
-Release:	0.1
+Release:	1
 License:	MPL 1.1 or GPL v2+ or LGPL v2.1+
 Group:		I18n
 Source0:	http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/linux-i686/xpi/ca.xpi
@@ -66,7 +66,6 @@
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		iceweaseldir	%{_datadir}/iceweasel
-%define		chromedir		%{iceweaseldir}/chrome
 
 %description
 Language packs for Iceweasel.
@@ -379,22 +378,7 @@
 %prep
 unpack() {
     local args="$1" file="$2"
-	local lang=$(basename $file .xpi)
-	%{__unzip} $args -d $lang $file
-
-	locale=$(awk -vl=$lang '$1 == l{print $2}' %{_builddir}/locales.txt)
-	cd $lang
-	install -d defaults/profile
-	sed -i -e "s at chrome/$lang@$locale@" chrome.manifest
-	[ $lang = $locale ] || mv chrome/$lang chrome/$locale
-	mv chrome.manifest chrome/$locale.manifest
-	mv install.rdf defaults/profile
-
-	# rebrand locale for Iceweasel
-	cd chrome/$locale
-	sed -i -e 's/Mozilla Firefox/Iceweasel/g; s/Firefox/Iceweasel/g;' locale/branding/brand.{dtd,properties}
-	sed -i -e 's/Firefox/Iceweasel/g;' locale/browser/appstrings.properties
-	cd ../../..
+	cp $file .
 }
 %define __unzip unpack
 # LANGUAGE LOCALE
@@ -423,9 +407,10 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{chromedir}
-for a in */chrome; do
-	cp -a $a/* $RPM_BUILD_ROOT%{chromedir}
+install -d $RPM_BUILD_ROOT%{iceweaseldir}/extensions
+for a in *.xpi; do
+	basename=$(basename $a .xpi)
+	cp $a $RPM_BUILD_ROOT%{iceweaseldir}/extensions/langpack-$basename at firefox.mozilla.org.xpi
 done
 
 %clean
@@ -433,98 +418,79 @@
 
 %files -n iceweasel-lang-ca
 %defattr(644,root,root,755)
-%{chromedir}/ca-ES
-%{chromedir}/ca-ES.manifest
+%{iceweaseldir}/extensions/langpack-ca at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-cs
 %defattr(644,root,root,755)
-%{chromedir}/cs
-%{chromedir}/cs.manifest
+%{iceweaseldir}/extensions/langpack-cs at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-da
 %defattr(644,root,root,755)
-%{chromedir}/da
-%{chromedir}/da.manifest
+%{iceweaseldir}/extensions/langpack-da at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-de
 %defattr(644,root,root,755)
-%{chromedir}/de
-%{chromedir}/de.manifest
+%{iceweaseldir}/extensions/langpack-de at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-el
 %defattr(644,root,root,755)
-%{chromedir}/el
-%{chromedir}/el.manifest
+%{iceweaseldir}/extensions/langpack-el at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-es
 %defattr(644,root,root,755)
-%{chromedir}/es-ES
-%{chromedir}/es-ES.manifest
+%{iceweaseldir}/extensions/langpack-es-ES at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-fi
 %defattr(644,root,root,755)
-%{chromedir}/fi
-%{chromedir}/fi.manifest
+%{iceweaseldir}/extensions/langpack-fi at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-fr
 %defattr(644,root,root,755)
-%{chromedir}/fr
-%{chromedir}/fr.manifest
+%{iceweaseldir}/extensions/langpack-fr at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-hu
 %defattr(644,root,root,755)
-%{chromedir}/hu
-%{chromedir}/hu.manifest
+%{iceweaseldir}/extensions/langpack-hu at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-it
 %defattr(644,root,root,755)
-%{chromedir}/it
-%{chromedir}/it.manifest
+%{iceweaseldir}/extensions/langpack-it at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-ja
 %defattr(644,root,root,755)
-%{chromedir}/ja
-%{chromedir}/ja.manifest
+%{iceweaseldir}/extensions/langpack-ja at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-ku
 %defattr(644,root,root,755)
-%{chromedir}/ku
-%{chromedir}/ku.manifest
+%{iceweaseldir}/extensions/langpack-ku at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-lt
 %defattr(644,root,root,755)
-%{chromedir}/lt
-%{chromedir}/lt.manifest
+%{iceweaseldir}/extensions/langpack-lt at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-pl
 %defattr(644,root,root,755)
-%{chromedir}/pl-PL
-%{chromedir}/pl-PL.manifest
+%{iceweaseldir}/extensions/langpack-pl at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-ro
 %defattr(644,root,root,755)
-%{chromedir}/ro
-%{chromedir}/ro.manifest
+%{iceweaseldir}/extensions/langpack-ro at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-ru
 %defattr(644,root,root,755)
-%{chromedir}/ru
-%{chromedir}/ru.manifest
+%{iceweaseldir}/extensions/langpack-ru at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-sk
 %defattr(644,root,root,755)
-%{chromedir}/sk
-%{chromedir}/sk.manifest
+%{iceweaseldir}/extensions/langpack-sk at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-sl
 %defattr(644,root,root,755)
-%{chromedir}/sl
-%{chromedir}/sl.manifest
+%{iceweaseldir}/extensions/langpack-sl at firefox.mozilla.org.xpi
 
 %files -n iceweasel-lang-sv
 %defattr(644,root,root,755)
-%{chromedir}/sv-SE
-%{chromedir}/sv-SE.manifest
+%{iceweaseldir}/extensions/langpack-sv-SE at firefox.mozilla.org.xpi
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -532,6 +498,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.25  2011/03/24 15:45:24  mmazur
+- rel 1; works
+- this spec should generate lang packs in a much cleaner and more
+  automatic way
+
 Revision 1.24  2011/03/22 17:39:02  mmazur
 - builds; needs testing
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/iceweasel-languages/iceweasel-languages.spec?r1=1.24&r2=1.25&f=u



More information about the pld-cvs-commit mailing list