]> git.pld-linux.org Git - packages/firefox.git/blobdiff - mozilla-firefox.spec
- merged from devel
[packages/firefox.git] / mozilla-firefox.spec
index 3b6128cd702021d2ed552bc2b822d082b71671d0..26f180530830e8729edce9c2cfc0306da3b00420 100644 (file)
@@ -1,87 +1,57 @@
 #
 # TODO:
-# - review building options (like disable-mailnews and disable-composer,
-#   these are not meant for firefox)
 # - handle locales differently (runtime, since it's possible to do)
 # - see ftp://ftp.debian.org/debian/pool/main/m/mozilla-firefox/*diff*
 #   for hints how to make locales and other stuff like extensions working
-# - unpackaged files check
-#   /usr/lib/mozilla-firefox/LICENSE
-#   ^- officially packaged, probably not for PLD
-#   /usr/lib/mozilla-firefox/README.txt
-#   ^- officially packaged
-#   /usr/lib/mozilla-firefox/browserconfig.properties
-#   ^- officially packaged
-#   /usr/lib/mozilla-firefox/chrome/chatzilla.jar
-#   ^- chatzilla to be disabled
-#   /usr/lib/mozilla-firefox/chrome/chromelist.txt
-#   ^- officially packaged
-#   /usr/lib/mozilla-firefox/chrome/content-packs.jar
-#   ^- no sign of this file
-#   /usr/lib/mozilla-firefox/chrome/embed-sample.jar
-#   ^- officially packaged
-#   /usr/lib/mozilla-firefox/components/myspell/en-US.aff
-#   ^- myspell to be disabled
-#   /usr/lib/mozilla-firefox/components/myspell/en-US.dic
-#   ^- as above
-#   /usr/lib/mozilla-firefox/init.d/README
-#   ^- officially packaged but not needed
-#
+# - rpm upgrade is broken. First you need uninstall Firefox 1.0.x. 
 # Conditional build:
 %bcond_with    tests   # enable tests (whatever they check)
-%bcond_without ft218   # compile with freetype < 2.1.8
+%bcond_without gnome   # disable all GNOME components (gnomevfs, gnome, gnomeui)
 #
 Summary:       Mozilla Firefox web browser
 Summary(pl):   Mozilla Firefox - przegl±darka WWW
 Name:          mozilla-firefox
-Version:       1.0.7
+Version:       1.5
 Release:       3
 License:       MPL/LGPL
 Group:         X11/Applications/Networking
 Source0:       http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}-source.tar.bz2
-# Source0-md5: 5704a8c36de84b408e069afb0c5bc1df
+# Source0-md5: fa915ddcadecda30ed3e13694f26a779
 Source1:       %{name}.desktop
 Source2:       %{name}.sh
-Patch0:                %{name}-alpha-gcc3.patch
-Patch1:                %{name}-gfx.patch
-Patch2:                %{name}-nss.patch
-Patch3:                %{name}-lib_path.patch
-Patch4:                %{name}-freetype.patch
-Patch5:                %{name}-searchplugins.patch
-Patch6:                %{name}-gcc-bugs.patch
+Patch0:                %{name}-nss.patch
+Patch1:                %{name}-lib_path.patch
+Patch2:                %{name}-nss-system-nspr.patch
+Patch3:                %{name}-nopangoxft.patch
+Patch4:                %{name}-name.patch
+Patch5:                %{name}-lang.patch
+# UPDATE or DROP?
+#PatchX:               %{name}-searchplugins.patch
 URL:           http://www.mozilla.org/projects/firefox/
+%{?with_gnome:BuildRequires:   GConf2-devel >= 1.2.1}
 BuildRequires: automake
-%if %{with ft218}
-BuildRequires: freetype-devel >= 1:2.1.9
-%else
-BuildRequires: freetype-devel >= 2.1.3
-BuildRequires: freetype-devel < 1:2.1.8
-BuildConflicts:        freetype-devel = 2.1.8
-%endif
-BuildRequires: gnome-vfs2-devel
-BuildRequires: libgnome-devel >= 2.0
-BuildRequires: GConf2-devel
+BuildRequires: cairo-devel >= 1.0.0
 BuildRequires: gtk+2-devel >= 1:2.0.0
-BuildRequires: heimdal-devel >= 0.7
+BuildRequires: heimdal-devel >= 0.7.1
+%{?with_gnome:BuildRequires:   gnome-vfs2-devel >= 2.0}
 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.0
 BuildRequires: libstdc++-devel
 BuildRequires: nspr-devel >= 1:4.6-0.20041030.1
 BuildRequires: nss-devel >= 3.8
-BuildRequires: pango-devel >= 1:1.1.0
-BuildRequires: perl-modules
+BuildRequires: pango-devel >= 1:1.6.0
+BuildRequires: perl-modules >= 5.004
 BuildRequires: pkgconfig
 BuildRequires: zip
 Requires:      %{name}-lang-resources = %{version}
-%if %{with ft218}
-Requires:      freetype >= 1:2.1.3
-%else
-Requires:      freetype >= 2.1.3
-Conflicts:     freetype = 2.1.8
-%endif
 Requires:      nspr >= 1:4.6-0.20041030.1
 Requires:      nss >= 3.8
+# for /etc/ld.so.conf.d
+Requires:      glibc >= 6:2.3.5-7.6
+Requires(post,postun): /sbin/ldconfig
 Obsoletes:     mozilla-firebird
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -128,19 +98,16 @@ English resources for Mozilla-firefox
 Anglojêzyczne zasoby dla Mozilla-FireFox
 
 %prep
-%setup -q -c
-cd mozilla
+%setup -q -n mozilla
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%{?with_ft218:%patch4 -p1}
-%patch5 -p0
-%patch6 -p0
+%patch4 -p1
+%patch5 -p1
 sed -i 's/\(-lgss\)\(\W\)/\1disable\2/' configure
 
 %build
-cd mozilla
 rm -f .mozconfig
 export CFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
 export CXXFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
@@ -194,13 +161,17 @@ ac_add_options --disable-ldap
 ac_add_options --disable-mailnews
 ac_add_options --disable-profilesharing
 ac_add_options --disable-xprint
+ac_add_options --enable-canvas
 ac_add_options --enable-crypto
 ac_add_options --enable-default-toolkit=gtk2
 ac_add_options --enable-mathml
+ac_add_options --enable-pango
 ac_add_options --enable-reorder
 ac_add_options --enable-single-profile
 ac_add_options --enable-strip
 ac_add_options --enable-strip-libs
+ac_add_options --enable-svg
+ac_add_options --enable-system-cairo
 ac_add_options --enable-xft
 ac_add_options --enable-xinerama
 ac_add_options --enable-xpctools
@@ -217,11 +188,11 @@ EOF
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd mozilla
 install -d \
-       $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \
+       $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}{,extensions}} \
        $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \
        $RPM_BUILD_ROOT{%{_includedir}/%{name}/idl,%{_pkgconfigdir}}
+# extensions dir is needed (it can be empty)
        
 %{__make} -C xpinstall/packager \
        MOZ_PKG_APPNAME="mozilla-firefox" \
@@ -230,16 +201,16 @@ install -d \
 
 install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
 
-tar -xvz -C $RPM_BUILD_ROOT%{_libdir} -f dist/mozilla-firefox-*-linux-gnu.tar.gz
+tar -xvz -C $RPM_BUILD_ROOT%{_libdir} -f dist/mozilla-firefox-*linux*.tar.gz
 
-install other-licenses/branding/firefox/content/icon32.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
+install other-licenses/branding/firefox/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/mozilla-firefox.png
 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/
 #install -m0644 bookmarks.html $RPM_BUILD_ROOT%{_firefoxdir}/defaults/profile/US/
 
 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
 
-grep locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-en-US-installed-chrome.txt
-grep -v locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-misc-installed-chrome.txt
+#grep locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-en-US-installed-chrome.txt
+#grep -v locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_BUILD_ROOT%{_firefoxdir}/chrome/%{name}-misc-installed-chrome.txt
 
 rm -rf US classic comm embed-sample en-{US,mac,unix,win} modern pipnss pippki
 rm -f en-win.jar en-mac.jar embed-sample.jar modern.jar
@@ -248,7 +219,6 @@ rm -f en-win.jar en-mac.jar embed-sample.jar modern.jar
 cp -rfL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{name}
 cp -rfL dist/idl/*     $RPM_BUILD_ROOT%{_includedir}/%{name}/idl
 
-install dist/bin/regchrome $RPM_BUILD_ROOT%{_bindir}
 install dist/bin/regxpcom $RPM_BUILD_ROOT%{_bindir}
 install dist/bin/xpidl $RPM_BUILD_ROOT%{_bindir}
 install dist/bin/xpt_dump $RPM_BUILD_ROOT%{_bindir}
@@ -279,7 +249,8 @@ sed -i -e '/Cflags:/{/{includedir}\/dom/!s,$, -I${includedir}/dom,}' \
 cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/firefox-chrome+xpcom-generate
 #!/bin/sh
 umask 022
-cat %{_firefoxdir}/chrome/*-installed-chrome.txt > %{_firefoxdir}/chrome/installed-chrome.txt
+#There is no such files (*-installed-chrome.txt). IMO obsolete.
+#cat %{_firefoxdir}/chrome/*-installed-chrome.txt > %{_firefoxdir}/chrome/installed-chrome.txt
 rm -f %{_firefoxdir}/chrome/{chrome.rdf,overlayinfo/*/*/*.rdf}
 rm -f %{_firefoxdir}/components/{compreg,xpti}.dat
 MOZILLA_FIVE_HOME=%{_firefoxdir}
@@ -294,18 +265,28 @@ LD_LIBRARY_PATH=%{_firefoxdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
 export LD_LIBRARY_PATH
 
 unset TMPDIR TMP || :
-%{_firefoxdir}/regxpcom
-%{_firefoxdir}/regchrome
-%{_firefoxdir}/firefox -register
+MOZILLA_FIVE_HOME=%{_firefoxdir} %{_firefoxdir}/regxpcom
+MOZILLA_FIVE_HOME=%{_firefoxdir} %{_firefoxdir}/firefox -register
 EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
+/sbin/ldconfig
 %{_sbindir}/firefox-chrome+xpcom-generate
+%banner %{name} -e <<EOF
+###################################################################
+#                                                                 #
+# NOTICE:                                                         #
+# If you have problem with upgrade old mozilla-firefox 1.0.x, you #
+# should remove it first.                                         #
+#                                                                 #
+###################################################################
+EOF
 
 %postun
+/sbin/ldconfig
 if [ "$1" != "0" ]; then
        %{_sbindir}/firefox-chrome+xpcom-generate
 fi
@@ -318,13 +299,13 @@ if [ "$1" == "0" ]; then
        rm -rf %{_firefoxdir}/extensions
 fi
 
-%post lang-en
-umask 022
-cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
+#%post lang-en
+#umask 022
+#cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
 
-%postun lang-en
-umask 022
-cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
+#%postun lang-en
+#umask 022
+#cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
 
 %files
 %defattr(644,root,root,755)
@@ -341,6 +322,7 @@ cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installe
 %{_firefoxdir}/icons
 %{_firefoxdir}/defaults
 %{_firefoxdir}/greprefs
+%dir %{_firefoxdir}/extensions
 %dir %{_firefoxdir}/init.d
 %attr(755,root,root) %{_firefoxdir}/*.so
 %attr(755,root,root) %{_firefoxdir}/*.sh
@@ -348,35 +330,23 @@ cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installe
 %attr(755,root,root) %{_firefoxdir}/f*
 %attr(755,root,root) %{_firefoxdir}/reg*
 %attr(755,root,root) %{_firefoxdir}/x*
-%attr(755,root,root) %{_firefoxdir}/T*
-%ifarch %{ix86}
-%attr(755,root,root) %{_firefoxdir}/elf-dynstr-gc
-%endif
-%{_firefoxdir}/bloaturls.txt
 %{_pixmapsdir}/*
 %{_desktopdir}/*
 
 %dir %{_firefoxdir}/chrome
-%{_firefoxdir}/chrome/browser.jar
+%{_firefoxdir}/chrome/*.jar
+%{_firefoxdir}/chrome/*.manifest
 # -chat subpackage?
 #%{_firefoxdir}/chrome/chatzilla.jar
-%{_firefoxdir}/chrome/classic.jar
-%{_firefoxdir}/chrome/comm.jar
 #%{_firefoxdir}/chrome/content-packs.jar
-%{_firefoxdir}/chrome/help.jar
 # -dom-inspector subpackage?
-%{_firefoxdir}/chrome/inspector.jar
-%{_firefoxdir}/chrome/modern.jar
-%{_firefoxdir}/chrome/pip*.jar
-%{_firefoxdir}/chrome/toolkit.jar
-%{_firefoxdir}/chrome/mozilla-firefox-misc-installed-chrome.txt
-%ghost %{_firefoxdir}/chrome/installed-chrome.txt
+#%{_firefoxdir}/chrome/inspector.jar
+#%{_firefoxdir}/chrome/mozilla-firefox-misc-installed-chrome.txt
 %dir %{_firefoxdir}/chrome/icons
 %{_firefoxdir}/chrome/icons/default
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/regchrome
 %attr(755,root,root) %{_bindir}/regxpcom
 %attr(755,root,root) %{_bindir}/xpidl
 %attr(755,root,root) %{_bindir}/xpt_dump
@@ -387,4 +357,5 @@ cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installe
 %files lang-en
 %defattr(644,root,root,755)
 %{_firefoxdir}/chrome/en-US.jar
-%{_firefoxdir}/chrome/mozilla-firefox-en-US-installed-chrome.txt
+%{_firefoxdir}/chrome/en-US.manifest
+#%{_firefoxdir}/chrome/mozilla-firefox-en-US-installed-chrome.txt
This page took 0.086408 seconds and 4 git commands to generate.