File firefox-nightly.spec of Package firefox-nightly
%global debug_package %{nil}
%global _optdir /opt
%define program firefox
%define type nightly
%define build_timestamp %(date +"%Y%m%d")
Summary: Firefox Nightly RPM Builds
Name: %{program}-%{type}
Version: %{build_timestamp}
Release: %%{?release_prefix}%{?dist}
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
URL: http://mozilla.org/%{program}
Source0: firefox-nightly-latest.tar.bz2
Source1: firefox-nightly-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}
BuildRequires: wget tar
Requires: expat libpng12-0 libpng16-16 fontconfig
Requires: libXrender1 libXau6 libX11-6 gtk2-branding-openSUSE libnotify4
Requires: libpixman-1-0 libgcc_s1 glibc libxcb1
%description
The Nightly version of Firefox directly from Mozilla.
%prep
%setup -q -T -a 0 -c
%build
install -dm 755 %{buildroot}/usr/{bin,share/{applications,icons/hicolor/128x128/apps},opt}
install -dm 755 %{buildroot}/%{_optdir}/%{name}/browser/defaults/preferences/
install -m644 %{_builddir}/%{name}-*/firefox/browser/chrome/icons/default/default128.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/%{name}.png
cp -rf %{_builddir}/%{name}-*/firefox/* %{buildroot}/opt/%{name}/
ln -s /opt/%{name}/firefox %{buildroot}/usr/bin/%{name}
cat > %{buildroot}/%{_datadir}/applications/%{name}.desktop << EOF
## Desktop File
[Desktop Entry]
Version=%{current}
Name=Firefox Nightly
GenericName=Firefox Nightly
Comment=Browse the Web
Exec=firefox-nighly %u
Icon=firefox-nighly.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;
[Desktop Action PrivateBrowsing]
Name=New Private Browsing Window
Exec=firefox-nightly --private-window %u
EOF
## Disable Update Alert
echo '// Disable Update Alert
pref("app.update.enabled", false);' > %{buildroot}/opt/%{name}/defaults/pref/vendor.js
%clean
%post
%postun
%pre
%preun
%files
%{_bindir}/%{name}
%{_datadir}/applications/%{name}*.desktop
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%{_optdir}/%{name}/
/usr/share/icons/hicolor/
%changelog