- Update to 1.5 beta1

- Bring the install phase of the spec file up to speed
This commit is contained in:
Christopher Aillon 2005-09-28 17:41:24 +00:00
parent f3381bf1af
commit 78907605a1
7 changed files with 583 additions and 134 deletions

View File

@ -3,3 +3,4 @@ thunderbird-source-0.8.tar.bz2
thunderbird-0.9-source.tar.bz2 thunderbird-0.9-source.tar.bz2
thunderbird-1.0rc-source.tar.bz2 thunderbird-1.0rc-source.tar.bz2
thunderbird-1.0-source.tar.bz2 thunderbird-1.0-source.tar.bz2
thunderbird-1.5b1-source.tar.bz2

459
firefox-1.1-uriloader.patch Executable file
View File

@ -0,0 +1,459 @@
Index: uriloader/exthandler/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/Makefile.in,v
retrieving revision 1.60
diff -d -u -p -r1.60 Makefile.in
--- uriloader/exthandler/Makefile.in 2 May 2005 16:30:03 -0000 1.60
+++ uriloader/exthandler/Makefile.in 21 Jul 2005 03:07:39 -0000
@@ -102,7 +102,7 @@ endif
LOCAL_INCLUDES = -I$(srcdir)
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-OSHELPER += nsGNOMERegistry.cpp
+OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
Index: uriloader/exthandler/unix/nsGNOMERegistry.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp,v
retrieving revision 1.10
diff -d -u -p -r1.10 nsGNOMERegistry.cpp
--- uriloader/exthandler/unix/nsGNOMERegistry.cpp 16 Oct 2004 13:46:17 -0000 1.10
+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp 21 Jul 2005 03:07:40 -0000
@@ -42,7 +42,7 @@
#include "nsString.h"
#include "nsIComponentManager.h"
#include "nsILocalFile.h"
-#include "nsMIMEInfoImpl.h"
+#include "nsMIMEInfoUnix.h"
#include "nsAutoPtr.h"
#include <glib.h>
@@ -56,12 +56,12 @@ typedef struct _GConfClient GConfClient;
typedef struct _GnomeProgram GnomeProgram;
typedef struct _GnomeModuleInfo GnomeModuleInfo;
-typedef struct {
+struct GnomeVFSMimeApplication {
char *id;
char *name;
char *command;
/* there is more here, but we don't need it */
-} GnomeVFSMimeApplication;
+};
typedef GConfClient * (*_gconf_client_get_default_fn)();
typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
@@ -264,7 +264,7 @@ nsGNOMERegistry::GetAppDescForScheme(con
}
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
nsGNOMERegistry::GetFromExtension(const char *aFileExt)
{
if (!gconfLib)
@@ -286,7 +286,7 @@ nsGNOMERegistry::GetFromExtension(const
return GetFromType(mimeType);
}
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
nsGNOMERegistry::GetFromType(const char *aMIMEType)
{
if (!gconfLib)
@@ -296,9 +296,11 @@ nsGNOMERegistry::GetFromType(const char
if (!handlerApp)
return nsnull;
- nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
+ nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
NS_ENSURE_TRUE(mimeInfo, nsnull);
+ mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp);
+
// Get the list of extensions and append then to the mimeInfo.
GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType);
for (GList *extension = extensions; extension; extension = extension->next)
@@ -320,11 +322,21 @@ nsGNOMERegistry::GetFromType(const char
return nsnull;
}
- gchar *commandPath = g_find_program_in_path(nativeCommand);
+ gchar **argv;
+ gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
+ if (!res) {
+ NS_ERROR("Could not convert helper app command to filesystem encoding");
+ _gnome_vfs_mime_application_free(handlerApp);
+ return nsnull;
+ }
+
+ gchar *commandPath = g_find_program_in_path(argv[0]);
g_free(nativeCommand);
+ g_strfreev(argv);
if (!commandPath) {
+ NS_WARNING("could not find command in path");
_gnome_vfs_mime_application_free(handlerApp);
return nsnull;
}
@@ -342,7 +354,7 @@ nsGNOMERegistry::GetFromType(const char
_gnome_vfs_mime_application_free(handlerApp);
- nsMIMEInfoBase* retval;
+ nsMIMEInfoUnix* retval;
NS_ADDREF((retval = mimeInfo));
return retval;
}
Index: uriloader/exthandler/unix/nsGNOMERegistry.h
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.h,v
retrieving revision 1.3
diff -d -u -p -r1.3 nsGNOMERegistry.h
--- uriloader/exthandler/unix/nsGNOMERegistry.h 16 Oct 2004 13:46:17 -0000 1.3
+++ uriloader/exthandler/unix/nsGNOMERegistry.h 21 Jul 2005 03:07:40 -0000
@@ -35,10 +35,13 @@
*
* ***** END LICENSE BLOCK ***** */
+#ifndef nsGNOMERegistry_h__
+#define nsGNOMERegistry_h__
+
#include "nsIURI.h"
#include "nsCOMPtr.h"
-class nsMIMEInfoBase;
+class nsMIMEInfoUnix;
class nsGNOMERegistry
{
@@ -52,7 +55,9 @@ class nsGNOMERegistry
static void GetAppDescForScheme(const nsACString& aScheme,
nsAString& aDesc);
- static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
+ static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
- static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
+ static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
};
+
+#endif // nsGNOMERegistry_h__
Index: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
===================================================================
RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 21 Jul 2005 03:07:40 -0000
@@ -0,0 +1,196 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org Code.
+ *
+ * The Initial Developer of the Original Code is
+ * Red Hat, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Christopher Aillon <caillon@redhat.com> (Original author)
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsMIMEInfoUnix.h"
+#include "prlink.h"
+#include "prmem.h"
+#include <glib.h>
+#include <glib-object.h>
+
+static PRLibrary *gnomeLib;
+static PRLibrary *vfsLib;
+
+typedef struct _GnomeProgram GnomeProgram;
+typedef struct _GnomeModuleInfo GnomeModuleInfo;
+
+typedef enum {
+ GNOME_VFS_OK // there's more but we don't care about them.
+} GnomeVFSResult;
+
+typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
+ (GnomeVFSMimeApplication *app,
+ GList *uris);
+typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
+typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
+typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
+ const GnomeModuleInfo *, int,
+ char **, const char *, ...);
+typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
+typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
+typedef GnomeProgram * (*_gnome_program_get_fn)();
+typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
+
+#define DECL_FUNC_PTR(func) static _##func##_fn _##func
+
+DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
+DECL_FUNC_PTR(gnome_vfs_mime_application_free);
+DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
+DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
+DECL_FUNC_PTR(gnome_program_init);
+DECL_FUNC_PTR(gnome_program_get);
+DECL_FUNC_PTR(libgnome_module_info_get);
+DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
+
+static PRLibrary *
+LoadVersionedLibrary(const char* libName, const char* libVersion)
+{
+ char *platformLibName = PR_GetLibraryName(nsnull, libName);
+ nsCAutoString versionLibName(platformLibName);
+ versionLibName.Append(libVersion);
+ PR_Free(platformLibName);
+ return PR_LoadLibrary(versionLibName.get());
+}
+
+static void
+Cleanup()
+{
+ // Unload all libraries
+ if (gnomeLib)
+ PR_UnloadLibrary(gnomeLib);
+ if (vfsLib)
+ PR_UnloadLibrary(vfsLib);
+
+ gnomeLib = vfsLib = nsnull;
+}
+
+static void
+InitGnomeVFS()
+{
+ static PRBool initialized = PR_FALSE;
+
+ if (initialized)
+ return;
+
+ #define ENSURE_LIB(lib) \
+ PR_BEGIN_MACRO \
+ if (!lib) { \
+ Cleanup(); \
+ return; \
+ } \
+ PR_END_MACRO
+
+ #define GET_LIB_FUNCTION(lib, func, failure) \
+ PR_BEGIN_MACRO \
+ _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
+ if (!_##func) { \
+ failure; \
+ } \
+ PR_END_MACRO
+
+ // Attempt to open libgnome
+ gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
+ ENSURE_LIB(gnomeLib);
+
+ GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
+ GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
+ GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
+
+ // Attempt to open libgnomevfs
+ vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
+ ENSURE_LIB(vfsLib);
+
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
+ GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
+
+ // Initialize GNOME, if it's not already initialized. It's not
+ // necessary to tell GNOME about our actual command line arguments.
+
+ if (!_gnome_program_get()) {
+ char *argv[1] = { "gecko" };
+ _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
+ 1, argv, NULL);
+ }
+
+ // Note: after GNOME has been initialized, do not ever unload these
+ // libraries. They register atexit handlers, so if they are unloaded, we'll
+ // crash on exit.
+}
+
+void
+nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
+{
+ if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
+ mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
+
+ mPreferredAction = nsIMIMEInfo::useSystemDefault;
+
+ const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
+ if (name)
+ mDefaultAppDescription = NS_ConvertUTF8toUCS2(name);
+ }
+}
+
+nsMIMEInfoUnix::~nsMIMEInfoUnix()
+{
+ if (mDefaultVFSApplication)
+ _gnome_vfs_mime_application_free(mDefaultVFSApplication);
+}
+
+nsresult
+nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
+{
+ NS_ENSURE_ARG_POINTER(aFile);
+
+ InitGnomeVFS();
+
+ if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
+ nsCAutoString nativePath;
+ aFile->GetNativePath(nativePath);
+
+ gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
+
+ GList *uris = NULL;
+ uris = g_list_append(uris, uri);
+
+ GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
+
+ g_free(uri);
+ g_list_free(uris);
+
+ if (result != GNOME_VFS_OK)
+ return NS_ERROR_FAILURE;
+
+ return NS_OK;
+ }
+
+ if (!mDefaultApplication)
+ return NS_ERROR_FILE_NOT_FOUND;
+
+ return LaunchWithIProcess(mDefaultApplication, aFile);
+}
Index: uriloader/exthandler/unix/nsMIMEInfoUnix.h
===================================================================
RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.h
diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.h 21 Jul 2005 03:07:40 -0000
@@ -0,0 +1,50 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org Code.
+ *
+ * The Initial Developer of the Original Code is
+ * Red Hat, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Christopher Aillon <caillon@redhat.com> (Original author)
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nsMimeInfoUnix_h__
+#define nsMimeInfoUnix_h__
+
+#include "nsMIMEInfoImpl.h"
+
+struct GnomeVFSMimeApplication;
+
+class nsMIMEInfoUnix : public nsMIMEInfoImpl
+{
+public:
+ nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
+ nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {};
+
+ virtual ~nsMIMEInfoUnix();
+
+ void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
+
+protected:
+ virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
+
+ GnomeVFSMimeApplication *mDefaultVFSApplication;
+};
+
+#endif // nsMimeInfoUnix_h__
Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
retrieving revision 1.58
diff -d -u -p -r1.58 nsOSHelperAppService.cpp
--- uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58
+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp 21 Jul 2005 03:07:40 -0000
@@ -44,6 +44,7 @@
#include "nsOSHelperAppService.h"
#ifdef MOZ_WIDGET_GTK2
#include "nsGNOMERegistry.h"
+#include "nsMIMEInfoUnix.h"
#endif
#include "nsISupports.h"
#include "nsString.h"
@@ -1486,6 +1487,17 @@ nsOSHelperAppService::GetFromType(const
LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType.get()));
+#ifdef MOZ_WIDGET_GTK2
+ // Look in GNOME registry first since it is the preferred method in GNOME,
+ // should trump the mailcap entry
+ LOG(("Looking in GNOME registry\n"));
+ nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
+ if (gnomeInfo) {
+ LOG(("Got MIMEInfo from GNOME registry\n"));
+ return gnomeInfo;
+ }
+#endif
+
// extract the major and minor types
NS_ConvertASCIItoUTF16 mimeType(aMIMEType);
nsAString::const_iterator start_iter, end_iter,
@@ -1522,21 +1534,6 @@ nsOSHelperAppService::GetFromType(const
mozillaFlags,
PR_TRUE);
-
- if (handler.IsEmpty() && extensions.IsEmpty() &&
- mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) {
- // No useful data yet
-
-#ifdef MOZ_WIDGET_GTK2
- LOG(("Looking in GNOME registry\n"));
- nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
- if (gnomeInfo) {
- LOG(("Got MIMEInfo from GNOME registry\n"));
- return gnomeInfo;
- }
-#endif
- }
-
if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
DoLookUpHandlerAndDescription(majorType,
minorType,

View File

@ -1 +1 @@
a0ddcc8bd5ee2c9be724b6963ad27111 thunderbird-1.0.6-source.tar.bz2 5fffd977cc4c873731bc15b13c5503b0 thunderbird-1.5b1-source.tar.bz2

View File

@ -0,0 +1,27 @@
Index: mail/components/preferences/advanced.xul
===================================================================
RCS file: /cvsroot/mozilla/mail/components/preferences/advanced.xul,v
retrieving revision 1.13.2.1
diff -d -u -p -r1.13.2.1 advanced.xul
--- mail/components/preferences/advanced.xul 2 Sep 2005 23:29:08 -0000 1.13.2.1
+++ mail/components/preferences/advanced.xul 15 Sep 2005 05:50:06 -0000
@@ -66,19 +66,8 @@
<preference id="offline.download.download_messages" name="offline.download.download_messages" type="int"/>
<preference id="mail.prompt_purge_threshhold" name="mail.prompt_purge_threshhold" type="bool"/>
<preference id="mail.purge_threshhold" name="mail.purge_threshhold" type="int"/>
- <preference id="app.update.enabled" name="app.update.enabled" type="bool"
- onchange="gAdvancedPane.updateAppUpdateItems();
- gAdvancedPane.updateAutoItems();
- gAdvancedPane.updateModeItems();"/>
- <preference id="app.update.auto" name="app.update.auto" type="bool"
- onchange="gAdvancedPane.updateAutoItems(); gAdvancedPane.updateModeItems();"/>
- <preference id="app.update.mode" name="app.update.mode" type="int"
- onchange="gAdvancedPane.updateModeItems();"/>
<preference id="extensions.update.enabled" name="extensions.update.enabled" type="bool"
onchange="gAdvancedPane.updateAddonUpdateUI();"/>
- <preference id="app.update.disable_button.showUpdateHistory"
- name="app.update.disable_button.showUpdateHistory"
- type="bool"/>
</preferences>
<tabbox id="advancedPrefs" flex="1" onselect="gAdvancedPane.tabSelectionChanged();">

View File

@ -1,29 +1,25 @@
. $topsrcdir/mail/config/mozconfig . $topsrcdir/mail/config/mozconfig
ac_add_options --with-system-nspr
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-png
ac_add_options --with-pthreads
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-installer
ac_add_options --enable-optimize="$RPM_OPT_FLAGS"
ac_add_options --enable-xinerama
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --disable-xprint
ac_add_options --disable-strip
ac_add_options --enable-pango
ac_add_options --enable-system-cairo
ac_add_options --enable-svg
ac_add_options --enable-canvas
export BUILD_OFFICIAL=1 export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1 export MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --enable-optimize="$CFLAGS"
ac_add_options --with-system-nspr
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib
ac_add_options --with-pthreads
ac_add_options --enable-freetype2
ac_add_options --enable-xinerama
ac_add_options --disable-xprint
ac_add_options --disable-debug
# for creating debuginfo RPMs
ac_add_options --disable-strip
ac_add_options --disable-tests
# fedora has permission to use the official Mozilla.org branding
ac_add_options --enable-official-branding
ac_add_options --enable-pango

1
thunderbird-mozconfig-branded Executable file
View File

@ -0,0 +1 @@
ac_add_options --enable-official-branding

View File

@ -1,74 +1,56 @@
# Option: Freetype Patch (FC3+) %define desktop_file_utils_version 0.9
%define freetype_fc3 1 %define nspr_version 4.6
%define cairo_version 1.0
%define desktop_file_utils_version 0.3 %define official_branding 0
ExcludeArch: ppc64
Summary: Mozilla Thunderbird mail/newsgroup client Summary: Mozilla Thunderbird mail/newsgroup client
Name: thunderbird Name: thunderbird
Version: 1.0.6 Version: 1.5
Release: 5 Release: 0.5.0.beta1
Epoch: 0 Epoch: 0
URL: http://www.mozilla.org/projects/thunderbird/ URL: http://www.mozilla.org/projects/thunderbird/
License: MPL License: MPL
Group: Applications/Internet Group: Applications/Internet
Source0: thunderbird-%{version}-source.tar.bz2 %if %{official_branding}
Source1: thunderbird.desktop %define tarball thunderbird-%{version}-source.tar.bz2
# This icon is used with the permission of mozilla.org. %else
Source2: thunderbird.png %define tarball thunderbird-1.5b1-source.tar.bz2
Source3: thunderbird.sh.in %endif
Source4: thunderbird-mozconfig Source0: %{tarball}
Source5: release-notes.html Source10: thunderbird-mozconfig
Source6: thunderbird-open-browser.sh Source11: thunderbird-mozconfig-branded
Source10: thunderbird-redhat-default-prefs.js Source12: thunderbird-redhat-default-prefs.js
Source20: thunderbird.desktop
Source21: thunderbird.sh.in
Source22: thunderbird.png
Source30: thunderbird-open-browser.sh
Source100: find-external-requires Source100: find-external-requires
# Build patches # Build patches
Patch1: thunderbird-0.7.3-freetype-compile.patch
Patch2: firefox-1.0-prdtoa.patch Patch2: firefox-1.0-prdtoa.patch
Patch3: firefox-1.0-gcc4-compile.patch Patch6: firefox-1.1-nss-system-nspr.patch
Patch4: firefox-1.0-recv-fortify.patch
Patch5: firefox-1.0-gfxshared_s.patch
Patch6: firefox-1.0-nss-system-nspr.patch
Patch7: firefox-1.0-system-nspr-ldap.patch
Patch10: thunderbird-0.7.3-psfonts.patch Patch10: thunderbird-0.7.3-psfonts.patch
Patch11: thunderbird-0.7.3-gnome-uriloader.patch Patch11: thunderbird-0.7.3-gnome-uriloader.patch
# customization patches # customization patches
Patch24: thunderbird-0.8-default-applications.patch Patch24: thunderbird-0.8-default-applications.patch
Patch25: thunderbird-0.8-software-update.patch Patch25: thunderbird-1.1-software-update.patch
# pango patches
Patch30: mozilla-1.7.3-pango-render.patch
Patch31: firefox-1.0-pango-selection.patch
Patch32: firefox-1.0-pango-space-width.patch
Patch33: firefox-1.0-pango-rounding.patch
Patch34: firefox-1.0-pango-direction.patch
Patch35: firefox-1.0-pango-bidi-justify.patch
Patch36: firefox-1.0-pango-cairo.patch
# local bugfixes # local bugfixes
Patch41: thunderbird-0.8.0-stack-direction.patch Patch42: firefox-1.1-uriloader.patch
Patch42: firefox-1.0-download-to-desktop.patch
Patch43: firefox-1.0-uriloader.patch
# Backported patches, intended for upstream # font system fixes
Patch90: thunderbird-1.0-gtk-file-chooser-morefixes.patch Patch81: firefox-nopangoxft.patch
Patch91: firefox-1.1-modal-filechooser.patch
# patches from upstream (Patch100+)
Patch100: firefox-1.5-cairo-show-text-behavior-change.patch
# Already upstreamed
Patch101: thunderbird-0.8.0-pkgconfig.patch
Patch102: thunderbird-1.0-useragent.patch
Patch103: firefox-1.0-gtk-system-colors.patch
Patch104: firefox-1.0-remote-intern-atoms.patch
Patch105: firefox-1.0-g-application-name.patch
Patch106: firefox-1.0-candidate-window.patch
Patch107: firefox-1.0-imgloader-comarray.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: nspr >= %{nspr_devel} Requires: nspr >= %{nspr_devel}
BuildRequires: cairo-devel >= %{cairo_version}
BuildRequires: libpng-devel, libjpeg-devel, gtk2-devel BuildRequires: libpng-devel, libjpeg-devel, gtk2-devel
BuildRequires: zlib-devel, gzip, zip, unzip BuildRequires: zlib-devel, gzip, zip, unzip
BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nspr-devel >= %{nspr_version}
@ -94,43 +76,22 @@ Mozilla Thunderbird is a standalone mail and newsgroup client.
%prep %prep
%setup -q -n mozilla %setup -q -n mozilla
%{__cp} -f %{SOURCE4} .mozconfig
echo "ac_add_options --libdir=%{_libdir}" >> .mozconfig
echo "ac_add_options --with-default-mozilla-five-home=%{tbdir}" >> .mozconfig
echo "mk_add_options MOZ_MAKE_FLAGS='%{?_smp_mflags}'" >> .mozconfig
%{__cp} -f %{SOURCE5} .
%if %{freetype_fc3}
%patch1 -p0 -b .freetype
%endif
%patch2 -p0 %patch2 -p0
%patch3 -p0 -b .gcc4
%patch4 -p0 -b .recv-fortify
%patch5 -p0
%patch6 -p1 %patch6 -p1
%patch7 -p0
%patch10 -p1 -b .psfonts %patch10 -p1 -b .psfonts
%patch11 -p1 -b .gnome-uriloader %patch11 -p1 -b .gnome-uriloader
%patch24 -p1 %patch24 -p1
%patch25 -p1 %patch25 -p0
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p0
%patch36 -p1
%patch41 -p0
%patch42 -p0 %patch42 -p0
%patch43 -p0 %patch81 -p1
%patch90 -p0 -b .gtk-file-chooser-morefixes %patch100 -p0
%patch91 -p0
%patch101 -p0 -b .pkgconfig %{__rm} -f .mozconfig
%patch102 -p0 %{__cp} %{SOURCE10} .mozconfig
%patch103 -p0 %if %{official_branding}
%patch104 -p0 %{__cat} %{SOURCE11} >> .mozconfig
%patch105 -p0 %endif
%patch106 -p1
%patch107 -p0
#=============================================================================== #===============================================================================
@ -147,56 +108,61 @@ time make -f client.mk build_all
#=============================================================================== #===============================================================================
%install %install
%{__rm} -rf %{buildroot} %{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir_p} %{buildroot}{%{tbdir},%{_bindir}}
cd dist/bin cd mail/installer
%{__tar} ch ./ | ( cd %{buildroot}%{tbdir} ; tar xf - ) %{__make} STRIP=/bin/true
cd - cd -
# menu entry %{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications}
install -p -D %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/thunderbird.png
%{__tar} -C $RPM_BUILD_ROOT%{_libdir}/ -xzf dist/%{name}-*linux*.tar.gz
%{__mv} $RPM_BUILD_ROOT%{_libdir}/%{name} $RPM_BUILD_ROOT%{tbdir}
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/%{name}-*linux*.tar
%{__install} -p -D %{SOURCE22} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
desktop-file-install --vendor mozilla \ desktop-file-install --vendor mozilla \
--dir %{buildroot}%{_datadir}/applications \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \
--add-category X-Red-Hat \ --add-category X-Fedora \
--add-category Application \ --add-category Application \
--add-category Network \ --add-category Network \
%{SOURCE1} %{SOURCE20}
# set up the thunderbird start script # set up the thunderbird start script
%{__cat} %{SOURCE3} | %{__sed} -e 's,TBIRD_VERSION,%{version},g' > \ %{__cat} %{SOURCE21} | %{__sed} -e 's,TBIRD_VERSION,%{version},g' > \
$RPM_BUILD_ROOT%{_bindir}/thunderbird $RPM_BUILD_ROOT%{_bindir}/thunderbird
%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/thunderbird %{__chmod} 755 $RPM_BUILD_ROOT/%{_bindir}/thunderbird
install -m755 %{SOURCE6} %{buildroot}%{tbdir}/open-browser.sh install -m755 %{SOURCE30} $RPM_BUILD_ROOT/%{tbdir}/open-browser.sh
perl -pi -e 's|LIBDIR|%{_libdir}|g' %{buildroot}%{tbdir}/open-browser.sh perl -pi -e 's|LIBDIR|%{_libdir}|g' $RPM_BUILD_ROOT/%{tbdir}/open-browser.sh
%{__cat} %{SOURCE10} | %{__sed} -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g' \ %{__cat} %{SOURCE12} | %{__sed} -e 's,THUNDERBIRD_RPM_VR,%{version}-%{release},g' \
-e 's,COMMAND,%{tbdir}/open-browser.sh,g' > \ -e 's,COMMAND,%{tbdir}/open-browser.sh,g' > \
$RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/rh-default-prefs
%{__cp} $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{tbdir}/greprefs/all-redhat.js %{__cp} $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{tbdir}/greprefs/all-redhat.js
%{__cp} $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{tbdir}/defaults/pref/all-redhat.js %{__cp} $RPM_BUILD_ROOT/rh-default-prefs $RPM_BUILD_ROOT/%{tbdir}/defaults/pref/all-redhat.js
%{__rm} $RPM_BUILD_ROOT/rh-default-prefs %{__rm} $RPM_BUILD_ROOT/rh-default-prefs
cd $RPM_BUILD_ROOT/%{tbdir} # own mozilla plugin dir (#135050)
export MOZ_DISABLE_GNOME=1 %{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins
# munge HOME for now, since XPCOM creates $HOME/.mozilla %{__rm} -f $RPM_BUILD_ROOT%{tbdir}/thunderbird-config
MOZTMP=`mktemp -d`
HOME=$MOZTMP ./thunderbird -register
%{__rm} -rf $MOZTMP/.mozilla
cd $RPM_BUILD_ROOT%{tbdir}/chrome
find . -name "*" -type d -maxdepth 1 -exec %{__rm} -rf {} \;
cd - cd -
%{__rm} -rf $RPM_BUILD_ROOT/%{tbdir}/chrome/{classic,comm,embed-sample,en-{mac,win},help,messenger}
# ...
#===============================================================================
%clean %clean
%{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf $RPM_BUILD_ROOT
#=============================================================================== %post
update-desktop-database %{_datadir}/applications
%postun
update-desktop-database %{_datadir}/applications
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -204,14 +170,13 @@ cd -
%attr(644,root,root) %{_datadir}/applications/mozilla-thunderbird.desktop %attr(644,root,root) %{_datadir}/applications/mozilla-thunderbird.desktop
%attr(644,root,root) %{_datadir}/pixmaps/thunderbird.png %attr(644,root,root) %{_datadir}/pixmaps/thunderbird.png
%{tbdir} %{tbdir}
%doc release-notes.html
#=============================================================================== #===============================================================================
%changelog %changelog
* Thu Aug 18 2005 Kristian Høgsberg <krh@redhat.com> 0:1.0.6-5 * Wed Sep 28 2005 Christopher Aillon <caillon@redhat.com> 1.5-0.5.0.beta1
- Update firefox-1.0-pango-cairo.patch to also fix xft usage in - Update to 1.5 beta1
mozilla/gfx/src/gtk/mozilla-decoder.cpp - Bring the install phase of the spec file up to speed
* Sun Aug 14 2005 Christopher Aillon <caillon@redhat.com> 1.0.6-4 * Sun Aug 14 2005 Christopher Aillon <caillon@redhat.com> 1.0.6-4
- Rebuild - Rebuild