From f37c2ce509415dc55f290d7b497027830c904d71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 5 Dec 2006 12:32:49 +0000 Subject: [PATCH] - copy from DEVEL Changed files: mozilla-firefox.spec -> 1.160 --- mozilla-firefox.spec | 247 ++++++++++++++++++++----------------------- 1 file changed, 116 insertions(+), 131 deletions(-) diff --git a/mozilla-firefox.spec b/mozilla-firefox.spec index 2ba5bbe..9b77eef 100644 --- a/mozilla-firefox.spec +++ b/mozilla-firefox.spec @@ -1,14 +1,9 @@ -# # TODO: -# - with new gcc version (it is possible that) -# - -fvisibility=hiddenn and ac_cv_visibility_pragma=no can be removed -# - with new firefox version (it is possible that) -# - -fno-strict-aliasing can be removed (needs to be tested carefuly, -# not to be fixed soon, imho) # - 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 -# - rpm upgrade is broken. First you need uninstall Firefox 1.0.x. +# 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) @@ -17,22 +12,19 @@ Summary: Mozilla Firefox web browser Summary(pl): Mozilla Firefox - przegl±darka WWW Name: mozilla-firefox -Version: 1.5.0.8 -Release: 1 +Version: 2.0 +Release: 2 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: 86f98df1586efb419225a2988a217951 +# Source0-md5: 03709c15cba0e0375ff5336d538f77e7 Source1: %{name}.desktop Source2: %{name}.sh -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}-fonts.patch -# UPDATE or DROP? -#PatchX: %{name}-searchplugins.patch +# if ac rebuild is needed... +#PatchX: %{name}-ac.patch URL: http://www.mozilla.org/projects/firefox/ %{?with_gnome:BuildRequires: GConf2-devel >= 1.2.1} BuildRequires: automake @@ -46,8 +38,8 @@ BuildRequires: libIDL-devel >= 0.8.0 BuildRequires: libjpeg-devel >= 6b BuildRequires: libpng-devel >= 1.2.7 BuildRequires: libstdc++-devel -BuildRequires: nspr-devel >= 1:4.6.1-2 -BuildRequires: nss-devel >= 1:3.11.3 +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 @@ -58,17 +50,19 @@ BuildRequires: xorg-lib-libXp-devel BuildRequires: xorg-lib-libXt-devel BuildRequires: zip BuildRequires: zlib-devel >= 1.2.3 +Requires(post): mktemp >= 1.5-18 Requires: %{name}-lang-resources = %{version} -Requires: nspr >= 1:4.6.1-2 +Requires: %{name}-libs = %{epoch}:%{version}-%{release} +Requires: nspr >= 1:4.6.3 Requires: nss >= 1:3.11.3 -Requires(post): mktemp >= 1.5-18 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 +%define _noautoreqdep libgkgfx.so libgtkembedmoz.so libgtkxtbin.so libjsj.so libmozjs.so libxpcom.so libxpcom_compat.so libxpcom_core.so +%define _noautoprovfiles %{_firefoxdir}/components %define specflags -fno-strict-aliasing @@ -80,12 +74,22 @@ compliance, performance and portability. Mozilla Firefox jest open sourcow± przegl±dark± sieci WWW, stworzon± 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 Mozilla Firefox +Group: Libraries +Conflicts: %{name} < 2.0-1.4 + +%description libs +Mozilla Firefox shared libraries. + %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} = %{epoch}:%{version}-%{release} -Requires: nspr-devel >= 1:4.6.1-2 +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 @@ -112,35 +116,28 @@ Angloj %prep %setup -qc cd mozilla -%patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 -%patch4 -p1 %patch5 -p1 sed -i 's/\(-lgss\)\(\W\)/\1disable\2/' configure +# use system +#rm -rf mozilla/nsprpub mozilla/security/nss + %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`" +export CFLAGS="%{rpmcflags} $(%{_bindir}/pkg-config mozilla-nspr --cflags-only-I)" +export CXXFLAGS="%{rpmcflags} $(%{_bindir}/pkg-config mozilla-nspr --cflags-only-I)" cp -f %{_datadir}/automake/config.* build/autoconf cp -f %{_datadir}/automake/config.* nsprpub/build/autoconf cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf -LIBIDL_CONFIG="%{_bindir}/libIDL-config-2"; export LIBIDL_CONFIG - cat << 'EOF' > .mozconfig . $topsrcdir/browser/config/mozconfig -export BUILD_OFFICIAL=1 -export MOZILLA_OFFICIAL=1 -mk_add_options BUILD_OFFICIAL=1 -mk_add_options MOZILLA_OFFICIAL=1 - +# Options for 'configure' (same as command-line options). ac_add_options --prefix=%{_prefix} ac_add_options --exec-prefix=%{_exec_prefix} ac_add_options --bindir=%{_bindir} @@ -154,47 +151,43 @@ ac_add_options --localstatedir=%{_localstatedir} ac_add_options --sharedstatedir=%{_sharedstatedir} ac_add_options --mandir=%{_mandir} ac_add_options --infodir=%{_infodir} -ac_add_options --enable-optimize="%{rpmcflags}" %if %{?debug:1}0 +ac_add_options --disable-optimize ac_add_options --enable-debug ac_add_options --enable-debug-modules +ac_add_options --enable-debugger-info-modules +ac_add_options --enable-crash-on-assert %else ac_add_options --disable-debug -ac_add_options --disable-debug-modules +ac_add_options --disable-logging +ac_add_options --enable-optimize="%{rpmcflags}" %endif %if %{with tests} ac_add_options --enable-tests %else ac_add_options --disable-tests %endif -ac_add_options --disable-composer -ac_add_options --disable-dtd-debug +%if %{with gnome} +ac_add_options --enable-gnomevfs +ac_add_options --enable-gnomeui +%else +ac_add_options --disable-gnomevfs +ac_add_options --disable-gnomeui +%endif ac_add_options --disable-freetype2 ac_add_options --disable-installer -ac_add_options --disable-jsd -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 --disable-javaxpcom +ac_add_options --disable-updater 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 -ac_add_options --with-pthreads -ac_add_options --with-system-jpeg +ac_add_options --with-distribution-id=org.pld-linux ac_add_options --with-system-nspr -ac_add_options --with-system-png +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_cv_visibility_pragma=no EOF @@ -206,54 +199,41 @@ EOF rm -rf $RPM_BUILD_ROOT cd mozilla install -d \ - $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}{,extensions}} \ + $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_libdir}} \ $RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir}} \ - $RPM_BUILD_ROOT{%{_includedir}/%{name}/idl,%{_pkgconfigdir}} -# extensions dir is needed (it can be empty) + $RPM_BUILD_ROOT{%{_includedir},%{_pkgconfigdir}} -ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox - -%{__make} -C xpinstall/packager \ - MOZ_PKG_APPNAME="mozilla-firefox" \ - MOZILLA_BIN="\$(DIST)/bin/firefox-bin" \ - EXCLUDE_NSPR_LIBS=1 +%{__make} -C xpinstall/packager stage-package \ + MOZ_PKG_APPNAME=%{name} \ + SIGN_NSS= \ + PKG_SKIP_STRIP=1 +cp -a dist/%{name} $RPM_BUILD_ROOT%{_libdir} sed 's,@LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/mozilla-firefox +ln -s mozilla-firefox $RPM_BUILD_ROOT%{_bindir}/firefox -tar -xvz -C $RPM_BUILD_ROOT%{_libdir} -f dist/mozilla-firefox-*linux*.tar.gz - -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 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} -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 - # header/developement files -cp -rfL dist/include/* $RPM_BUILD_ROOT%{_includedir}/%{name} -cp -rfL dist/idl/* $RPM_BUILD_ROOT%{_includedir}/%{name}/idl - +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} -install dist/bin/xpidl $RPM_BUILD_ROOT%{_bindir} -install dist/bin/xpt_dump $RPM_BUILD_ROOT%{_bindir} -install dist/bin/xpt_link $RPM_BUILD_ROOT%{_bindir} - -ln -sf %{_includedir}/mozilla-firefox/necko/nsIURI.h \ - $RPM_BUILD_ROOT%{_includedir}/mozilla-firefox/nsIURI.h - -# CA certificates -ln -s %{_libdir}/libnssckbi.so $RPM_BUILD_ROOT%{_firefoxdir}/libnssckbi.so +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}/$(basename $f) +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 -f $RPM_BUILD_ROOT%{_pkgconfigdir}/firefox-{nss,nspr}.pc +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 @@ -262,26 +242,24 @@ sed -i -e 's#firefox-nspr =.*#mozilla-nspr#g' -e 's#irefox-nss =.*#mozilla-nss#g sed -i -e '/Cflags:/{/{includedir}\/dom/!s,$, -I${includedir}/dom,}' \ $RPM_BUILD_ROOT%{_pkgconfigdir}/firefox-plugin.pc -cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/firefox-chrome+xpcom-generate +# files created by regxpcom and firefox -register +touch $RPM_BUILD_ROOT%{_firefoxdir}/components/compreg.dat +touch $RPM_BUILD_ROOT%{_firefoxdir}/components/xpti.dat + +cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate #!/bin/sh umask 022 -rm -f %{_firefoxdir}/chrome/{chrome.rdf,overlayinfo/*/*/*.rdf} rm -f %{_firefoxdir}/components/{compreg,xpti}.dat -MOZILLA_FIVE_HOME=%{_firefoxdir} -export MOZILLA_FIVE_HOME -# PATH -PATH=%{_firefoxdir}:$PATH -export PATH +# it attempts to touch files in $HOME/.mozilla +# beware if you run this with sudo!!! +export HOME=$(mktemp -d) +# also TMPDIR could be pointing to sudo user's homedir +unset TMPDIR TMP || : -# added /usr/lib : don't load your local library -LD_LIBRARY_PATH=%{_firefoxdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} -export LD_LIBRARY_PATH +LD_LIBRARY_PATH=%{_firefoxdir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %{_firefoxdir}/regxpcom +%{_firefoxdir}/firefox -register -unset TMPDIR TMP || : -export HOME=$(mktemp -d) -MOZILLA_FIVE_HOME=%{_firefoxdir} %{_firefoxdir}/regxpcom -MOZILLA_FIVE_HOME=%{_firefoxdir} %{_firefoxdir}/firefox -register rm -rf $HOME EOF @@ -289,29 +267,14 @@ EOF rm -rf $RPM_BUILD_ROOT %post -%{_sbindir}/firefox-chrome+xpcom-generate - -%postun -if [ "$1" = "0" ]; then - rm -rf %{_firefoxdir}/chrome/overlayinfo - rm -f %{_firefoxdir}/chrome/*.rdf - rm -rf %{_firefoxdir}/components - rm -rf %{_firefoxdir}/extensions -fi - -%triggerpostun -- %{name} < 1.5 -%banner %{name} -e <