Blob Blame Raw
%global moz_extensions %{_datadir}/mozilla/extensions

%global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
%global src_ext_id https-everywhere@eff.org
%global firefox_inst_dir %{moz_extensions}/%{firefox_app_id}/%{src_ext_id}

%global seamonkey_app_id \{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
%global seamonkey_inst_dir %{moz_extensions}/%{seamonkey_app_id}

Name:           mozilla-https-everywhere
Version:        1.2
Release:        1%{?dist}
Summary:        HTTPS/HSTS enforcement extension for Mozilla Firefox and SeaMonkey

Group:          Applications/Internet
License:        GPLv2+
URL:            https://eff.org/https-everywhere
# A git repo is available at git://git.torproject.org/https-everywhere.git
Source0:        https://www.eff.org/files/https-everywhere-%{version}.xpi

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  dos2unix
%if 0%{?rhel} == 5
Requires:       firefox
%else
Requires:       mozilla-filesystem
%endif
BuildArch:      noarch


%description
HTTPS Everywhere is a Firefox extension produced as a collaboration between
The Tor Project and the Electronic Frontier Foundation. It encrypts your
communications with a number of major websites.

Many sites on the web offer some limited support for encryption over HTTPS,
but make it difficult to use. For instance, they may default to unencrypted
HTTP, or fill encrypted pages with links that go back to the unencrypted site.

The HTTPS Everywhere extension fixes these problems by rewriting all requests
to these sites to HTTPS.


%prep
%setup -q -c
dos2unix -f LICENSE.txt

%build


%install
rm -rf %{buildroot}
install -Dp -m 644 chrome.manifest %{buildroot}%{firefox_inst_dir}/chrome.manifest
install -Dp -m 644 install.rdf %{buildroot}%{firefox_inst_dir}/install.rdf
install -Dp -m 644 Changelog %{buildroot}%{firefox_inst_dir}/Changelog
install -Dp -m 644 components/https-everywhere.js %{buildroot}%{firefox_inst_dir}/components/https-everywhere.js
install -Dp -m 644 chrome/content/about.xul %{buildroot}%{firefox_inst_dir}/chrome/content/about.xul
install -Dp -m 644 chrome/content/preferences.css %{buildroot}%{firefox_inst_dir}/chrome/content/preferences.css
install -Dp -m 644 chrome/content/preferences.js %{buildroot}%{firefox_inst_dir}/chrome/content/preferences.js
install -Dp -m 644 chrome/content/preferences.xul %{buildroot}%{firefox_inst_dir}/chrome/content/preferences.xul
install -Dp -m 644 chrome/content/toolbar_button.js %{buildroot}%{firefox_inst_dir}/chrome/content/toolbar_button.js
install -Dp -m 644 chrome/content/toolbar_button.xul %{buildroot}%{firefox_inst_dir}/chrome/content/toolbar_button.xul
install -Dp -m 644 chrome/content/code/ApplicableList.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/ApplicableList.js
install -Dp -m 644 chrome/content/code/Cookie.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/Cookie.js
install -Dp -m 644 chrome/content/code/Class.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/Class.js
install -Dp -m 644 chrome/content/code/HTTPS.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/HTTPS.js
install -Dp -m 644 chrome/content/code/HTTPSRules.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/HTTPSRules.js
install -Dp -m 644 chrome/content/code/IOUtil.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/IOUtil.js
install -Dp -m 644 chrome/content/code/Main.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/Main.js
install -Dp -m 644 chrome/content/code/STS.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/STS.js
install -Dp -m 644 chrome/content/code/Thread.js %{buildroot}%{firefox_inst_dir}/chrome/content/code/Thread.js
install -Dp -m 644 chrome/content/rules/00README %{buildroot}%{firefox_inst_dir}/chrome/content/rules/00README
install -Dp -m 644 chrome/content/rules/default.rulesets %{buildroot}%{firefox_inst_dir}/chrome/content/rules/default.rulesets
install -Dp -m 644 chrome/locale/en/https-everywhere.dtd %{buildroot}%{firefox_inst_dir}/chrome/locale/en/https-everywhere.dtd
install -Dp -m 644 chrome/skin/cross.png %{buildroot}%{firefox_inst_dir}/chrome/skin/cross.png
install -Dp -m 644 chrome/skin/https-everywhere-16.png %{buildroot}%{firefox_inst_dir}/chrome/skin/https-everywhere-16.png
install -Dp -m 644 chrome/skin/https-everywhere-24.png %{buildroot}%{firefox_inst_dir}/chrome/skin/https-everywhere-24.png
install -Dp -m 644 chrome/skin/https-everywhere-half-24.png %{buildroot}%{firefox_inst_dir}/chrome/skin/https-everywhere-half-24.png
install -Dp -m 644 chrome/skin/https-everywhere.css %{buildroot}%{firefox_inst_dir}/chrome/skin/https-everywhere.css
install -Dp -m 644 chrome/skin/https-everywhere.png %{buildroot}%{firefox_inst_dir}/chrome/skin/https-everywhere.png
install -Dp -m 644 chrome/skin/https-everywhere.xcf %{buildroot}%{firefox_inst_dir}/chrome/skin/https-everywhere.xcf
install -Dp -m 644 chrome/skin/tick-moot.png %{buildroot}%{firefox_inst_dir}/chrome/skin/tick-moot.png
install -Dp -m 644 chrome/skin/tick-red.png %{buildroot}%{firefox_inst_dir}/chrome/skin/tick-red.png
install -Dp -m 644 chrome/skin/tick.png %{buildroot}%{firefox_inst_dir}/chrome/skin/tick.png

# symlink from seamonkey extension to firefox extension
mkdir -p %{buildroot}%{seamonkey_inst_dir}
ln -s %{firefox_inst_dir} %{buildroot}%{seamonkey_inst_dir}

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc LICENSE.txt
%{firefox_inst_dir}
%{seamonkey_inst_dir}


%changelog
* Tue Nov 15 2011 Russell Golden <niveusluna@niveusluna.org> - 1.2-1
- Fixes: WordPress, Statcounter, Java, Bahn.de, SICS.se
- Improvements: use fancy new HTTPS Wikipedia
- Disable broken: OpenUniversity, TV.com, Random.org, kb.CERT

* Thu Oct 20 2011 Russell Golden <niveusluna@niveusluna.org> - 1.1-1
- Further tweaks to internals, will hopefully fix a number of weird issues:
--      https://trac.torproject.org/projects/tor/ticket/4194
--      https://trac.torproject.org/projects/tor/ticket/4149
--      https://mail1.eff.org/pipermail/https-everywhere/2011-October/001208.html
- YouTube is enabled by default!
- Fixes: Yandex, Statcounter, Polldaddy, SBB.ch
- Improvements: Facebook+
- Disable broken: Bloglines, EPEAT

* Sat Oct 8 2011 Russell Golden <niveusluna@niveusluna.org> - 1.0.3-2
- Changelog added for current version

* Fri Sep 16 2011 Russell Golden <niveusluna@niveusluna.org> - 1.0.1-1
- Initial packaging for Fedora