%define firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} %define src_ext_id \{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d\} %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-adblockplus Version: 1.1 Release: 1%{?dist} Summary: Adblocking extension for Mozilla Firefox Group: Applications/Internet License: MPLv1.1 URL: http://adblockplus.org/ # Source can be obtained by hg # hg clone http://hg.mozdev.org/adblockplus/ && cd adblockplus # If you want a specific release, a list is available with hg tags # # hg up -r ADBLOCK_PLUS_1_1_RELEASE # tar cfz adblockplus-1.1.tar.gz adblockplus Packager.pm Source0: adblockplus-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: zip, perl, sed # 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 Adblock Plus is a content-filtering extension for the Mozilla Firefox- and Mozilla Application Suite-based web browsers. Adblock Plus allows users to prevent page elements, such as advertisements, from being downloaded and displayed. It features improvements to the user interface, filter subscriptions, and element hiding over the original Adblock extesion. %prep %setup -q -c %build pushd adblockplus perl create_xpi.pl adblockplus-%{version}-%{release}.xpi popd %install rm -rf %{buildroot} unzip adblockplus/adblockplus-%{version}-%{release}.xpi install -D -m 644 chrome.manifest %{buildroot}%{inst_dir}/chrome.manifest install -D -m 644 install.rdf %{buildroot}%{inst_dir}/install.rdf install -D -m 644 components/AdblockPlus.js %{buildroot}%{inst_dir}/components/AdblockPlus.js install -D -m 644 defaults/preferences/adblockplus.js %{buildroot}%{inst_dir}/defaults/preferences/adblockplus.js install -D -m 644 chrome/adblockplus.jar %{buildroot}%{inst_dir}/chrome/adblockplus.jar %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{inst_dir} %changelog * Sun Jul 19 2009 Andreas Thienemann - 1.1-1 - Updated to 1.1 upstream release * Wed Apr 29 2009 Andreas Thienemann - 1.0.2-1 - Updated to 1.0.2 upstream release * Tue Apr 07 2009 Andreas Thienemann - 1.0.1-1 - Initial package