rpms/sunbird/F-10 mozilla-jemalloc.patch, NONE, 1.1 sunbird-0.9-gcc44.patch, NONE, 1.1 sunbird-1.0-libical.patch, NONE, 1.1 sunbird-1.0-uilocale.patch, NONE, 1.1 thunderbird-pango.patch, NONE, 1.1 .cvsignore, 1.10, 1.11 sources, 1.10, 1.11 sunbird.spec, 1.18, 1.19 sunbird-0.7-path.patch, 1.1, NONE sunbird-0.7-uilocale.patch, 1.1, NONE sunbird-0.9-libical.patch, 1.3, NONE

Lubomir Rintel lkundrak at fedoraproject.org
Sun Jun 28 13:06:54 UTC 2009


Author: lkundrak

Update of /cvs/pkgs/rpms/sunbird/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31249/F-10

Modified Files:
	.cvsignore sources sunbird.spec 
Added Files:
	mozilla-jemalloc.patch sunbird-0.9-gcc44.patch 
	sunbird-1.0-libical.patch sunbird-1.0-uilocale.patch 
	thunderbird-pango.patch 
Removed Files:
	sunbird-0.7-path.patch sunbird-0.7-uilocale.patch 
	sunbird-0.9-libical.patch 
Log Message:
Merge to branches

mozilla-jemalloc.patch:

--- NEW FILE mozilla-jemalloc.patch ---
diff -r f1af606531f5 memory/jemalloc/jemalloc.h
--- mozilla/memory/jemalloc/jemalloc.h	Sat Nov 22 20:22:22 2008 +0100
+++ mozilla/memory/jemalloc/jemalloc.h	Mon Dec 01 16:53:06 2008 -0500
@@ -45,14 +45,14 @@
 } jemalloc_stats_t;
 
 #ifndef MOZ_MEMORY_DARWIN
-void	*malloc(size_t size);
-void	*valloc(size_t size);
-void	*calloc(size_t num, size_t size);
-void	*realloc(void *ptr, size_t size);
-void	free(void *ptr);
+void	*malloc(size_t size)  __THROW __attribute_malloc__ __wur;
+void	*valloc(size_t size)  __THROW __attribute_malloc__ __wur;
+void	*calloc(size_t num, size_t size)  __THROW __attribute_malloc__ __wur;
+void	*realloc(void *ptr, size_t size)  __THROW __attribute_malloc__ __wur;
+void	free(void *ptr)  __THROW __attribute_malloc__ __wur;
 #endif
 
-int	posix_memalign(void **memptr, size_t alignment, size_t size);
+int	posix_memalign(void **memptr, size_t alignment, size_t size)  __THROW __attribute_malloc__ __wur;
 void	*memalign(size_t alignment, size_t size);
 size_t	malloc_usable_size(const void *ptr);
 void	jemalloc_stats(jemalloc_stats_t *stats);

sunbird-0.9-gcc44.patch:

--- NEW FILE sunbird-0.9-gcc44.patch ---
Fix build with GCC 4.4.

Lubomir Rintel <lkundrak at v3.sk>

diff -up mozilla/toolkit/xre/nsAppRunner.cpp.gcc44 mozilla/toolkit/xre/nsAppRunner.cpp
--- mozilla/toolkit/xre/nsAppRunner.cpp.gcc44	2009-03-01 13:35:21.000000000 +0100
+++ mozilla/toolkit/xre/nsAppRunner.cpp	2009-03-01 13:35:44.000000000 +0100
@@ -1370,7 +1370,7 @@ XRE_GetBinaryPath(const char* argv0, nsI
   if (NS_FAILED(rv))
     return rv;
 
-#elif
+#else
 #error Oops, you need platform-specific code here
 #endif
 

sunbird-1.0-libical.patch:

--- NEW FILE sunbird-1.0-libical.patch ---
Link against system libical instead of bundled.
https://bugzilla.redhat.com/show_bug.cgi?id=459923

Lubomir Rintel <lkundrak at v3.sk>

--- calendar/base/build/Makefile.in.libical	2007-12-27 11:01:41.000000000 +0100
+++ calendar/base/build/Makefile.in	2008-09-23 16:02:42.000000000 +0200
@@ -63,7 +63,6 @@
 	js \
 	xpconnect \
 	string \
-	ical \
 	calbase
 
 CPPSRCS = calBaseModule.cpp \
@@ -74,7 +73,6 @@
 
 SHARED_LIBRARY_LIBS = \
     $(DEPTH)/calendar/base/src/$(LIB_PREFIX)calbase_s.$(LIB_SUFFIX) \
-    $(DEPTH)/calendar/libical/src/libical/$(LIB_PREFIX)mozical.$(LIB_SUFFIX) \
     $(NULL)
 
 ifdef MOZILLA_INTERNAL_API
@@ -94,4 +92,7 @@
 	$(NULL)
 endif
 
+# External libical
+EXTRA_DSO_LDOPTS += -lical
+
 include $(topsrcdir)/config/rules.mk
--- calendar/Makefile.in.libical	2008-09-23 17:13:34.000000000 +0200
+++ calendar/Makefile.in	2008-09-23 17:07:30.000000000 +0200
@@ -42,7 +42,7 @@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE	= calendar
-DIRS = libical resources base providers import-export locales
+DIRS = resources base providers import-export locales
 
 ifdef ENABLE_TESTS
 DIRS += test
--- calendar/lightning/Makefile.in.libical	2008-07-24 03:07:05.000000000 +0200
+++ calendar/lightning/Makefile.in	2008-09-23 16:02:42.000000000 +0200
@@ -71,7 +71,7 @@
 endif
 endif
 
-DIRS = ../libical \
+DIRS = \
        ../locales \
        ../base \
        ../providers \
--- /dev/null	2008-09-23 20:44:22.879046487 +0200
+++ calendar/base/src/ical.h	2008-09-24 11:28:09.000000000 +0200
@@ -0,0 +1,3 @@
+#pragma GCC visibility push(default)
+#include <libical/ical.h>
+#pragma GCC visibility pop

sunbird-1.0-uilocale.patch:

--- NEW FILE sunbird-1.0-uilocale.patch ---
Guess the UI locale to use.  If only intl.locale.matchOS worked...

Lubomir Rintel <lkundrak at v3.sk>

diff -up mozilla/build/unix/mozilla.in.uilocale mozilla/build/unix/mozilla.in
diff -up mozilla/build/unix/run-mozilla.sh.uilocale mozilla/build/unix/run-mozilla.sh
--- mozilla/build/unix/run-mozilla.sh.uilocale	2009-04-28 21:53:14.000000000 +0200
+++ mozilla/build/unix/run-mozilla.sh	2009-04-28 21:54:39.000000000 +0200
@@ -279,6 +279,23 @@ MOZILLA_FIVE_HOME=$MOZ_DIST_BIN
 if [ -z "$MRE_HOME" ]; then
     MRE_HOME=$MOZILLA_FIVE_HOME
 fi
+
+# 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 $LANG | sed "s|_\([^.]*\).*||g"`
+MOZLOCALE=`echo $LANG | sed "s|_\([^.]*\).*|-\1|g"`
+
+if [ -f ${MOZ_DIST_BIN}/extensions/langpack-${MOZLOCALE}@sunbird.mozilla.org/chrome/$MOZLOCALE.jar ]
+then
+	set -- "$@" -UILocale $MOZLOCALE
+else
+	if [ -f ${MOZ_DIST_BIN}/extensions/langpack-${SHORTMOZLOCALE}@sunbird.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]
+	then
+		set -- "$@" -UILocale $SHORTMOZLOCALE
+	fi
+fi
+
 ##
 ## Set LD_LIBRARY_PATH
 ##

thunderbird-pango.patch:

--- NEW FILE thunderbird-pango.patch ---
diff -upU8 thunderbird-3.0/mozilla/gfx/thebes/src/gfxPangoFonts.cpp.pango-fix thunderbird-3.0/mozilla/gfx/thebes/src/gfxPangoFonts.cpp
--- thunderbird-3.0/mozilla/gfx/thebes/src/gfxPangoFonts.cpp.pango-fix	2009-03-03 12:04:16.000000000 +0100
+++ thunderbird-3.0/mozilla/gfx/thebes/src/gfxPangoFonts.cpp	2009-03-03 12:05:37.000000000 +0100
@@ -1798,22 +1798,21 @@ gfx_pango_font_map_context_substitute(Pa
     double size = pango_font_description_get_size(desc) / FLOAT_PANGO_SCALE;
     gfxPangoFontGroup *fontGroup = GetFontGroup(context);
     PRBool usePrinterFont = fontGroup && fontGroup->GetStyle()->printerFont;
     PrepareSortPattern(pattern, size, 1.0, usePrinterFont);
 }
 
 static PangoFcFont *
 gfx_pango_font_map_create_font(PangoFcFontMap *fontmap,
-                               PangoContext *context,
-                               const PangoFontDescription *desc,
-                               FcPattern *pattern)
+                               PangoFcFontKey *fontkey)
 {
+    const FcPattern *p_pattern = pango_fc_font_key_get_pattern(fontkey);
     return PANGO_FC_FONT(g_object_new(GFX_TYPE_PANGO_FC_FONT,
-                                      "pattern", pattern, NULL));
+                                      "pattern", p_pattern, NULL));
 }
 
 static void
 gfx_pango_font_map_class_init(gfxPangoFontMapClass *klass)
 {
     // inherit GObjectClass::finalize from parent as this class adds no data.
 
     PangoFontMapClass *fontmap_class = PANGO_FONT_MAP_CLASS (klass);
@@ -1823,19 +1822,18 @@ gfx_pango_font_map_class_init(gfxPangoFo
     fontmap_class->load_fontset = gfx_pango_font_map_load_fontset;
     // inherit fontmap_class->shape_engine_type from PangoFcFontMap
 
     PangoFcFontMapClass *fcfontmap_class = PANGO_FC_FONT_MAP_CLASS (klass);
     fcfontmap_class->get_resolution = gfx_pango_font_map_get_resolution;
     // context_key_* virtual functions are only necessary if we want to
     // dynamically respond to changes in the screen cairo_font_options_t.
 
-    // context_substitute and get_font are not likely to be used but
+    // get_font are not likely to be used but
     //   implemented because the class makes them available.
-    fcfontmap_class->context_substitute = gfx_pango_font_map_context_substitute;
     fcfontmap_class->create_font = gfx_pango_font_map_create_font;
 }
 
 /**
  ** gfxPangoFontGroup
  **/
 
 struct FamilyCallbackData {


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/sunbird/F-10/.cvsignore,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- .cvsignore	23 Sep 2008 20:38:51 -0000	1.10
+++ .cvsignore	28 Jun 2009 13:06:23 -0000	1.11
@@ -1,3 +1,2 @@
-lightning-0.9.linux-i686.xpi
-sunbird-langpacks-0.9.tar.gz
-lightning-sunbird-0.9-source.tar.bz2
+sunbird-1.0-20090513hg.tar.lzma
+sunbird-l10n.tar


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/sunbird/F-10/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- sources	23 Sep 2008 20:38:51 -0000	1.10
+++ sources	28 Jun 2009 13:06:23 -0000	1.11
@@ -1,3 +1,2 @@
-8086ee725f2d3eca17c375a3812c3618  lightning-0.9.linux-i686.xpi
-adcef4eab2cbc14c1534ab80cb684273  sunbird-langpacks-0.9.tar.gz
-ff4ae1e9c1071d8d478504d95d7dabee  lightning-sunbird-0.9-source.tar.bz2
+9f6fe61412669daeb30158832619d4a3  sunbird-l10n.tar
+76e7c2ac4767049156b9b7a9d4036239  sunbird-1.0-20090513hg.tar.lzma


Index: sunbird.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sunbird/F-10/sunbird.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- sunbird.spec	2 Oct 2008 03:53:11 -0000	1.18
+++ sunbird.spec	28 Jun 2009 13:06:23 -0000	1.19
@@ -1,33 +1,44 @@
-%define progdir %{_prefix}/%{_lib}/%{name}-%{version}
-%define docs LEGAL LICENSE README.txt
-%{?_with_official:%define official 1}
+%bcond_without lightning
+%ifarch ppc
+%if 0%{?rhel}
+%define with_lightning %{nil}
+%endif
+%endif
+
+%define progdir %{_libdir}/%{name}-%{version}pre
 
 # This is to filter unwanted provides, that should be provided only by gecko-devel
 %define _use_internal_dependency_generator 0
 %define __find_requires %{SOURCE100} %{buildroot}
 
 Name:           sunbird
-Version:        0.9
-Release:        3%{?dist}
-Summary:        Mozilla Sunbird Calendar
+Version:        1.0
+Release:        0.5.20090513hg%{?dist}
+Summary:        Calendar application built upon Mozilla toolkit
 
 Group:          Applications/Productivity
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 URL:            http://www.mozilla.org/projects/calendar/sunbird/
-Source0:        http://releases.mozilla.org/pub/mozilla.org/calendar/sunbird/releases/%{version}/source/lightning-sunbird-%{version}-source.tar.bz2
+#Source0:        http://releases.mozilla.org/pub/mozilla.org/calendar/sunbird/releases/%{version}/source/lightning-sunbird-%{version}-source.tar.bz2
+Source0:        sunbird-1.0-20090513hg.tar.lzma
 Source1:        sunbird.desktop
-Source2:        sunbird-langpacks-%{version}.tar.gz
+Source2:        sunbird-l10n.tar
+#sunbird-langpacks-0.9.tar.gz
 Source3:        mozilla-extension-update.sh
 # This is used just for langpacks.
 # TODO: build them!
-Source4:        http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/%{version}/lightning-%{version}.linux-i686.xpi
+#Source4:        http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/0.9/lightning-0.9.linux-i686.xpi
 Source100:      find-external-requires
-Patch0:         sunbird-0.9-libical.patch
 
-# build patches
-Patch2:         sunbird-0.7-path.patch
-Patch3:         sunbird-0.7-uilocale.patch
-   
+# Pulled from Thunderbird
+Patch0:         mozilla-jemalloc.patch
+Patch1:         thunderbird-pango.patch
+
+# Ours
+Patch10:        sunbird-1.0-libical.patch
+Patch11:        sunbird-1.0-uilocale.patch
+Patch12:        sunbird-0.9-gcc44.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libIDL-devel
@@ -42,21 +53,29 @@ BuildRequires:  nss-devel
 BuildRequires:  nspr-devel
 BuildRequires:  libical-devel
 BuildRequires:  zip
+BuildRequires:  autoconf213
+BuildRequires:  alsa-lib-devel
 
 Requires(post):  desktop-file-utils
-Requires(postun):  desktop-file-utils
+Requires(postun): desktop-file-utils
 
 AutoProv: 0
 
 %description
-Mozilla Sunbirdâ„¢ is a cross-platform calendar application, built upon
-Mozilla Toolkit. Our goal is to bring Mozilla-style ease-of-use to your
+Mozilla Sunbird is a cross-platform calendar application, built upon
+Mozilla Toolkit. It brings Mozilla-style ease-of-use to your
 calendar, without tying you to a particular storage solution.
 
+
+%if %with lightning
 %package -n thunderbird-lightning
 Summary:        The calendar extension to Thunderbird
 Group:          Applications/Productivity
-Requires:       thunderbird >= 2
+Requires:       thunderbird >= 3
+# Temporary, so we can be sure about the Thunderbird API
+Requires:       thunderbird >= 3.0-2.4.b3pre
+Requires:       thunderbird < 3.0-2.4.b4
+
 Obsoletes:      thunderbird-lightning-wcap <= 0.8
 Provides:       thunderbird-lightning-wcap = %{version}-%{release}
 AutoProv: 0
@@ -67,148 +86,139 @@ Mozilla Thunderbird. Since it's an exten
 integrated with Thunderbird, allowing it to easily perform email-related
 calendaring tasks.
 
-
 %define lightning_extname '{e2fda1a4-762b-4020-b5ad-a41df1933103}'
-
-%define tbupdate_lightning                                      \\\
-  %{_libdir}/thunderbird-lightning/mozilla-extension-update.sh  \\\
-  --appname thunderbird                                         \\\
-  --extname %{lightning_extname}                                \\\
-  --basedir %{_libdir}                                          \\\
-  --extpath %{_libdir}/thunderbird-lightning                    \\\
-  --action 
+%define tbupdate_lightning                                              \\\
+        %{_libdir}/thunderbird-lightning/mozilla-extension-update.sh    \\\
+        --appname thunderbird                                           \\\
+        --extname %{lightning_extname}                                  \\\
+        --basedir %{_libdir}                                            \\\
+        --extpath %{_libdir}/thunderbird-lightning                      \\\
+        --action 
+
+%define gdata_extname '{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}'
+%define tbupdate_gdata                                                  \\\
+        %{_libdir}/thunderbird-lightning/mozilla-extension-update.sh    \\\
+        --appname thunderbird                                           \\\
+        --extname %{gdata_extname}                                      \\\
+        --basedir %{_libdir}                                            \\\
+        --extpath %{_libdir}/thunderbird-lightning-gdata                \\\
+        --action 
+%endif
 
 
 %prep
-%setup -q -n mozilla
-%patch0 -p1 -b .libical
-%patch2 -p1 -b .path
-%patch3 -p1 -b .uilocale
-# Fix source perms to avoid errors in the debuginfo RPM (bug 357661)
-find . -type f \( -name "*.cpp" -o -name "*.h" \) -exec chmod -x '{}' \;
+%setup -q -a 2
+%patch0 -p0 -b .jemalloc
+%patch1 -p1 -b .pango
+%patch10 -p0 -b .libical
+%patch11 -p0 -b .uilocale
+%patch12 -p0 -b .gcc44
+
+find . -name '*.cpp' -o -name '*.h' |xargs chmod -x
 
 
 %build
-%if 0%{?official}
-export MOZILLA_OFFICIAL=1
-export BUILD_OFFICIAL=1
-%endif
-export CFLAGS="$(echo $RPM_OPT_FLAGS |sed 's/-O2/-Os/;s/-Wall//')"
-export CXXFLAGS="$CFLAGS"
-cat << EOF > .mozconfig
-%if 0%{?official}
-mk_add_options MOZILLA_OFFICIAL=1
-mk_add_options BUILD_OFFICIAL=1
-ac_add_options --enable-official-branding
-%endif
-mk_add_options MOZ_MAKE_FLAGS=%{?_smp_mflags}
-ac_add_options --enable-application=calendar
-ac_add_options --prefix=%{_prefix}
-ac_add_options --libdir=%{_libdir}
-ac_add_options --sysconfdir=%{_sysconfdir}
-ac_add_options --mandir=%{_mandir}
-ac_add_options --includedir=%{_includedir}
-ac_add_options --with-system-nspr
-ac_add_options --with-system-nss
-ac_add_options --with-system-jpeg
-ac_add_options --with-system-zlib
-ac_add_options --with-pthreads
-ac_add_options --disable-tests
+cat >.mozconfig <<EOF
+ac_add_options --disable-crashreporter
 ac_add_options --disable-debug
 ac_add_options --disable-installer
-ac_add_options --enable-optimize="$CFLAGS"
-ac_add_options --enable-xinerama
-ac_add_options --disable-xprint
+ac_add_options --disable-install-strip
 ac_add_options --disable-strip
+ac_add_options --disable-tests
+ac_add_options --disable-updater
+ac_add_options --disable-xprint
+ac_add_options --enable-application=calendar
+ac_add_options --enable-calendar
+ac_add_options --enable-canvas
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --enable-optimize="$(echo $RPM_OPT_FLAGS |sed -e 's/-O2/-Os/;s/-Wall//')"
 ac_add_options --enable-pango
-ac_add_options --enable-system-cairo
 ac_add_options --enable-svg
-ac_add_options --enable-canvas
-ac_add_options --enable-extensions=default,lightning
-ac_add_options --disable-updater
-ac_add_options --disable-crashreporter
+ac_add_options --enable-system-cairo
+ac_add_options --enable-xinerama
+ac_add_options --libdir="%{_libdir}"
+ac_add_options --prefix="%{_prefix}"
+ac_add_options --with-pthreads
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-zlib
 EOF
-make -f client.mk MOZ_CAIRO_LIBS='-lcairo -lX11 -lXrender' build
-# make package directory
-make -C xpinstall/packager STRIP=/bin/true
-
-#ac_add_options --enable-default-toolkit=cairo-gtk2
-# configure: error: Toolkit must be cairo-gtk2.
-
-#ac_add_options --with-system-png
-# checking for png_get_valid in -lpng... yes
-# checking for png_get_acTL in -lpng... no
-# configure: error: --with-system-png won't work because the system's libpng doesn't have APNG support
+
+make -f client.mk build
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
-# The make install does not work (it tries to build additional stuff that break)
-#make install DESTDIR=$RPM_BUILD_ROOT
-# TODO: Is the above still true? Recheck!
 
-# copy tree into RPM_BUILD_ROOT
+# make install is bogus
+# copy tree, break symlinks
 mkdir -p $RPM_BUILD_ROOT%{progdir}
-cp -rf $RPM_BUILD_DIR/mozilla/dist/%{name}/* $RPM_BUILD_ROOT%{progdir}
+cp -rL mozilla/dist/bin/* $RPM_BUILD_ROOT%{progdir}
 mkdir $RPM_BUILD_ROOT%{_bindir}
 mv $RPM_BUILD_ROOT%{progdir}/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
 
-
 desktop-file-install --vendor="fedora"                  \
-  --dir=$RPM_BUILD_ROOT%{_datadir}/applications/        \
-  %{SOURCE1}
-
-# Fix some permissions
-find $RPM_BUILD_ROOT%{progdir} -name "*.xpm" -o -name "*.png" |xargs chmod -x
-chmod -x $RPM_BUILD_ROOT%{progdir}/defaults/profile/prefs.js    \
-  $RPM_BUILD_ROOT%{progdir}/js/calAlarmMonitor.js               \
-  $RPM_BUILD_ROOT%{progdir}/js/calFreeBusyService.js
-
-# Avoid "Chrome Registration Failed" message on first startup and extension installation
-touch $RPM_BUILD_ROOT%{progdir}/extensions/%{lightning_extname}/chrome.manifest
+        --dir=$RPM_BUILD_ROOT%{_datadir}/applications/  \
+        %{SOURCE1}
 
 # Icon
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
 cp $RPM_BUILD_ROOT%{progdir}/icons/mozicon128.png \
-  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
-
-# Docs in %%doc
-for doc in %{docs}; do
-  rm -f $RPM_BUILD_ROOT%{progdir}/$doc
-done
+        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
 
 # Install langpacks
 mkdir -p $RPM_BUILD_ROOT%{progdir}/extensions
-rm -rf sunbird-langpacks
-mkdir sunbird-langpacks
-tar xzf %{SOURCE2} -C sunbird-langpacks
-for langpack in sunbird-langpacks/*.xpi; do
-  language=$(basename $langpack .xpi)
-  extensiondir=$RPM_BUILD_ROOT%{progdir}/extensions/langpack-$language at sunbird.mozilla.org
-  mkdir -p $extensiondir
-  unzip -qod $extensiondir $langpack
-  find $extensiondir -type f -print0 |xargs -0 chmod 644
-  # Fix #441500
-  sed 's/\r//g' $extensiondir/install.rdf |awk '/^$/ {next} {print}' >lala
-  mv lala $extensiondir/install.rdf
+ls sunbird-l10n/*.xpi |while read PACK
+do
+        LANGUAGE=$(echo $PACK |sed 's,sunbird-l10n/sunbird-%{version}pre.\(.*\).langpack.xpi,\1,')
+        DIR=$RPM_BUILD_ROOT%{progdir}/extensions/langpack-$LANGUAGE at sunbird.mozilla.org
+        mkdir -p $DIR
+        unzip -qod $DIR $PACK
+        find $DIR -type f |xargs chmod 0644
+
+        # Fix #441500
+        sed 's/\r//g' $DIR/install.rdf |awk '/^$/ {next} {print}' >lala
+        touch -r $DIR/install.rdf lala
+        mv lala $DIR/install.rdf
+
 done
 
-# Lightning
-unzip -qod $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning dist/xpi-stage/lightning.xpi
+# GData provider for sunbird
+mkdir -p $RPM_BUILD_ROOT%{progdir}/extensions/%{gdata_extname}
+touch $RPM_BUILD_ROOT%{progdir}/extensions/%{gdata_extname}/chrome.manifest
+unzip -qod $RPM_BUILD_ROOT%{progdir}/extensions/%{gdata_extname} \
+        mozilla/dist/xpi-stage/gdata-provider.xpi
+
+%if %with lightning
+# Avoid "Chrome Registration Failed" message on first startup and extension installation
+touch $RPM_BUILD_ROOT%{progdir}/extensions/%{lightning_extname}/chrome.manifest
+touch $RPM_BUILD_ROOT%{progdir}/extensions/%{gdata_extname}/chrome.manifest
+
+# Lightning and GData provider for it
+unzip -qod $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning mozilla/dist/xpi-stage/lightning.xpi
+unzip -qod $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning-gdata mozilla/dist/xpi-stage/gdata-provider.xpi
 install -p -m 755 %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning/mozilla-extension-update.sh
-# Fix some permissions
-chmod -x $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning/js/calAlarmMonitor.js \
-  $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning/js/calFreeBusyService.js
 
+# No langpacks for preview release
+%if 0
 # Unpack lightning language packs, except en_US
-unzip -l %{SOURCE4} '*.jar'                                     |
-  awk '/-[^\/]*\.jar/ && !/en-US/ {print $4}'                   |
-  xargs unzip -qod $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning %{SOURCE4}
+unzip -l %{SOURCE4} '*.jar' |
+        awk '/-[^\/]*\.jar/ && !/en-US/ {print $4}' |
+        xargs unzip -qod $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning %{SOURCE4}
+
 # Register them
-ls $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning/chrome       |
-  sed -n '/en-US/n;s/\(\([^-]*\)-\(.*\)\.jar\)/locale \2 \3 jar:chrome\/\1!\/locale\/\3\/\2\//p' \
-  >> $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning/chrome.manifest
-# ^^^ I'm going to burn in hell for this ^^^
+ls $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning/chrome |
+        sed -n '/en-US/n;s/\(\([^-]*\)-\(.*\)\.jar\)/locale \2 \3 jar:chrome\/\1!\/locale\/\3\/\2\//p' \
+        >>$RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning/chrome.manifest
+        # ^^^ I'm going to burn in hell for this ^^^
+%endif
+%endif
 
+# Permissions fixup
+find $RPM_BUILD_ROOT -name '*.xpm' -o -name '*.js' |
+        xargs chmod 0644 mozilla/LICENSE
+find $RPM_BUILD_ROOT -name '*.so' |xargs chmod 0755
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -218,7 +228,7 @@ rm -rf $RPM_BUILD_ROOT
 update-desktop-database %{_datadir}/applications
 touch --no-create %{_datadir}/icons/hicolor
 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+        %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
 fi
 
 
@@ -226,17 +236,20 @@ fi
 update-desktop-database %{_datadir}/applications
 touch --no-create %{_datadir}/icons/hicolor
 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+        %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
 fi
 
 
+%if %with lightning
 %post -n thunderbird-lightning
 %{tbupdate_lightning} install || :
+%{tbupdate_gdata} install || :
 
 
 %preun -n thunderbird-lightning
 if [ $1 = 0 ]; then
-  %{tbupdate_lightning} remove || :
+        %{tbupdate_lightning} remove || :
+        %{tbupdate_gdata} remove || :
 fi
 
 
@@ -245,38 +258,73 @@ fi
 # is guarded against upgrade, but because of our triggerun,
 # which is run on self-upgrade, though triggerpostun isn't
 if [ $1 != 0 ]; then
-  %{tbupdate_lightning} install || :
+        %{tbupdate_lightning} install || :
+        %{tbupdate_gdata} install || :
 fi
 
 %triggerin -n thunderbird-lightning -- thunderbird
 %{tbupdate_lightning} install || :
+%{tbupdate_gdata} install || :
 
 %triggerun -n thunderbird-lightning -- thunderbird
 %{tbupdate_lightning} remove || :
+%{tbupdate_gdata} remove || :
 
 %triggerpostun -n thunderbird-lightning -- thunderbird
 # Guard against being run post-self-uninstall, even though that
 # doesn't happen currently (see comment above)
 if [ $1 != 0 ]; then
-  %{tbupdate_lightning} install || :
+        %{tbupdate_lightning} install || :
+        %{tbupdate_gdata} install || :
 fi
+%endif
 
 
 %files
 %defattr(-,root,root,-)
-%doc %{docs}
+%doc mozilla/LEGAL mozilla/LICENSE mozilla/README.txt
 %{progdir}
 %{_bindir}/sunbird
 %{_datadir}/applications/*.desktop
 %{_datadir}/icons/hicolor/128x128/apps/sunbird.png
 
 
+%if %with lightning
 %files -n thunderbird-lightning
+%doc mozilla/LEGAL mozilla/LICENSE mozilla/README.txt
 %defattr(-,root,root,-)
 %{_libdir}/thunderbird-lightning
+%{_libdir}/thunderbird-lightning-gdata
+%endif
 
 
 %changelog
+* Sun Jun 28 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.5.20090513hg
+- Sync up with Thunderbird
+- Enable the Google Data Provider
+
+* Fri May 15 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.4.20090302hg
+- Fixed thunderbird dependency
+
+* Thu May 12 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.3.20090302hg
+- Fix migration window size (0x0 is considered too small by some) (#499346)
+
+* Wed Apr 29 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.2.20090302hg
+- Fix the permissions for real now
+
+* Tue Apr 28 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.1.20090302hg
+- Update to version matching current Thunderbird
+
+* Sun Mar 1 2009 Lubomir Rintel <lkundrak at v3.sk> 0.9-6
+- Fix build with GCC 4.4
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Mon Nov 24 2008 Lubomir Rintel <lkundrak at v3.sk> 0.9-4
+- Disable lightning on EL-5 ppc, since there's no Desktop with thunderbird
+- Fix summary
+
 * Thu Oct 2 2008 Lubomir Rintel <lkundrak at v3.sk> 0.9-3
 - Attempt to fix the libical patch's timezone problem
 


--- sunbird-0.7-path.patch DELETED ---


--- sunbird-0.7-uilocale.patch DELETED ---


--- sunbird-0.9-libical.patch DELETED ---




More information about the fedora-extras-commits mailing list