]> git.pld-linux.org Git - packages/firefox.git/blobdiff - mozilla-firefox.spec
- TODO security
[packages/firefox.git] / mozilla-firefox.spec
index f27c8dd039de430d894a9f3f806d957b66f114bb..34ed8a418b941a6682d8f1385fad9c9fe56db66c 100644 (file)
@@ -1,10 +1,9 @@
 #
 # TODO:
 # - handle locales differently (runtime, since it's possible to do)
-# - move most of %%post to external script as it's done in debian
 # - see ftp://ftp.debian.org/debian/pool/main/m/mozilla-firefox/*diff*
 #   for hints how to make locales and other stuff like extensions working
-# - SECURITY: http://securitytracker.com/alerts/2004/Sep/1011318.html
+# - security http://secunia.com/advisories/15292/
 #
 # Conditional build:
 %bcond_with    tests   # enable tests (whatever they check)
 Summary:       Mozilla Firefox web browser
 Summary(pl):   Mozilla Firefox - przeglĀ±darka WWW
 Name:          mozilla-firefox
-Version:       0.10.1
-Release:       0.3
+Version:       1.0.3
+Release:       2
 License:       MPL/LGPL
 Group:         X11/Applications/Networking
-Source0:       http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/firefox-1.0PR-source.tar.bz2
-# Source0-md5: ff9eae3b90b8573bf44293ea44bf3c50
+Source0:       http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/%{version}/source/firefox-%{version}-source.tar.bz2
+# Source0-md5: f1a9a8da0547564a0f8a249f9d56bdf4
 Source1:       %{name}.desktop
 Source2:       %{name}.sh
 Patch0:                %{name}-alpha-gcc3.patch
-Patch1:                %{name}-nss.patch
-Patch2:                %{name}-lib_path.patch
-Patch3:                %{name}-freetype.patch
+Patch1:                %{name}-gfx.patch
+Patch2:                %{name}-nss.patch
+Patch3:                %{name}-lib_path.patch
+Patch4:                %{name}-freetype.patch
 URL:           http://www.mozilla.org/projects/firefox/
 BuildRequires: automake
 %if %{with ft218}
-BuildRequires: freetype-devel >= 1:2.1.8
+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: gtk+2-devel >= 2.0.0
+BuildRequires: gtk+2-devel >= 1:2.0.0
 BuildRequires: libIDL-devel >= 0.8.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: pkgconfig
 BuildRequires: zip
+BuildRequires:  heimdal-devel
 Requires:      %{name}-lang-resources = %{version}
 %if %{with ft218}
 Requires:      freetype >= 1:2.1.3
 %else
 Requires:      freetype >= 2.1.3
-Requires:      freetype < 1:2.1.8
 Conflicts:     freetype = 2.1.8
 %endif
+Requires:      nspr >= 1:4.6-0.20041030.1
 Requires:      nss >= 3.8
-PreReq:                XFree86-Xvfb
 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 libnspr4.so
-%define                _noautoprovfiles libnspr4.so libplc4.so libplds4.so
+%define                _noautoreqdep           libgkgfx.so libgtkembedmoz.so libgtkxtbin.so libjsj.so libmozjs.so libxpcom.so libxpcom_compat.so
+%define                _noautoprovfiles        libplc4.so libplds4.so
 
 %description
 Mozilla Firefox is an open-source web browser, designed for standards
@@ -88,7 +91,9 @@ Angloj
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%{?with_ft218:%patch3 -p1}
+%patch3 -p1
+%{?with_ft218:%patch4 -p1}
+sed -i 's/\(-lgss\)\(\W\)/\1disable\2/' configure
 
 %build
 export CFLAGS="%{rpmcflags}"
@@ -132,18 +137,20 @@ cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
        --enable-xft \
        --enable-default-toolkit="gtk2" \
        --with-pthreads \
-       --without-system-nspr \
+       --with-system-nspr \
        --with-system-jpeg \
        --with-system-png \
        --with-system-zlib \
        --enable-single-profile \
-       --disable-profilesharing
+       --disable-profilesharing \
+       --enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth
+       
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}}
 
 %{__make} -C xpinstall/packager \
        MOZ_PKG_APPNAME="mozilla-firefox" \
@@ -151,6 +158,7 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}}
        EXCLUDE_NSPR_LIBS=1
 
 install %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox
+sed -i $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox -e "s@/usr/lib/@%{_libdir}/@g"
 
 tar -xvz -C $RPM_BUILD_ROOT%{_libdir} -f dist/mozilla-firefox-*-linux-gnu.tar.gz
 
@@ -166,14 +174,12 @@ grep -v locale $RPM_BUILD_ROOT%{_firefoxdir}/chrome/installed-chrome.txt > $RPM_
 rm -rf US classic comm embed-sample en-{US,mac,unix,win} modern pipnss pippki toolkit
 rm -f en-win.jar en-mac.jar embed-sample.jar modern.jar
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%post
+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
-
-unset MOZILLA_FIVE_HOME || :
+rm -f %{_firefoxdir}/chrome/{chrome.rdf,overlayinfo/*/*/*.rdf}
+rm -f %{_firefoxdir}/components/{compreg,xpti}.dat
 MOZILLA_FIVE_HOME=%{_firefoxdir}
 export MOZILLA_FIVE_HOME
 
@@ -185,53 +191,28 @@ export PATH
 LD_LIBRARY_PATH=%{_firefoxdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
 export LD_LIBRARY_PATH
 
-/sbin/ldconfig || :
-
-%{_firefoxdir}/regxpcom >/dev/null  || echo "E: regxpcom was exited: $?" >&2
-%{_firefoxdir}/regchrome >/dev/null || echo "E: regchrome was exited: $?" >&2
-
-TDIR=`mktemp -d /tmp/mozilla-firefox-pkg.XXXXXX` || exit 1
-HOME="$TDIR"
-export TDIR HOME
-
-mkdir -p $TDIR/.mozilla/firefox/default
-cp -rf %{_firefoxdir}/defaults/profile/* $TDIR/.mozilla/firefox/default
-
-# preseed profiles.ini
-cat > $TDIR/.mozilla/firefox/profiles.ini <<EOF
-[General]
-StartWithLastProfile=1
-
-[Profile0]
-Name=default
-IsRelative=1
-Path=default
-
+%{_firefoxdir}/regxpcom
+%{_firefoxdir}/regchrome
+%{_firefoxdir}/firefox -register
 EOF
 
+%clean
+rm -rf $RPM_BUILD_ROOT
 
-( \
-       /usr/X11R6/bin/Xvfb :69 -nolisten tcp -ac -terminate >/dev/null 2>&1 & \
-       xvfb_pid=${!}; \
-       DISPLAY=:69 %{_firefoxdir}/firefox-bin -list-global-items >/dev/null 2>&1 & \
-       sleep 15; \
-       kill ${xvfb_pid} >/dev/null 2>&1 \
-)
-
-rm -rf $TDIR
+%post
+%{_sbindir}/firefox-chrome+xpcom-generate
 
 %postun
 if [ "$1" != "0" ]; then
-       umask 022
-       cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installed-chrome.txt
+       %{_sbindir}/firefox-chrome+xpcom-generate
 fi
 
 %preun
 if [ "$1" == "0" ]; then
-  rm -rf %{_firefoxdir}/chrome/overlayinfo
-  rm -rf %{_firefoxdir}/components
-  rm -f  %{_firefoxdir}/chrome/*.rdf
-  rm -rf %{_firefoxdir}/extensions
+       rm -rf %{_firefoxdir}/chrome/overlayinfo
+       rm -f  %{_firefoxdir}/chrome/*.rdf
+       rm -rf %{_firefoxdir}/components
+       rm -rf %{_firefoxdir}/extensions
 fi
 
 %post lang-en
@@ -245,13 +226,13 @@ cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installe
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_sbindir}/*
 %dir %{_firefoxdir}
 %{_firefoxdir}/res
 %dir %{_firefoxdir}/components
 %attr(755,root,root) %{_firefoxdir}/components/*.so
 %{_firefoxdir}/components/*.js
 %{_firefoxdir}/components/*.xpt
-%{_firefoxdir}/components/myspell
 %{_firefoxdir}/plugins
 %{_firefoxdir}/searchplugins
 %{_firefoxdir}/icons
@@ -278,18 +259,18 @@ cat %{_firefoxdir}/chrome/*-installed-chrome.txt >%{_firefoxdir}/chrome/installe
 #%{_firefoxdir}/chrome/chatzilla.jar
 %{_firefoxdir}/chrome/classic.jar
 %{_firefoxdir}/chrome/comm.jar
-%{_firefoxdir}/chrome/content-packs.jar
+#%{_firefoxdir}/chrome/content-packs.jar
 %{_firefoxdir}/chrome/help.jar
 # -dom-inspector subpackage?
-#%{_firefoxdir}/chrome/inspector.jar
+%{_firefoxdir}/chrome/inspector.jar
 %{_firefoxdir}/chrome/modern.jar
 %{_firefoxdir}/chrome/pip*.jar
 %{_firefoxdir}/chrome/toolkit.jar
 %{_firefoxdir}/chrome/mozilla-firefox-misc-installed-chrome.txt
+%dir %{_firefoxdir}/chrome/icons
 %{_firefoxdir}/chrome/icons/default
 
 %files lang-en
 %defattr(644,root,root,755)
 %{_firefoxdir}/chrome/en-US.jar
-%{_firefoxdir}/chrome/US.jar
 %{_firefoxdir}/chrome/mozilla-firefox-en-US-installed-chrome.txt
This page took 0.069923 seconds and 4 git commands to generate.