]> git.pld-linux.org Git - packages/firefox.git/blobdiff - mozilla-firefox.spec
- no need to _noautoreqdep sonames already eliminated by _noautoreq
[packages/firefox.git] / mozilla-firefox.spec
index 02442edcf1a252c8b5fc467f155cbaf30404a1f8..28ada85c3213435fd0970c6b341d072e1d41a4aa 100644 (file)
@@ -3,26 +3,28 @@
 # - see ftp://ftp.debian.org/debian/pool/main/m/mozilla-firefox/*diff*
 #   for hints how to make locales
 # - make it more pld-like (bookmarks, default page etc..)
-# - add dictionaries outside of mozilla
 #
 # Conditional build:
 %bcond_with    tests   # enable tests (whatever they check)
 %bcond_without gnome   # disable all GNOME components (gnomevfs, gnome, gnomeui)
 #
-Summary:       Mozilla Firefox web browser
-Summary(pl):   Mozilla Firefox - przegl±darka WWW
+Summary:       Firefox Community Edition web browser
+Summary(pl.UTF-8):     Firefox Community Edition - przeglądarka WWW
 Name:          mozilla-firefox
-Version:       2.0.0.1
-Release:       0.1
+Version:       2.0.0.4
+Release:       1
 License:       MPL/LGPL
 Group:         X11/Applications/Networking
 Source0:       ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}-source.tar.bz2
-# Source0-md5: 7a1fc804ed735c5b7e9b1498bac8b5db
+# Source0-md5: 99c14794976b2532addfcd2d836c6bb2
 Source1:       %{name}.desktop
 Source2:       %{name}.sh
+Patch0:                mozilla-install.patch
 Patch1:                %{name}-lib_path.patch
 Patch3:                %{name}-nopangoxft.patch
 Patch5:                %{name}-fonts.patch
+Patch69:       %{name}-agent.patch
+Patch7:                %{name}-myspell.patch
 # if ac rebuild is needed...
 #PatchX:               %{name}-ac.patch
 URL:           http://www.mozilla.org/projects/firefox/
@@ -31,18 +33,20 @@ BuildRequires:      automake
 BuildRequires: cairo-devel >= 1.0.0
 %{?with_gnome:BuildRequires:   gnome-vfs2-devel >= 2.0}
 BuildRequires: gtk+2-devel >= 1:2.0.0
-BuildRequires: heimdal-devel >= 0.7.1
+BuildRequires: krb5-devel
 BuildRequires: libIDL-devel >= 0.8.0
 %{?with_gnome:BuildRequires:   libgnome-devel >= 2.0}
 %{?with_gnome:BuildRequires:   libgnomeui-devel >= 2.2.0}
 BuildRequires: libjpeg-devel >= 6b
 BuildRequires: libpng-devel >= 1.2.7
 BuildRequires: libstdc++-devel
+BuildRequires: myspell-devel
 BuildRequires: nspr-devel >= 1:4.6.3
 BuildRequires: nss-devel >= 1:3.11.3-3
 BuildRequires: pango-devel >= 1:1.6.0
 BuildRequires: perl-modules >= 5.004
 BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.356
 BuildRequires: xorg-lib-libXext-devel
 BuildRequires: xorg-lib-libXft-devel >= 2.1
 BuildRequires: xorg-lib-libXinerama-devel
@@ -53,75 +57,66 @@ BuildRequires:      zlib-devel >= 1.2.3
 Requires(post):        mktemp >= 1.5-18
 Requires:      %{name}-lang-resources = %{version}
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Requires:      browser-plugins >= 2.0
 Requires:      nspr >= 1:4.6.3
 Requires:      nss >= 1:3.11.3
 Provides:      wwwbrowser
 Obsoletes:     mozilla-firebird
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _firefoxdir     %{_libdir}/%{name}
-# mozilla and firefox provide their own versions
-%define                _noautoreqdep           libgkgfx.so libgtkembedmoz.so libgtkxtbin.so libjsj.so libmozjs.so libxpcom.so libxpcom_compat.so libxpcom_core.so
-%define                _noautoprovfiles        %{_firefoxdir}/components
+# firefox/thunderbird/seamonkey provide their own versions
+%define                _noautoreqdep           libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so
+%define                _noautoprovfiles        %{_libdir}/%{name}/components
+# we don't want these to satisfy xulrunner-devel
+%define                _noautoprov             libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
+# and as we don't provide them, don't require either
+%define                _noautoreq              libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
 
-%define                specflags       -fno-strict-aliasing
+%define                specflags       -fno-strict-aliasing -fno-tree-vrp -fno-stack-protector
 
 %description
-Mozilla Firefox is an open-source web browser, designed for standards
-compliance, performance and portability.
+Firefox Community Edition is an open-source web browser, designed for
+standards compliance, performance and portability.
 
-%description -l pl
-Mozilla Firefox jest open sourcow± przegl±dark± sieci WWW, stworzon± z
-my¶l± o zgodno¶ci ze standardami, wydajno¶ci± i przeno¶no¶ci±.
+%description -l pl.UTF-8
+Firefox Community Edition jest przeglądarką WWW rozpowszechnianą
+zgodnie z ideami ruchu otwartego oprogramowania oraz tworzoną z myślą
+o zgodności ze standardami, wydajnością i przenośnością.
 
 %package libs
-Summary:       Mozilla Firefox shared libraries
-Summary(pl):   Biblioteki wspó³dzielone przegl±darki Mozilla Firefox
+Summary:       Firefox Community Edition shared libraries
+Summary(pl.UTF-8):     Biblioteki współdzielone przeglądarki Firefox Community Edition
 Group:         Libraries
 Conflicts:     mozilla-firefox < 2.0-1.4
 
 %description libs
-Mozilla Firefox shared libraries.
+Firefox Community Edition shared libraries.
 
-%description libs -l pl
-Biblioteki wspó³dzielone przegl±darki Mozilla Firefox.
-
-%package devel
-Summary:       Headers for developing programs that will use Mozilla Firefox
-Summary(pl):   Mozilla Firefox - pliki nag³ówkowe
-Group:         X11/Development/Libraries
-Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
-Requires:      nspr-devel >= 1:4.6.3
-Requires:      nss-devel >= 1:3.11.3-3
-Obsoletes:     mozilla-devel
-
-%description devel
-Mozilla Firefox development package.
-
-%description devel -l pl
-Pliki nag³ówkowe przegl±darki Mozilla Firefox.
+%description libs -l pl.UTF-8
+Biblioteki współdzielone przeglądarki Firefox Community Edition.
 
 %package lang-en
-Summary:       English resources for Mozilla Firefox
-Summary(pl):   Anglojêzyczne zasoby dla przegl±darki Mozilla Firefox
+Summary:       English resources for Firefox Community Edition
+Summary(pl.UTF-8):     Anglojęzyczne zasoby dla przeglądarki Firefox Community Edition
 Group:         X11/Applications/Networking
 Requires:      %{name} = %{version}-%{release}
 Provides:      %{name}-lang-resources = %{version}-%{release}
 
 %description lang-en
-English resources for Mozilla Firefox.
+English resources for Firefox Community Edition.
 
-%description lang-en -l pl
-Anglojêzyczne zasoby dla przegl±darki Mozilla Firefox.
+%description lang-en -l pl.UTF-8
+Anglojęzyczne zasoby dla przeglądarki Firefox Community Edition.
 
 %prep
 %setup -qc
 cd mozilla
+%patch0 -p1
 %patch1 -p1
 %patch3 -p1
 %patch5 -p1
-
-sed -i 's/\(-lgss\)\(\W\)/\1disable\2/' configure
+%patch7 -p1
+%patch69 -p1
 
 # use system
 #rm -rf mozilla/nsprpub mozilla/security/nss
@@ -180,7 +175,9 @@ ac_add_options --disable-installer
 ac_add_options --disable-javaxpcom
 ac_add_options --disable-updater
 ac_add_options --enable-default-toolkit=gtk2
+ac_add_options --enable-svg
 ac_add_options --enable-system-cairo
+ac_add_options --enable-system-myspell
 ac_add_options --enable-xft
 ac_add_options --with-distribution-id=org.pld-linux
 ac_add_options --with-system-nspr
@@ -188,7 +185,7 @@ ac_add_options --with-system-nss
 ac_add_options --with-system-zlib
 ac_add_options --with-system-jpeg
 ac_add_options --with-system-png
-ac_add_options --with-default-mozilla-five-home=%{_firefoxdir}
+ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
 ac_cv_visibility_pragma=no
 EOF
 
@@ -202,55 +199,59 @@ cd mozilla
 install -d \
        $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \
        $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
-       $RPM_BUILD_ROOT{%{_includedir},%{_pkgconfigdir}}
+       $RPM_BUILD_ROOT%{_datadir}/%{name}
+
+%browser_plugins_add_browser %{name} -p %{_libdir}/%{name}/plugins
 
 %{__make} -C xpinstall/packager stage-package \
-       MOZ_PKG_APPNAME=%{name} \
-       SIGN_NSS= \
+       DESTDIR=$RPM_BUILD_ROOT \
+       MOZ_PKG_APPDIR=%{_libdir}/%{name} \
        PKG_SKIP_STRIP=1
 
-cp -a dist/%{name} $RPM_BUILD_ROOT%{_libdir}
+# move arch independant ones to datadir
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/icons $RPM_BUILD_ROOT%{_datadir}/%{name}/icons
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d $RPM_BUILD_ROOT%{_datadir}/%{name}/init.d
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
+ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
+ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
+ln -s ../../share/%{name}/extensions $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
+ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
+ln -s ../../share/%{name}/icons $RPM_BUILD_ROOT%{_libdir}/%{name}/icons
+ln -s ../../share/%{name}/init.d $RPM_BUILD_ROOT%{_libdir}/%{name}/init.d
+ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
+ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
+
+rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
+ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
+
 sed 's,@LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
 ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox
 
 install browser/base/branding/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
-#install -m644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/
-#install -m644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/US/
 
-install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
 
 # header/development files
-cp -rfL dist/include   $RPM_BUILD_ROOT%{_includedir}/%{name}
-cp -rfL dist/idl       $RPM_BUILD_ROOT%{_includedir}/%{name}
-ln -sf necko/nsIURI.h $RPM_BUILD_ROOT%{_includedir}/mozilla-firefox/nsIURI.h
-install dist/bin/regxpcom $RPM_BUILD_ROOT%{_bindir}
-mv $RPM_BUILD_ROOT{%{_firefoxdir},%{_bindir}}/xpidl
-mv $RPM_BUILD_ROOT{%{_firefoxdir},%{_bindir}}/xpt_dump
-mv $RPM_BUILD_ROOT{%{_firefoxdir},%{_bindir}}/xpt_link
-
-# pkgconfig files
-for f in build/unix/*.pc; do
-       sed -e 's/firefox-%{version}/mozilla-firefox/' $f > $RPM_BUILD_ROOT%{_pkgconfigdir}/${f##*/}
-done
-
-# already provided by standalone packages
-rm $RPM_BUILD_ROOT%{_pkgconfigdir}/firefox-{nss,nspr}.pc
-
-sed -i -e 's#firefox-nspr =.*#mozilla-nspr#g' -e 's#irefox-nss =.*#mozilla-nss#g' \
-       $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc
-
-# includedir/dom CFLAGS
-sed -i -e '/Cflags:/{/{includedir}\/dom/!s,$, -I${includedir}/dom,}' \
-       $RPM_BUILD_ROOT%{_pkgconfigdir}/firefox-plugin.pc
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/xpidl
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/xpt_dump
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/xpt_link
 
 # files created by regxpcom and firefox -register
-touch $RPM_BUILD_ROOT%{_firefoxdir}/components/compreg.dat
-touch $RPM_BUILD_ROOT%{_firefoxdir}/components/xpti.dat
+touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
+touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
+
+# what's this? it's content is invalid anyway.
+rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
 
 cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
 #!/bin/sh
 umask 022
-rm -f %{_firefoxdir}/components/{compreg,xpti}.dat
+rm -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
 
 # it attempts to touch files in $HOME/.mozilla
 # beware if you run this with sudo!!!
@@ -258,8 +259,8 @@ export HOME=$(mktemp -d)
 # also TMPDIR could be pointing to sudo user's homedir
 unset TMPDIR TMP || :
 
-LD_LIBRARY_PATH=%{_firefoxdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %{_firefoxdir}/regxpcom
-%{_firefoxdir}/firefox -register
+LD_LIBRARY_PATH=%{_libdir}/%{name}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %{_libdir}/%{name}/regxpcom
+%{_libdir}/%{name}/firefox -register
 
 rm -rf $HOME
 EOF
@@ -267,8 +268,26 @@ EOF
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pretrans
+if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
+       mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
+fi
+for d in chrome defaults extensions greprefs icons init.d res searchplugins; do
+       if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
+               install -d %{_datadir}/%{name}
+               mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
+       fi
+done
+exit 0
+
 %post
 %{_sbindir}/%{name}-chrome+xpcom-generate
+%update_browser_plugins
+
+%postun
+if [ "$1" = 0 ]; then
+       %update_browser_plugins
+fi
 
 %files
 %defattr(644,root,root,755)
@@ -276,73 +295,67 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/firefox
 %attr(755,root,root) %{_sbindir}/%{name}-chrome+xpcom-generate
 
-%{_firefoxdir}/res
-%dir %{_firefoxdir}/components
-%attr(755,root,root) %{_firefoxdir}/components/*.so
-%{_firefoxdir}/components/*.js
-%{_firefoxdir}/components/*.xpt
-%dir %{_firefoxdir}/plugins
-%attr(755,root,root) %{_firefoxdir}/plugins/*.so
-%{_firefoxdir}/searchplugins
-%{_firefoxdir}/icons
-%{_firefoxdir}/defaults
-%{_firefoxdir}/greprefs
-%dir %{_firefoxdir}/extensions
-%dir %{_firefoxdir}/dictionaries
-%dir %{_firefoxdir}/init.d
-%{_firefoxdir}/init.d/README
-%attr(755,root,root) %{_firefoxdir}/*.sh
-%attr(755,root,root) %{_firefoxdir}/m*
-%attr(755,root,root) %{_firefoxdir}/f*
-%attr(755,root,root) %{_firefoxdir}/regxpcom
-%attr(755,root,root) %{_firefoxdir}/x*
-%{_pixmapsdir}/*
-%{_desktopdir}/*
-
-%dir %{_firefoxdir}/chrome
-%{_firefoxdir}/chrome/*.jar
-%{_firefoxdir}/chrome/*.manifest
-%dir %{_firefoxdir}/chrome/icons
-%{_firefoxdir}/chrome/icons/default
+# browser plugins v2
+%{_browserpluginsconfdir}/browsers.d/%{name}.*
+%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
+
+%dir %{_libdir}/%{name}/components
+%attr(755,root,root) %{_libdir}/%{name}/components/*.so
+%{_libdir}/%{name}/components/*.js
+%{_libdir}/%{name}/components/*.xpt
+%dir %{_libdir}/%{name}/plugins
+%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
+%attr(755,root,root) %{_libdir}/%{name}/*.sh
+%attr(755,root,root) %{_libdir}/%{name}/m*
+%attr(755,root,root) %{_libdir}/%{name}/f*
+%attr(755,root,root) %{_libdir}/%{name}/regxpcom
+%attr(755,root,root) %{_libdir}/%{name}/xpcshell
+%attr(755,root,root) %{_libdir}/%{name}/xpicleanup
+%{_pixmapsdir}/mozilla-firefox.png
+%{_desktopdir}/mozilla-firefox.desktop
+
+# symlinks
+%{_libdir}/%{name}/chrome
+%{_libdir}/%{name}/defaults
+%{_libdir}/%{name}/dictionaries
+%{_libdir}/%{name}/extensions
+%{_libdir}/%{name}/greprefs
+%{_libdir}/%{name}/icons
+%{_libdir}/%{name}/init.d
+%{_libdir}/%{name}/res
+%{_libdir}/%{name}/searchplugins
 
-# -dom-inspector subpackage?
-%dir %{_firefoxdir}/extensions/inspector@mozilla.org
-%{_firefoxdir}/extensions/inspector@mozilla.org/*
+# browserconfig
+%{_libdir}/%{name}/browserconfig.properties
 
-# the signature of the default theme
-%dir %{_firefoxdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
-%{_firefoxdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
+%{_libdir}/%{name}/LICENSE
+%{_libdir}/%{name}/README.txt
 
-# browserconfig
-%{_firefoxdir}/browserconfig.properties
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/chrome
+%{_datadir}/%{name}/defaults
+%{_datadir}/%{name}/greprefs
+%{_datadir}/%{name}/icons
+%{_datadir}/%{name}/init.d
+%{_datadir}/%{name}/res
+%{_datadir}/%{name}/searchplugins
 
-%{_firefoxdir}/LICENSE
-%{_firefoxdir}/README.txt
-%{_firefoxdir}/chrome/chromelist.txt
-%{_firefoxdir}/dependentlibs.list
+%dir %{_datadir}/%{name}/extensions
+# -dom-inspector subpackage?
+%{_datadir}/%{name}/extensions/inspector@mozilla.org
+# the signature of the default theme
+%{_datadir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
 
 # files created by regxpcom and firefox -register
-%ghost %{_firefoxdir}/components/compreg.dat
-%ghost %{_firefoxdir}/components/xpti.dat
+%ghost %{_libdir}/%{name}/components/compreg.dat
+%ghost %{_libdir}/%{name}/components/xpti.dat
 
 %files libs
 %defattr(644,root,root,755)
-%dir %{_firefoxdir}
-%attr(755,root,root) %{_firefoxdir}/*.so
-
-%files devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/regxpcom
-%attr(755,root,root) %{_bindir}/xpidl
-%attr(755,root,root) %{_bindir}/xpt_dump
-%attr(755,root,root) %{_bindir}/xpt_link
-%{_includedir}/%{name}
-%{_pkgconfigdir}/*
+%dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/*.so
 
 %files lang-en
 %defattr(644,root,root,755)
-%{_firefoxdir}/chrome/en-US.jar
-%{_firefoxdir}/chrome/en-US.manifest
-# probably should share these with all mozilla apps
-%{_firefoxdir}/dictionaries/en-US.aff
-%{_firefoxdir}/dictionaries/en-US.dic
+%{_datadir}/%{name}/chrome/en-US.jar
+%{_datadir}/%{name}/chrome/en-US.manifest
This page took 0.519254 seconds and 4 git commands to generate.