AutoReqProv: no ##Init variables %global current 73.0b2 %global packver 73 %global _optdir /opt %global debug_package %{nil} %ifarch x86_64 %global arch x86_64 %else %global arch i686 %endif ##Package Version and Licences Summary: Firefox Developer RPM Builds Name: firefox-developer Version: %{current} Release: %(date +%%y%%m%%d)%{?dist} License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet URL: http://www.developer.mozilla.org/ Source: firefox-%{current}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root ##DEPS BuildRequires: tar Requires: alsa-lib libX11 libXcomposite libXdamage libnotify libXt libXext glib2 dbus-glib libjpeg-turbo cairo-gobject libffi fontconfig freetype libgcc gtk3 gtk2 hunspell zlib Requires: nspr >= 4.10.8 Requires: nss >= 3.19.2 Requires: sqlite >= 3.8.10.2 ##Description for Package %description This package is a package built directly from Mozilla's developer tarball. %prep %setup -n firefox %build ##tar -jxvf firefox-%{current}.tar.bz2 -C %{_builddir} # sed some python scripts to comply with python2/3 policy find %{_builddir} -name '*.py' -exec sed -i -e 's,#!/usr/bin/python,#!/usr/bin/python2,' -e 's,/usr/bin/env python,/usr/bin/env python2,' -s {} \; ## Install Instructions %install install -dm 755 %{buildroot}/usr/{bin,share/{applications,icons/hicolor/128x128/apps},opt} install -dm 755 %{buildroot}/%{_optdir}/firefox-developer/browser/defaults/preferences/ install -m644 %{_builddir}/firefox/browser/chrome/icons/default/default128.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/firefox-developer.png cp -rf %{_builddir}/firefox/* %{buildroot}/opt/firefox-developer/ ln -s /opt/firefox-developer/firefox %{buildroot}/usr/bin/firefox-developer cat > %{buildroot}/%{_datadir}/applications/%{name}.desktop << EOF ## Desktop File [Desktop Entry] Name=Firefox Developer GenericName=Firefox Developer Comment=Browse the Web Exec=firefox-developer %u Icon=%{_datadir}/icons/hicolor/128x128/apps/%{name}.png Terminal=false Type=Application MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; Categories=Network;WebBrowser; Keywords=web;browser;internet; EOF ## Disable Update Alert echo '// Disable Update Alert pref("app.update.enabled", false);' > %{buildroot}/opt/firefox-developer/browser/defaults/preferences/vendor.js %clean rm -rf $RPM_BUILD_ROOT %files %{_bindir}/%{name} %{_datadir}/applications/%{name}*.desktop %{_datadir}/icons/hicolor/128x128/apps/%{name}.png %{_optdir}/firefox-developer/