forked from pool/MozillaFirefox
devel package
OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=186
This commit is contained in:
parent
bed05d522d
commit
4814124e9b
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 28 08:56:12 UTC 2011 - wr@rosenauer.org
|
||||
|
||||
- set correct desktop file name within KDE for 11.4 and up
|
||||
- add devel package with macros for extensions (from lnussel@suse.de)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 22 22:21:52 UTC 2011 - wr@rosenauer.org
|
||||
|
||||
@ -5,7 +11,6 @@ Sat Jan 22 22:21:52 UTC 2011 - wr@rosenauer.org
|
||||
- removed obsolete firefox-shell-bmo624267.patch
|
||||
- testpilot moved to distribution/extensions
|
||||
- updated locale provides and removed bn-IN from locales
|
||||
- use new macros for desktop file and icon registration
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 11 06:13:40 UTC 2011 - wr@rosenauer.org
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package MozillaFirefox
|
||||
# spec file for package MozillaFirefox (Version 4.0b10)
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# 2006-2011 Wolfgang Rosenauer
|
||||
@ -18,11 +18,13 @@
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%define major 4
|
||||
%define mainver %major.0
|
||||
|
||||
Name: MozillaFirefox
|
||||
%define use_xulrunner 1
|
||||
%define xulrunner mozilla-xulrunner20
|
||||
BuildRequires: Mesa-devel autoconf213 fdupes gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files yasm zip
|
||||
BuildRequires: autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm
|
||||
%if %suse_version > 1110
|
||||
BuildRequires: libiw-devel
|
||||
%else
|
||||
@ -32,10 +34,11 @@ BuildRequires: wireless-tools
|
||||
BuildRequires: %{xulrunner}-devel = 2.0b10
|
||||
%endif
|
||||
License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
|
||||
Version: 4.0b10
|
||||
Version: %{mainver}b10
|
||||
Release: 1
|
||||
Provides: web_browser
|
||||
Provides: firefox = %{version}
|
||||
Provides: firefox = %{version}-%{release}
|
||||
Provides: firefox = %{mainver}
|
||||
%define releasedate 2011012100
|
||||
Summary: Mozilla Firefox Web Browser
|
||||
Url: http://www.mozilla.org/
|
||||
@ -52,17 +55,19 @@ Source8: firefox-mimeinfo.xml
|
||||
Source9: firefox-lockdown.js
|
||||
Source10: compare-locales.tar.bz2
|
||||
Source11: firefox.1
|
||||
Source12: mozilla-get-app-id
|
||||
Patch1: toolkit-download-folder.patch
|
||||
Patch2: firefox-linkorder.patch
|
||||
Patch3: firefox-browser-css.patch
|
||||
Patch4: firefox-cross-desktop.patch
|
||||
Patch5: firefox-kde.patch
|
||||
Patch6: firefox-ui-lockdown.patch
|
||||
Patch7: firefox-no-sync-l10n.patch
|
||||
Patch8: firefox-libxulsdk-locales.patch
|
||||
Patch9: firefox-no-default-ualocale.patch
|
||||
Patch10: firefox-multilocale-chrome.patch
|
||||
Patch11: firefox-shellservice.patch
|
||||
Patch6: firefox-kde-114.patch
|
||||
Patch7: firefox-ui-lockdown.patch
|
||||
Patch8: firefox-no-sync-l10n.patch
|
||||
Patch9: firefox-libxulsdk-locales.patch
|
||||
Patch10: firefox-no-default-ualocale.patch
|
||||
Patch11: firefox-multilocale-chrome.patch
|
||||
Patch12: firefox-shellservice.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires(post): coreutils shared-mime-info desktop-file-utils
|
||||
Requires(postun): shared-mime-info desktop-file-utils
|
||||
@ -75,6 +80,7 @@ Requires: %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulru
|
||||
%endif
|
||||
%endif
|
||||
Requires: %{name}-branding >= 4.0
|
||||
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
|
||||
%define _use_internal_dependency_generator 0
|
||||
%define __find_requires sh %{SOURCE4}
|
||||
%global provfind sh -c "grep -v '.so' | %__find_provides"
|
||||
@ -102,9 +108,19 @@ Mozilla Firefox is a standalone web browser, designed for standards
|
||||
compliance and performance. Its functionality can be enhanced via a
|
||||
plethora of extensions.
|
||||
|
||||
%package devel
|
||||
License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
|
||||
Summary: Devel package for Firefox
|
||||
Group: Development/Tools/Other
|
||||
Provides: firefox-devel = %{version}-%{release}
|
||||
Requires: %{name} = %{version}
|
||||
Requires: perl(XML::Simple)
|
||||
Requires: perl(Archive::Zip)
|
||||
|
||||
%description devel
|
||||
Development files for Firefox to make packaging of addons easier.
|
||||
|
||||
%if %localize
|
||||
|
||||
%package translations-common
|
||||
Summary: Common translations for MozillaFirefox
|
||||
License: GPLv2+ ; LGPLv2.1+ ; MPLv1.1+
|
||||
@ -128,7 +144,6 @@ Obsoletes: %{name}-translations < %{version}-%{release}
|
||||
%description translations-other
|
||||
This package contains rarely used languages for the user interface
|
||||
of MozillaFirefox.
|
||||
|
||||
%endif
|
||||
|
||||
%package branding-upstream
|
||||
@ -166,12 +181,15 @@ cd $RPM_BUILD_DIR/mozilla
|
||||
# install kde.js
|
||||
install -m 644 %{SOURCE6} browser/app/profile/kde.js
|
||||
%endif
|
||||
#%patch6 -p1
|
||||
%patch7 -p1
|
||||
%if %suse_version >= 1140
|
||||
%patch6 -p1
|
||||
%endif
|
||||
#%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
export MOZ_BUILD_DATE=%{releasedate}
|
||||
@ -288,6 +306,8 @@ cp %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1/%{progname}.1
|
||||
##########
|
||||
# ADDONS
|
||||
#
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_appid}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_appid}
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
|
||||
ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}.png
|
||||
ln -sf %{progdir}/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}-gnome.png
|
||||
@ -306,6 +326,35 @@ rm -f $RPM_BUILD_ROOT%{progdir}/README.txt
|
||||
rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties
|
||||
rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh
|
||||
rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE
|
||||
# devel
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
install -m 755 %SOURCE12 %{buildroot}%{_bindir}
|
||||
# inspired by mandriva
|
||||
mkdir -p %{buildroot}/etc/rpm
|
||||
cat <<'FIN' >%{buildroot}/etc/rpm/macros.%{progname}
|
||||
# Macros from %{name} package
|
||||
%%firefox_major %{major}
|
||||
%%firefox_version %{version}
|
||||
%%firefox_mainver %{mainver}
|
||||
%%firefox_mozillapath %{progdir}
|
||||
%%firefox_xulrunner %{xulrunner}
|
||||
%%firefox_xulrunner_version %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
|
||||
%%firefox_pluginsdir %{_libdir}/browser-plugins
|
||||
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
|
||||
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi)
|
||||
|
||||
%%firefox_ext_install() \
|
||||
extdir="%%{buildroot}%%{firefox_extdir}/`mozilla-get-app-id '%%1'`" \
|
||||
mkdir -p "$extdir" \
|
||||
%%{__unzip} -q -d "$extdir" "%%1" \
|
||||
%%{nil}
|
||||
FIN
|
||||
# just dumping an xpi file there doesn't work...
|
||||
#%%firefox_ext_install() \
|
||||
# extdir="%%{buildroot}%%{firefox_extdir}" \
|
||||
# mkdir -p "$extdir" \
|
||||
# cp "%%1" "$extdir" \
|
||||
# %%{nil}
|
||||
# fdupes
|
||||
%fdupes $RPM_BUILD_ROOT%{progdir}
|
||||
%fdupes $RPM_BUILD_ROOT%{_datadir}
|
||||
@ -377,14 +426,24 @@ exit 0
|
||||
%{_datadir}/applications/%{desktop_file_name}.desktop
|
||||
%{_datadir}/mime/packages/%{progname}.xml
|
||||
%{_datadir}/pixmaps/firefox*
|
||||
%dir %{_datadir}/mozilla
|
||||
%dir %{_datadir}/mozilla/extensions
|
||||
%dir %{_datadir}/mozilla/extensions/%{firefox_appid}
|
||||
%dir %{_libdir}/mozilla
|
||||
%dir %{_libdir}/mozilla/extensions
|
||||
%dir %{_libdir}/mozilla/extensions/%{firefox_appid}
|
||||
%if %branding
|
||||
%{gnome_dir}/share/icons/hicolor/
|
||||
%endif
|
||||
%{_bindir}/%{progname}
|
||||
%doc %{_mandir}/man1/%{progname}.1.gz
|
||||
|
||||
%if %localize
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/mozilla-get-app-id
|
||||
%config /etc/rpm/macros.%{progname}
|
||||
|
||||
%if %localize
|
||||
%files translations-common -f %{_tmppath}/translations.common
|
||||
%defattr(-,root,root)
|
||||
%dir %{progdir}
|
||||
|
@ -1,13 +1,15 @@
|
||||
From: Wolfgang Rosenauer
|
||||
Subject: NonGnome/KDE integration
|
||||
NonGnome/KDE integration
|
||||
|
||||
References:
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=170055
|
||||
Caveats: desktop file name of Firefox is hardcoded to MozillaFirefox
|
||||
|
||||
diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsContextMenu.js
|
||||
--- a/browser/base/content/nsContextMenu.js
|
||||
+++ b/browser/base/content/nsContextMenu.js
|
||||
@@ -210,13 +210,15 @@ nsContextMenu.prototype = {
|
||||
@@ -237,17 +237,19 @@ nsContextMenu.prototype = {
|
||||
this.showItem("context-sep-viewsource", shouldShow);
|
||||
|
||||
// Set as Desktop background depends on whether an image was clicked on,
|
||||
// and only works if we have a shell service.
|
||||
var haveSetDesktopBackground = false;
|
||||
@ -24,46 +26,5 @@ diff --git a/browser/base/content/nsContextMenu.js b/browser/base/content/nsCont
|
||||
haveSetDesktopBackground && this.onLoadedImage);
|
||||
|
||||
if (haveSetDesktopBackground && this.onLoadedImage) {
|
||||
diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js
|
||||
--- a/browser/components/preferences/advanced.js
|
||||
+++ b/browser/components/preferences/advanced.js
|
||||
@@ -594,20 +594,38 @@ var gAdvancedPane = {
|
||||
var brandShortName = brandBundle.getString("brandShortName");
|
||||
var promptTitle = shellBundle.getString("setDefaultBrowserTitle");
|
||||
var promptMessage;
|
||||
const IPS = Components.interfaces.nsIPromptService;
|
||||
var psvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(IPS);
|
||||
+
|
||||
+ var env = Components.classes["@mozilla.org/process/environment;1"]
|
||||
+ .getService(Components.interfaces.nsIEnvironment);
|
||||
+ var kde_session = 0;
|
||||
+ if (env.get('KDE_FULL_SESSION') == "true")
|
||||
+ kde_session = 1;
|
||||
+
|
||||
if (!shellSvc.isDefaultBrowser(false)) {
|
||||
promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage",
|
||||
[brandShortName]);
|
||||
var rv = psvc.confirmEx(window, promptTitle, promptMessage,
|
||||
IPS.STD_YES_NO_BUTTONS,
|
||||
null, null, null, null, { });
|
||||
- if (rv == 0)
|
||||
+ if (rv == 0) {
|
||||
shellSvc.setDefaultBrowser(true, false);
|
||||
+ if (kde_session == 1) {
|
||||
+ var shellObj = Components.classes["@mozilla.org/file/local;1"]
|
||||
+ .createInstance(Components.interfaces.nsILocalFile);
|
||||
+ shellObj.initWithPath("/usr/bin/kwriteconfig");
|
||||
+ var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
+ .createInstance(Components.interfaces.nsIProcess);
|
||||
+ process.init(shellObj);
|
||||
+ var args = ["--file", "kdeglobals", "--group", "General", "--key", "BrowserApplication", "MozillaFirefox"];
|
||||
+ process.run(false, args, args.length);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else {
|
||||
promptMessage = shellBundle.getFormattedString("alreadyDefaultBrowser",
|
||||
[brandShortName]);
|
||||
psvc.alert(window, promptTitle, promptMessage);
|
||||
}
|
||||
document.getElementById("context-setDesktopBackground")
|
||||
.disabled = this.disableSetDesktopBackground();
|
||||
|
27
firefox-kde-114.patch
Normal file
27
firefox-kde-114.patch
Normal file
@ -0,0 +1,27 @@
|
||||
# HG changeset patch
|
||||
# User Wolfgang Rosenauer <wr@rosenauer.org>
|
||||
# Parent 51bf77cf40165f6567ca7d9a5ff90286739e525a
|
||||
With openSUSE 11.4 the desktop file name changed from MozillaFirefox to firefox
|
||||
|
||||
diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js
|
||||
--- a/browser/components/preferences/advanced.js
|
||||
+++ b/browser/components/preferences/advanced.js
|
||||
@@ -705,17 +705,17 @@ var gAdvancedPane = {
|
||||
shellSvc.setDefaultBrowser(true, false);
|
||||
if (kde_session == 1) {
|
||||
var shellObj = Components.classes["@mozilla.org/file/local;1"]
|
||||
.createInstance(Components.interfaces.nsILocalFile);
|
||||
shellObj.initWithPath("/usr/bin/kwriteconfig");
|
||||
var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
.createInstance(Components.interfaces.nsIProcess);
|
||||
process.init(shellObj);
|
||||
- var args = ["--file", "kdeglobals", "--group", "General", "--key", "BrowserApplication", "MozillaFirefox"];
|
||||
+ var args = ["--file", "kdeglobals", "--group", "General", "--key", "BrowserApplication", "firefox"];
|
||||
process.run(false, args, args.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
promptMessage = shellBundle.getFormattedString("alreadyDefaultBrowser",
|
||||
[brandShortName]);
|
||||
psvc.alert(window, promptTitle, promptMessage);
|
@ -1168,6 +1168,53 @@ diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/ns
|
||||
#if defined(XP_WIN) && !defined(__MINGW32__)
|
||||
{ &kNS_WINIEPROFILEMIGRATOR_CID, false, NULL, nsIEProfileMigratorConstructor },
|
||||
#elif defined(XP_MACOSX)
|
||||
diff --git a/browser/components/preferences/advanced.js b/browser/components/preferences/advanced.js
|
||||
--- a/browser/components/preferences/advanced.js
|
||||
+++ b/browser/components/preferences/advanced.js
|
||||
@@ -683,24 +683,42 @@ var gAdvancedPane = {
|
||||
var brandBundle = document.getElementById("bundleBrand");
|
||||
var shellBundle = document.getElementById("bundleShell");
|
||||
var brandShortName = brandBundle.getString("brandShortName");
|
||||
var promptTitle = shellBundle.getString("setDefaultBrowserTitle");
|
||||
var promptMessage;
|
||||
const IPS = Components.interfaces.nsIPromptService;
|
||||
var psvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(IPS);
|
||||
+
|
||||
+ var env = Components.classes["@mozilla.org/process/environment;1"]
|
||||
+ .getService(Components.interfaces.nsIEnvironment);
|
||||
+ var kde_session = 0;
|
||||
+ if (env.get('KDE_FULL_SESSION') == "true")
|
||||
+ kde_session = 1;
|
||||
+
|
||||
if (!shellSvc.isDefaultBrowser(false)) {
|
||||
promptMessage = shellBundle.getFormattedString("setDefaultBrowserMessage",
|
||||
[brandShortName]);
|
||||
var rv = psvc.confirmEx(window, promptTitle, promptMessage,
|
||||
IPS.STD_YES_NO_BUTTONS,
|
||||
null, null, null, null, { });
|
||||
- if (rv == 0)
|
||||
+ if (rv == 0) {
|
||||
shellSvc.setDefaultBrowser(true, false);
|
||||
+ if (kde_session == 1) {
|
||||
+ var shellObj = Components.classes["@mozilla.org/file/local;1"]
|
||||
+ .createInstance(Components.interfaces.nsILocalFile);
|
||||
+ shellObj.initWithPath("/usr/bin/kwriteconfig");
|
||||
+ var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
+ .createInstance(Components.interfaces.nsIProcess);
|
||||
+ process.init(shellObj);
|
||||
+ var args = ["--file", "kdeglobals", "--group", "General", "--key", "BrowserApplication", "MozillaFirefox"];
|
||||
+ process.run(false, args, args.length);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
else {
|
||||
promptMessage = shellBundle.getFormattedString("alreadyDefaultBrowser",
|
||||
[brandShortName]);
|
||||
psvc.alert(window, promptTitle, promptMessage);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in
|
||||
--- a/browser/components/shell/src/Makefile.in
|
||||
+++ b/browser/components/shell/src/Makefile.in
|
||||
|
@ -1,5 +1,6 @@
|
||||
# HG changeset patch
|
||||
# Parent bc45125446bfa168631a01c0b4b9b830c39d109a
|
||||
# Parent 2f2f266d47e42bf9ff421deeeeea2dd1985b19b0
|
||||
We need to package toolkit locales explicitely into firefox langpacks even in xulrunner based builds
|
||||
|
||||
diff --git a/browser/makefiles.sh b/browser/makefiles.sh
|
||||
--- a/browser/makefiles.sh
|
||||
|
@ -1,5 +1,6 @@
|
||||
# HG changeset patch
|
||||
# Parent 7530e890ad6ed214783244371ec1ef816d24083e
|
||||
# Parent e46704258210bc68bc65773f60a0d32cb2ce767d
|
||||
Bug 611953 - GNOME 3.0 readiness (based on patch 3)
|
||||
|
||||
diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp
|
||||
--- a/browser/components/shell/src/nsGNOMEShellService.cpp
|
||||
|
51
mozilla-get-app-id
Normal file
51
mozilla-get-app-id
Normal file
@ -0,0 +1,51 @@
|
||||
#!/usr/bin/perl -w
|
||||
use XML::Simple;
|
||||
|
||||
my $file = shift || die "Usage: $0 [install.rdf|somefile.xpi]\n";
|
||||
my $xml;
|
||||
|
||||
if ($file =~ /\.xpi$/) {
|
||||
use Archive::Zip qw/:ERROR_CODES :CONSTANTS/;
|
||||
my $zip = Archive::Zip->new();
|
||||
if ( $zip->read($file) != AZ_OK ) {
|
||||
die "zip file read error\n";
|
||||
}
|
||||
my $data = $zip->contents("install.rdf");
|
||||
die "missing install.rdf in $file\n" unless $data;
|
||||
$xml = XMLin($data) || die "$!\n";
|
||||
} elsif ($file =~ /install.rdf/) {
|
||||
$xml = XMLin($file) || die "$!\n";
|
||||
} else {
|
||||
die "unsupported file format\n";
|
||||
}
|
||||
|
||||
my $desc;
|
||||
for my $tag (qw/RDF:Description Description/) {
|
||||
if (exists $xml->{$tag}) {
|
||||
if (ref $xml->{$tag} eq 'ARRAY') {
|
||||
$desc = $xml->{$tag};
|
||||
} else {
|
||||
$desc = [ $xml->{$tag} ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $uuid;
|
||||
my $id;
|
||||
for my $x (@$desc) {
|
||||
if ($x->{"em:id"} =~ /{[[:xdigit:]]+-/) {
|
||||
print STDERR "Warning: multiple uuids!\n" if defined $uuid;
|
||||
$uuid = $x->{"em:id"};
|
||||
} elsif ($x->{"em:id"} =~ /@/) {
|
||||
print STDERR "Warning: multiple ids!\n" if defined $id;
|
||||
$id = $x->{"em:id"};
|
||||
}
|
||||
}
|
||||
|
||||
if (defined $id) {
|
||||
print "$id\n";
|
||||
} elsif (defined $uuid) {
|
||||
print "$uuid\n";
|
||||
} else {
|
||||
exit 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user