rpms/sunbird/devel mozilla-jemalloc.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 thunderbird-shared-error.patch, NONE, 1.1 .cvsignore, 1.10, 1.11 sources, 1.10, 1.11 sunbird.spec, 1.21, 1.22 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
Tue Apr 28 22:14:29 UTC 2009


Author: lkundrak

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

Modified Files:
	.cvsignore sources sunbird.spec 
Added Files:
	mozilla-jemalloc.patch sunbird-1.0-libical.patch 
	sunbird-1.0-uilocale.patch thunderbird-pango.patch 
	thunderbird-shared-error.patch 
Removed Files:
	sunbird-0.7-path.patch sunbird-0.7-uilocale.patch 
	sunbird-0.9-libical.patch 
Log Message:
* Tue Apr 28 2009 Lubomir Rintel <lkundrak at v3.sk> - 1.0-0.1.20090302hg
- Update to version matching current Thunderbird


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-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 {

thunderbird-shared-error.patch:

--- NEW FILE thunderbird-shared-error.patch ---
diff -upU8 thunderbird-3.0/mail/installer/Makefile.in.shared-error thunderbird-3.0/mail/installer/Makefile.in
--- thunderbird-3.0/mail/installer/Makefile.in.shared-error	2009-02-24 03:16:03.000000000 +0100
+++ thunderbird-3.0/mail/installer/Makefile.in	2009-02-27 16:02:31.000000000 +0100
@@ -56,16 +56,17 @@ NO_PKG_FILES = \
 	PalmSyncInstall.exe \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
 
 ifdef BUILD_STATIC_LIBS
+ifeq (BUILD_STATIC_LIBS, 1)
 ifeq (WINNT,$(OS_ARCH))
 MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static
 endif
 else
 $(error you need a "--enable-static --disable-shared" build to create an installer)
 endif
 
 MOZ_NONLOCALIZED_PKG_LIST = \
@@ -80,16 +81,17 @@ MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
 DEFINES += -DAB_CD=$(AB_CD)
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = packages-static
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
 	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
 endif
+endif
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 MOZ_PKG_MAC_DSSTORE=branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=branding/background.png
 MOZ_PKG_MAC_ICON=branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/sunbird/devel/.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 Apr 2009 22:13:59 -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
+thunderbird-3.0b2-source.tar.bz2
+sunbird-l10n.tar


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/sunbird/devel/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 Apr 2009 22:13:59 -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
+3a6a95040c4356139a02eab5d32b9ad1  thunderbird-3.0b2-source.tar.bz2
+9f6fe61412669daeb30158832619d4a3  sunbird-l10n.tar


Index: sunbird.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sunbird/devel/sunbird.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- sunbird.spec	1 Mar 2009 12:47:20 -0000	1.21
+++ sunbird.spec	28 Apr 2009 22:13:59 -0000	1.22
@@ -1,41 +1,41 @@
 %bcond_without lightning
 %ifarch ppc
 %if 0%{?rhel}
-%define with_lightning 0
+%define with_lightning %{nil}
 %endif
 %endif
 
-%define progdir %{_prefix}/%{_lib}/%{name}-%{version}
-%define docs LEGAL LICENSE README.txt
-%{?_with_official:%define official 1}
+%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:        6%{?dist}
+Version:        1.0
+Release:        0.1.20090302hg%{?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:        thunderbird-3.0b2-source.tar.bz2
 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
+Patch0:         sunbird-1.0-libical.patch
+Patch3:         sunbird-1.0-uilocale.patch
 Patch4:         sunbird-0.9-gcc44.patch
-   
+Patch21:        mozilla-jemalloc.patch
+Patch22:        thunderbird-shared-error.patch
+Patch24:        thunderbird-pango.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libIDL-devel
@@ -52,19 +52,17 @@ BuildRequires:  libical-devel
 BuildRequires:  zip
 
 Requires(post):  desktop-file-utils
-Requires(postun):  desktop-file-utils
-
-# There's no RHEL desktop for ppc, therefore no thunderbird
-ExcludeArch: ppc
+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}
+
+%if %with lightning
 %package -n thunderbird-lightning
 Summary:        The calendar extension to Thunderbird
 Group:          Applications/Productivity
@@ -79,158 +77,125 @@ 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 
 %endif
 
 
 %prep
-%setup -q -n mozilla
-%patch0 -p1 -b .libical
-%patch2 -p1 -b .path
-%patch3 -p1 -b .uilocale
-%patch4 -p1 -b .gcc44
-# 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 -c -a 2
+%patch0 -p0 -b .libical
+%patch3 -p0 -b .uilocale
+%patch4 -p0 -b .gcc44
+%patch21 -p0 -b .jemalloc
+%patch22 -p1 -b .shared-error
+%patch24 -p1 -b .pango-fix
+
+find $RPM_BUILD_ROOT -name '*.cpp' -o -name '*.h' -print0 |
+        xargs -0 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
-%if %{with_lightning}
-ac_add_options --enable-extensions=default,lightning
-%else
-ac_add_options --enable-extensions=default
-%endif
-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 -k -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
-
-%if %{with_lightning}
-# Avoid "Chrome Registration Failed" message on first startup and extension installation
-touch $RPM_BUILD_ROOT%{progdir}/extensions/%{lightning_extname}/chrome.manifest
-%endif
+        --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 -print0 |xargs -0 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
 
-%if %{with_lightning}
+%if %with lightning
+# Avoid "Chrome Registration Failed" message on first startup and extension installation
+touch $RPM_BUILD_ROOT%{progdir}/extensions/%{lightning_extname}/chrome.manifest
+
 # Lightning
-unzip -qod $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning dist/xpi-stage/lightning.xpi
+unzip -qod $RPM_BUILD_ROOT%{_libdir}/thunderbird-lightning mozilla/dist/xpi-stage/lightning.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' -print0 |
+        xargs -0 chmod 0644 mozilla/LICENSE
+find $RPM_BUILD_ROOT -name '*.so' -print0 |
+        xargs -0 chmod 0755
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -240,7 +205,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
 
 
@@ -248,18 +213,18 @@ 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}
+%if %with lightning
 %post -n thunderbird-lightning
 %{tbupdate_lightning} install || :
 
 
 %preun -n thunderbird-lightning
 if [ $1 = 0 ]; then
-  %{tbupdate_lightning} remove || :
+        %{tbupdate_lightning} remove || :
 fi
 
 
@@ -268,7 +233,7 @@ 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 || :
 fi
 
 %triggerin -n thunderbird-lightning -- thunderbird
@@ -281,28 +246,32 @@ fi
 # 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 || :
 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}
+%if %with lightning
 %files -n thunderbird-lightning
+%doc mozilla/LEGAL mozilla/LICENSE mozilla/README.txt
 %defattr(-,root,root,-)
 %{_libdir}/thunderbird-lightning
 %endif
 
 
 %changelog
+* 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
 


--- 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