rpms/seamonkey/devel .cvsignore, 1.25, 1.26 seamonkey.sh.in, 1.7, 1.8 seamonkey.spec, 1.58, 1.59 sources, 1.27, 1.28

Martin Stransky stransky at fedoraproject.org
Fri Jul 24 21:42:52 UTC 2009


Author: stransky

Update of /cvs/pkgs/rpms/seamonkey/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6796

Modified Files:
	.cvsignore seamonkey.sh.in seamonkey.spec sources 
Log Message:
Added langpacks


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/seamonkey/devel/.cvsignore,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- .cvsignore	24 Jul 2009 07:57:31 -0000	1.25
+++ .cvsignore	24 Jul 2009 21:42:52 -0000	1.26
@@ -1,2 +1,3 @@
 seamonkey-1.1.16.source.tar.bz2
 seamonkey-2.0b1-source.tar.bz2
+seamonkey-langpacks-2.0b1-20090724.tar.bz2


Index: seamonkey.sh.in
===================================================================
RCS file: /cvs/pkgs/rpms/seamonkey/devel/seamonkey.sh.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- seamonkey.sh.in	24 Jul 2009 07:57:34 -0000	1.7
+++ seamonkey.sh.in	24 Jul 2009 21:42:52 -0000	1.8
@@ -42,6 +42,7 @@ ulimit -c 0
 MOZ_DIST_BIN="LIBDIR/seamonkey-MOZILLA_VERSION"
 MOZ_PROGRAM="LIBDIR/seamonkey-MOZILLA_VERSION/seamonkey"
 MOZ_CLIENT_PROGRAM="LIBDIR/seamonkey-MOZILLA_VERSION/mozilla-xremote-client -a seamonkey"
+MOZ_EXTENSIONS_DIR="$MOZ_DIST_BIN/extensions"
 
 ##
 ## Set MOZILLA_FIVE_HOME
@@ -140,9 +141,13 @@ fi
 
 # check system locale
 MOZARGS=
-MOZLOCALE=`echo $LANG | sed "s|_\([^.]*\).*|-\1|g"`
-[ -f $MOZILLA_FIVE_HOME/chrome/$MOZLOCALE.jar ] && MOZARGS="-UILocale $MOZLOCALE"
+# Try without a local variant first, then with a local variant
+# So that pt-BR doesn't try to use pt for example
+SHORTMOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*||g"`
+[ -f $MOZ_EXTENSIONS_DIR/langpack-${SHORTMOZLOCALE}@seamonkey.mozilla.org/chrome/$SHORTMOZLOCALE.jar ] && MOZARGS="-UILocale $SHORTMOZLOCALE"
 
+MOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*|-\1|g"`
+[ -f $MOZ_EXTENSIONS_DIR/langpack-${MOZLOCALE}@seamonkey.mozilla.org/chrome/$MOZLOCALE.jar ] && MOZARGS="-UILocale $MOZLOCALE"
 
 # if there's no command line argument and there's not a running
 # instance then just fire up a new copy of the browser


Index: seamonkey.spec
===================================================================
RCS file: /cvs/pkgs/rpms/seamonkey/devel/seamonkey.spec,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -p -r1.58 -r1.59
--- seamonkey.spec	24 Jul 2009 08:30:28 -0000	1.58
+++ seamonkey.spec	24 Jul 2009 21:42:52 -0000	1.59
@@ -1,3 +1,4 @@
+%define homepage http://start.fedoraproject.org/
 %define default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html
 %define cairo_version 0.5
 
@@ -6,6 +7,8 @@
 
 %define prerelease_tag b1
 
+%define build_langpacks 1
+
 %define _unpackaged_files_terminate_build 0
 %define builddir %{_builddir}/%{name}-%{version}
 %define mozdir %{_libdir}/seamonkey-%{version}%{?prerelease_tag}
@@ -21,6 +24,7 @@ License:        MPLv1.1
 Group:          Applications/Internet
 
 Source0:        seamonkey-%{version}%{?prerelease_tag}-source.tar.bz2
+Source1:        seamonkey-langpacks-%{version}%{?prerelease_tag}-20090724.tar.bz2
 Source2:        seamonkey-icon.png
 Source3:        seamonkey.sh.in
 Source4:        seamonkey.desktop
@@ -188,6 +192,41 @@ install -c -m 644 mozilla/dist/bin/compo
     --install-dir $RPM_BUILD_ROOT/%{mozdir} \
     --install-root %{mozdir}
 
+echo > ../%{name}.lang
+%if %{build_langpacks}
+# Install langpacks 
+%{__mkdir_p} $RPM_BUILD_ROOT/%{mozdir}/extensions
+%{__tar} xjf %{SOURCE1}
+for langpack in `ls seamonkey-langpacks/*.xpi`; do
+  language=`basename $langpack .xpi`
+  extensiondir=$RPM_BUILD_ROOT/%{mozdir}/extensions/langpack-$language at seamonkey.mozilla.org
+  %{__mkdir_p} $extensiondir
+  unzip $langpack -d $extensiondir
+  find $extensiondir -type f | xargs chmod 644
+
+  tmpdir=`mktemp -d %{name}.XXXXXXXX`
+  langtmp=$tmpdir/%{name}/langpack-$language
+  %{__mkdir_p} $langtmp
+  jarfile=$extensiondir/chrome/$language.jar
+  unzip $jarfile -d $langtmp
+
+  sed -i -e "s|browser.startup.homepage.*$|browser.startup.homepage=%{homepage}|g;" \
+         $langtmp/locale/$language/navigator-region/region.properties
+
+  find $langtmp -type f | xargs chmod 644
+  %{__rm} -rf $jarfile
+  cd $langtmp
+  zip -r -D $jarfile locale
+  cd -
+  %{__rm} -rf $tmpdir
+
+  language=`echo $language | sed -e 's/-/_/g'`
+  extensiondir=`echo $extensiondir | sed -e "s,^$RPM_BUILD_ROOT,,"`
+  echo "%%lang($language) $extensiondir" >> ../%{name}.lang
+done
+%{__rm} -rf firefox-langpacks
+%endif # build_langpacks
+
 # set up our desktop files
 %{__mkdir_p} $RPM_BUILD_ROOT/%{_datadir}/pixmaps/
 
@@ -264,6 +303,7 @@ update-desktop-database %{_datadir}/appl
 %{mozdir}/chrome/reporter.manifest
 %{mozdir}/components/*.xpt
 %{mozdir}/defaults/messenger/mailViews.dat
+%{mozdir}/extensions/*
 
 #%doc %{_mandir}/man1/seamonkey.1.gz
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/seamonkey/devel/sources,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -r1.27 -r1.28
--- sources	24 Jul 2009 07:57:34 -0000	1.27
+++ sources	24 Jul 2009 21:42:52 -0000	1.28
@@ -1 +1,2 @@
 f7d6453b2e84070b6f74c597209f447c  seamonkey-2.0b1-source.tar.bz2
+717d55bc4dd61de33c754f077c14d92f  seamonkey-langpacks-2.0b1-20090724.tar.bz2




More information about the fedora-extras-commits mailing list