%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} %define src_ext_id \{73a6fe31-595d-460b-a920-fcc0f8843232\} %define inst_dir %{_libdir}/mozilla/extensions/%{firefox_app_id}/%{src_ext_id} # Do not build a debug package, we have nothing to strip %define debug_package %{nil} Name: mozilla-noscript Version: 1.9.6 Release: 1%{?dist} Summary: Javascript whitelist extension for Mozilla Firefox Group: Applications/Internet License: GPLv2+ URL: http://noscript.net/ # Source is a .xpi file, there is no public VCS or a tarball Source0: https://secure.informaction.com/download/releases/noscript-%{version}.xpi # ChangeLog is generated by executing the following: # elinks --dump http://noscript.net/changelog | sed 1,15d > noscript-1.9.6-changelog Source1: noscript-%{version}-changelog Patch0: noscript-preferences.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: unzip, dos2unix # Commented, rpm seems not to be able to handle this anymore # Requirements are defined as files in order to better cope with changing firefox/mozilla packages #Requires: %{_libdir}/mozilla/extensions/, %{_libdir}/mozilla/extensions/%{firefox_app_id}/ Requires: firefox %description The NoScript Firefox extension provides extra protection for Firefox. It allows JavaScript, Java, Flash and other plugins to be executed only by trusted web sites of your choice (e.g. your online bank) and additionally provides Anti-XSS protection. %prep %setup -q -c -T unzip -q %{SOURCE0} %patch0 -p 1 -b .prefs cp %{SOURCE1} ChangeLog dos2unix GPL.txt dos2unix NoScript_License.txt %build %install rm -rf %{buildroot} install -D -m 644 chrome.manifest %{buildroot}%{inst_dir}/chrome.manifest install -D -m 644 install.js %{buildroot}%{inst_dir}/install.js install -D -m 644 install.rdf %{buildroot}%{inst_dir}/install.rdf install -D -m 644 components/noscriptService.js %{buildroot}%{inst_dir}/components/noscriptService.js install -D -m 644 defaults/preferences/noscript.js %{buildroot}%{inst_dir}/defaults/preferences/noscript.js install -D -m 644 chrome/noscript.jar %{buildroot}%{inst_dir}/chrome/noscript.jar %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc GPL.txt NoScript_License.txt mozilla.cfg ChangeLog %{inst_dir} %changelog * Sun Jul 19 2009 Andreas Thienemann - 1.9.6-1 - Initial package