# (tpg) nss libraries are not conventinaly named(mozilla stil sux), # thanks to this auto dependencies are wongly generated for devel libraries # blacklisting all nss libraries should solve this %define _requires_exceptions libnss3\\|libnssutil3\\|libsmime3\\|libssl3\\|libnspr4\\|libplc4\\|libplds4 %define major 1.9 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define develunstname %mklibname %{name}-unstable -d %define sname firefox %define sver 3.0.3 %define version_internal 1.9 %define mozappdir %{_libdir}/%{name}-%{version_internal} # (salem) ugly but avoids hardcoding package versions (#42745) # TODO: needs a better solution. (%__isa macro)? %define hunspellver %(rpm -q --whatprovides libhunspell --queryformat %{NAME}) %define nssver %(rpm -q --whatprovides mozilla-nss --queryformat %{NAME}) %define nsprver %(rpm -q --whatprovides mozilla-nspr --queryformat %{NAME}) Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 1.9.0.3 Release: %mkrel 1 License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Development/Other Url: http://developer.mozilla.org/en/docs/XULRunner Source0: ftp://ftp.mozilla.org/pub/mozilla.org/%{sname}/releases/%{sver}/source/%{sname}-%{sver}-source.tar.bz2 Source1: %{SOURCE0}.asc Patch0: %{name}-1.9-idldir.patch Patch1: mozilla-path_len.patch Patch2: %{name}-1.9-gcc43.patch Patch4: mozilla-system-hunspell.patch Patch5: mozilla-nongnome-proxies.patch Patch6: mozilla-restart-cmd.patch Patch7: %{name}-1.9-pluginsdir.patch # Fedora patches: # use 1.9 as xulrunner version in the dirname and not the complete version string Patch8: xulrunner-1.9.0.1-version.patch Patch10: mozilla-pkgconfig.patch # (salem) this patch does not work properly on ff3 #Patch11: xulrunner-1.9.0.1-theme-selection.patch BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: libpng-devel BuildRequires: libhunspell-devel BuildRequires: libIDL2-devel BuildRequires: gtk+2-devel BuildRequires: startup-notification-devel BuildRequires: dbus-glib-devel %if %mdkversion >= 200900 BuildRequires: libsqlite3-devel >= 3.5.9 %endif BuildRequires: libgnome-vfs2-devel BuildRequires: libgnome2-devel BuildRequires: libgnomeui2-devel BuildRequires: lcms-devel BuildRequires: java-rpmbuild BuildRequires: zip BuildRequires: doxygen BuildRequires: makedepend BuildRequires: valgrind BuildRequires: rootcerts BuildRequires: python BuildRequires: nspr-devel BuildRequires: nss-static-devel BuildRequires: pango-devel Requires: %{libname} = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM applications that are as rich as Firefox and Thunderbird. It will provide mechanisms for installing, upgrading, and uninstalling these applications. XULRunner will also provide libxul, a solution which allows the embedding of Mozilla technologies in other projects and products. %package -n %{libname} Summary: Dynamic libraries for %{name} Group: System/Libraries Requires: %{libname} = %{version}-%{release} Conflicts: xulrunner <= 1.9.0.1-2 Requires: rootcerts # (tpg) manually pull dependancies on libnss3 and libnspr4, why ? see above Requires: %{nssver} Requires: %{nsprver} # (salem) fixes #42745 Requires: %{hunspellver} # (salem) bug #42680 for noarch packages Provides: libxulrunner = 1.9 %description -n %{libname} Dynamic libraries for %{name}. %package -n %{develname} Summary: Development files for %{name} Group: Development/Other Requires: %{libname} = %{version}-%{release} Obsoletes: xulrunner-devel < 1.9.0.1-2 Obsoletes: %{mklibname mozilla-firefox -d} < 0:3 Provides: %{name}-devel = %{version}-%{release} # (tpg) see above why Requires: nss-devel %description -n %{develname} Development files and headers for %{name}. %package -n %{develunstname} Summary: Development files for %{name}, which are not considered stable Group: Development/Other Requires: %{libname} = %{version}-%{release} Requires: %{develname} = %{version}-%{release} Obsoletes: xulrunner-devel-unstable < 1.9.0.1-2 Obsoletes: %{mklibname %{name} -d}-unstable < 1.9.0.1-7 Provides: %{mklibname %{name} -d}-unstable Provides: %{name}-devel-unstable = %{version}-%{release} %description -n %{develunstname} Unstable files for use with development of Gecko applications. These headers are not frozen and APIs can change at any time, so should not be relied on. %prep %setup -qn mozilla %patch0 -p1 -b .idl %patch1 -p1 -b .pathlen %patch2 -p1 -b .gcc43 pushd extensions %patch4 -p0 -b .hunspell popd %patch5 -p0 -b .proxy %patch6 -p0 -b .restart %patch7 -p1 -b .plugins %patch8 -p1 -b .version %patch10 -p1 -b .pkgconfig # needed to regenerate certdata.c pushd security/nss/lib/ckfw/builtins perl ./certdata.perl < /etc/pki/tls/mozilla/certdata.txt popd %build %serverbuild #export PREFIX="%{_prefix}" #export LIBDIR="%{_libdir}" export CFLAGS="$(echo %{optflags} | sed -e 's/-Wall//')" export CXXFLAGS="$CFLAGS" export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}" INTERNAL_GECKO=%{version_internal} MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO} # (tpg) don't use macro here # (fhimpe) Starting from Firefox 3.0.1, at least sqlite 3.5.9 is needed # so don't use system sqlite on Mandriva older than 2009.0 ./configure \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --libdir=%{_libdir} \ --includedir=%{_includedir} \ --datadir=%{_datadir} \ --sysconfdir=%{_sysconfdir} \ --enable-application=xulrunner \ --with-pthreads \ --with-system-jpeg \ --with-system-zlib \ --with-system-bz2 \ --with-system-png \ --with-system-nspr \ --with-system-nss \ %if %mdkversion >= 200900 --enable-system-sqlite \ %else --disable-system-sqlite \ %endif --enable-system-cairo \ --enable-system-lcms \ --enable-system-hunspell \ --disable-ctl \ --enable-javaxpcom \ --enable-pango \ --enable-svg \ --enable-canvas \ --enable-crypto \ --disable-crashreporter \ --enable-extensions \ --disable-installer \ --disable-updater \ --enable-optimize \ --enable-jemalloc \ --with-valgrind \ --disable-strip \ --enable-startup-notification \ --enable-default-toolkit=cairo-gtk2 \ --with-java-include-path=%{java_home}/include \ --with-java-bin-path=%{java_home}/bin \ --enable-image-encoder=all \ --enable-image-decoders=all \ --enable-extensions=default \ --enable-places \ --enable-storage \ --enable-safe-browsing \ --enable-url-classifier \ --disable-tests \ --disable-mochitest \ --with-distribution-id=com.mandriva perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl %make %install rm -rf %{buildroot} INTERNAL_GECKO=%{version_internal} INTERNAL_APP_NAME=%{name}-${INTERNAL_GECKO} MOZ_APP_DIR=%{_libdir}/${INTERNAL_APP_NAME} INTERNAL_APP_SDK_NAME=%{name}-sdk-${INTERNAL_GECKO} MOZ_APP_SDK_DIR=%{_libdir}/${INTERNAL_APP_SDK_NAME} %makeinstall_std mkdir -p %{buildroot}/${MOZ_APP_DIR} \ %{buildroot}%{_datadir}/idl/${INTERNAL_APP_SDK_NAME} \ %{buildroot}%{_includedir}/${INTERNAL_APP_SDK_NAME} install -p dist/sdk/bin/regxpcom %{buildroot}/$MOZ_APP_DIR mkdir -p %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} # set up our default preferences cat << EOF > %{buildroot}/${MOZ_APP_DIR}/defaults/pref/vendor.js pref("general.useragent.vendor", "Mandriva"); pref("general.useragent.vendorSub", "%{version}-%{release}"); pref("general.useragent.vendorComment", "%{mandriva_release}"); pref("mousewheel.horizscroll.withnokey.action", 0); pref("mousewheel.horizscroll.withnokey.numlines", -1); pref("mousewheel.horizscroll.withnokey.sysnumlines", true); pref("network.protocol-handler.app.mailto", "/usr/bin/xdg-email"); pref("network.protocol-handler.app.mms", "/usr/bin/xdg-open"); pref("browser.display.use_system_colors", true); pref("general.smoothScroll", true); pref("browser.startup.homepage_override.mstone", "ignore"); pref("print.print_edge_top", 14); // 1/100 of an inch pref("print.print_edge_left", 16); // 1/100 of an inch pref("print.print_edge_right", 16); // 1/100 of an inch pref("print.print_edge_bottom", 14); // 1/100 of an inch pref("browser.backspace_action", 2); pref("browser.tabs.loadFolderAndReplace", false); pref("browser.EULA.override", true); pref("browser.safebrowsing.enabled", true); pref("app.update.enabled", false); pref("app.update.auto", false); pref("app.update.autoInstallEnabled", false); pref("network.http.pipelining", true); pref("browser.tabs.loadDivertedInBackground", true); pref("intl.locale.matchOS", true); pref("toolkit.storage.synchronous", 0); EOF rm -f %{buildroot}${MOZ_APP_DIR}/%{name}-config cd %{buildroot}${MOZ_APP_DIR}/chrome find . -name "*" -type d -maxdepth 1 -exec rm -rf {} \; cd - # Prepare our devel package mkdir -p %{buildroot}/%{_includedir}/${INTERNAL_APP_SDK_NAME} mkdir -p %{buildroot}/%{_datadir}/idl/${INTERNAL_APP_SDK_NAME} mkdir -p %{buildroot}/%{_libdir}/pkgconfig cp -rL dist/include/* \ %{buildroot}/%{_includedir}/${INTERNAL_APP_SDK_NAME} install -c -m 755 dist/bin/xpcshell \ dist/bin/xpidl \ dist/bin/xpt_dump \ dist/bin/xpt_link \ %{buildroot}/${MOZ_APP_DIR} rm -rf %{buildroot}/%{_includedir}/${INTERNAL_APP_NAME} rm -rf %{buildroot}/%{_datadir}/idl/${INTERNAL_APP_NAME} rm -rf %{buildroot}${MOZ_APP_SDK_DIR}/include ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME}/unstable \ %{buildroot}${MOZ_APP_SDK_DIR}/include rm -rf %{buildroot}${MOZ_APP_SDK_DIR}/idl ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME}/unstable \ %{buildroot}${MOZ_APP_SDK_DIR}/idl rm -rf %{buildroot}${MOZ_APP_SDK_DIR}/sdk/include ln -s %{_includedir}/${INTERNAL_APP_SDK_NAME}/stable \ %{buildroot}${MOZ_APP_SDK_DIR}/sdk/include rm -rf %{buildroot}${MOZ_APP_SDK_DIR}/sdk/idl ln -s %{_datadir}/idl/${INTERNAL_APP_SDK_NAME}/stable \ %{buildroot}${MOZ_APP_SDK_DIR}/sdk/idl find %{buildroot}/%{_includedir} -type f -name "*.h" | xargs chmod 644 find %{buildroot}/%{_datadir}/idl -type f -name "*.idl" | xargs chmod 644 rm -rf %{buildroot}${MOZ_APP_SDK_DIR}/sdk/lib/*.so pushd %{buildroot}${MOZ_APP_DIR} for i in *.so; do ln -s ${MOZ_APP_DIR}/$i %{buildroot}${MOZ_APP_SDK_DIR}/sdk/lib/$i done popd # GRE stuff %ifarch x86_64 ia64 ppc64 s390x %define gre_conf_file %{version_internal}-64.system.conf %else %define gre_conf_file %{version_internal}.system.conf %endif MOZILLA_GECKO_VERSION=`./config/milestone.pl --topsrcdir=.` mv %{buildroot}%{_sysconfdir}/gre.d/$MOZILLA_GECKO_VERSION".system.conf" \ %{buildroot}%{_sysconfdir}/gre.d/%{gre_conf_file} chmod 644 %{buildroot}%{_sysconfdir}/gre.d/%{gre_conf_file} # Don't install these in appdir rm %{buildroot}${MOZ_APP_DIR}/LICENSE rm %{buildroot}${MOZ_APP_DIR}/README.txt # Use the system hunspell dictionaries rm -rf %{buildroot}${MOZ_APP_DIR}/dictionaries ln -s %{_datadir}/dict/mozilla %{buildroot}${MOZ_APP_DIR}/dictionaries # ghost files mkdir -p %{buildroot}${MOZ_APP_DIR}/components touch %{buildroot}${MOZ_APP_DIR}/components/compreg.dat touch %{buildroot}${MOZ_APP_DIR}/components/xpti.dat %find_lang %{name} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/xulrunner %doc LICENSE README.txt %files -n %{libname} %defattr(-,root,root) %dir %{mozappdir} %{mozappdir}/chrome %{mozappdir}/dictionaries %dir %{mozappdir}/components %ghost %{mozappdir}/components/compreg.dat %ghost %{mozappdir}/components/xpti.dat %{mozappdir}/components/*.so %{mozappdir}/components/*.xpt %attr(644, root, root) %{mozappdir}/components/*.js %{mozappdir}/defaults %{mozappdir}/greprefs %dir %{mozappdir}/icons %attr(644, root, root) %{mozappdir}/icons/* %{mozappdir}/modules %{mozappdir}/plugins %{mozappdir}/res %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh %{mozappdir}/regxpcom %{mozappdir}/xulrunner %{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list %{mozappdir}/javaxpcom.jar %dir %{_sysconfdir}/gre.d %{_sysconfdir}/gre.d/%{gre_conf_file} %files -n %{develname} %defattr(-,root,root,-) %dir %{_datadir}/idl/%{name}*%{version_internal} %{_datadir}/idl/%{name}*%{version_internal}/stable %{_includedir}/%{name}*%{version_internal} %exclude %{_includedir}/%{name}*%{version_internal}/unstable %dir %{_libdir}/%{name}-sdk-* %dir %{_libdir}/%{name}-sdk-*/sdk %{mozappdir}/xpcshell %{mozappdir}/xpidl %{mozappdir}/xpt_dump %{mozappdir}/xpt_link %{_libdir}/%{name}-sdk-*/*.h %{_libdir}/%{name}-sdk-*/sdk/* %exclude %{_libdir}/pkgconfig/*unstable*.pc %exclude %{_libdir}/pkgconfig/*gtkmozembed*.pc %{_libdir}/pkgconfig/*.pc %files -n %{develunstname} %defattr(-,root,root,-) %{_datadir}/idl/%{name}*%{version_internal}/unstable %{_includedir}/%{name}*%{version_internal}/unstable %dir %{_libdir}/%{name}-sdk-* %{_libdir}/%{name}-sdk-*/* %exclude %{_libdir}/%{name}-sdk-*/*.h %exclude %{_libdir}/%{name}-sdk-*/sdk %{_libdir}/pkgconfig/*unstable*.pc %{_libdir}/pkgconfig/*gtkmozembed*.pc %changelog * Sat Sep 27 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.9.0.3-1mdv2009.0 + Revision: 288943 - update firefox tarball to version 3.0.3 (xulrunner 1.9.0.3) * Thu Sep 25 2008 Tiago Salem <salem@mandriva.com.br> 1.9.0.2-1mdv2009.0 + Revision: 288008 - update firefox tarball to version 3.0.2 (xulrunner 1.9.0.2) * Sun Sep 14 2008 Frederic Crozat <fcrozat@mandriva.com> 1.9.0.1-16mdv2009.0 + Revision: 284637 - Update patch10 to specify libdir for mozilla-js, needed for correct rpath linking in google-gadgets * Tue Sep 02 2008 Tiago Salem <salem@mandriva.com.br> 1.9.0.1-15mdv2009.0 + Revision: 279088 - obsolete old libmozilla-firefox-devel - bump release * Thu Aug 21 2008 Tiago Salem <salem@mandriva.com.br> 1.9.0.1-14mdv2009.0 + Revision: 274837 - add upstream patches to fix crash with windowless plugins (swfdec) #445250 and #435764 in mozilla bugzilla - bump release * Wed Aug 20 2008 Götz Waschk <waschk@mandriva.org> 1.9.0.1-13mdv2009.0 + Revision: 274241 - more devel exceptions * Wed Aug 20 2008 Götz Waschk <waschk@mandriva.org> 1.9.0.1-12mdv2009.0 + Revision: 274202 - try to fix requires exceptions again to make the devel package installable * Tue Aug 19 2008 Tiago Salem <salem@mandriva.com.br> 1.9.0.1-11mdv2009.0 + Revision: 273964 - removing wrong \\| in the end of _requires_exceptions - bump release * Mon Aug 18 2008 Tiago Salem <salem@mandriva.com.br> 1.9.0.1-10mdv2009.0 + Revision: 273273 - changing defines to be able to submit. - disabling auto theme selection. - bump release - change requires to work on biarch systems not using %%arch_tagged to prevent hardcoding the version. * Wed Aug 13 2008 Tiago Salem <salem@mandriva.com.br> 1.9.0.1-9mdv2009.0 + Revision: 271429 - fix Requires to libhunspell - bump release - add requires to libhunspell (#42745) - provide libxulrunner for noarch packages (#42680) * Mon Aug 11 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.9.0.1-8mdv2009.0 + Revision: 270855 - remove wrong requires on nspr-static-devel(?) - move requires to the xulrunner library subpackage - manually pull dependancies on libnss3 and libnspr4 - use more appropriate name for unstable devel library - blacklist all nss libraries, this prevent auto pulling them as a dependencies for xulrunner-devel package - drop patch 9, completely wrong way - add buildrequires on nss-static-devel - fix file list - Patch9: fix building against system-wide nss library - enable build against system wide nspr and nss libraries - add few options to configure stage + Frederik Himpe <fhimpe@mandriva.org> - Remove BuildRequires: freetype-devel, this is the old freetype. The new libfreetype6-devel we need is actually already required by pango-devel * Fri Aug 01 2008 Tiago Salem <salem@mandriva.com.br> 1.9.0.1-5mdv2009.0 + Revision: 259973 - add patch to auto select theme on firefox - do not obsolete mozilla-firefox-gnome-support. It must be obsoleted by firefox package. - change gre_conf_file to use macros instead of shell variables - bump release - obsoleting mozilla-firefox-gnome-support as xulrunner now provides libnkgnomevfs.so + Frederik Himpe <fhimpe@mandriva.org> - Use major in gre config file name, so that future xulrunner versions won't conflict * Wed Jul 30 2008 Frederik Himpe <fhimpe@mandriva.org> 1.9.0.1-4mdv2009.0 + Revision: 254206 -Add some BuildRequires on GNOME libraries, which will hopefull bring back file type associations in Firefox built with xulrunner - xulrunner package should depend on xulrunner library * Tue Jul 29 2008 Frederik Himpe <fhimpe@mandriva.org> 1.9.0.1-3mdv2009.0 + Revision: 253592 - Add BuildRequires: python - Remove BuildRequires: gourmet - (Fedora): cleanup: remove some unneeded install commands - (Fedora): use system myspell directionaries - Try to fix permissions of /usr/share/doc/xulrunner - (Fedora) Package chk files, they are needed for nss and FIPS 140 - Integrate Firefox package vendor.js prefs file, and add from Fedora: * pref("toolkit.storage.synchronous", 0); (works around the infamous ext3 fsync problem with Firefox 3) * pref("intl.locale.matchOS", true); (use system locale for UI) * pref("app.update.autoInstallEnabled", false); * Sun Jul 27 2008 Frederik Himpe <fhimpe@mandriva.org> 1.9.0.1-2mdv2009.0 + Revision: 250321 - Don't define name, version and release - Attempt to libify the package so that 64 bits users can also install the 32 bits libraries - Don't make header files biarch aware, installing 32 and 64 bits devel pacakges at the same time is not supported on Mandriva anyway - Don't add xulrunner directory to ld.so.conf.d - Remove mochitest patch, we are not building these test anyway - Install README.txt and LICENSE files in /usr/share/doc - Re-enable startup notification which was disabled by accident * Sat Jul 26 2008 Frederik Himpe <fhimpe@mandriva.org> 1.9.0.1-1mdv2009.0 + Revision: 250050 - Synchronise with Fedora SPEC to make xulrunner actually usable: * Fix license * Add prefs.js with some Mandriva custom settings * Put stable and unstable API development files in different directories * Create xulrunner-devel-unstable which contains development files with unstable API * Add Fedora patch to use 1.9 as xulrunner version in the directory name instead of the complete version string * Add Fedora mochitest patch to fix building with system nspr and nss with test enabled * Add Fedora pkgconfig patch to fix locations in pkgconfig files * Disable building tests - New version 1.9.0.1 - Make it possible to build xulrunner from the Firefox sources, and do so for Xulrunner 1.9.0.1 built from Firefox 3.0.1 sources - Remove sqlite3 patch, problem fixed upstream - Only use system sqlite on Mandriva 2009.0 and newer, because it requires at least sqlite 3.5.9 * Sun Jul 20 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1.9-1mdv2009.0 + Revision: 238857 - initial package for Mandriva(work in progress) - backport few patches from firefox-3.0 - try better idea for pluginsdir patch, first check /usr/lib64 and then /usr/lib for mozilla plugins - Created package structure for xulrunner.