Blob Blame History Raw
%global		commit f3c066ad6c8f89fac81a8794a9f7c78ef64f4fe4
%global		oname torbrowser_launcher
Name:		torbrowser-launcher
Version:	0.3.2
Release:	7%{?dist}
Summary:	Tor Browser Bundle managing tool
License:	MIT
URL:		https://github.com/micahflee/torbrowser-launcher
Source0:	https://github.com/micahflee/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
Patch0:         torbrowser-launcher-prefix.patch
BuildArch:	noarch
BuildRequires:	desktop-file-utils
BuildRequires:	python3-devel
BuildRequires:	gettext
BuildRequires:	libappstream-glib
Requires:	python3
Requires:	gnupg2
Requires:	tor
Requires:	python3-pysocks
Requires:	python3-gpg
Requires:	python3-qt5
Requires:	python3-requests

%description
Tor Browser Launcher is intended to make Tor Browser easier to
install and use for GNU/Linux users. You install torbrowser-launcher
from your distribution's package manager and it handles everything else:

* Downloads and installs the most recent version of Tor Browser in your language
  and for your computer's architecture, or launches Tor Browser if it's already
  installed (Tor Browser will automatically update itself)
* Verifies Tor Browser's signature for you, to ensure the version you downloaded
  was cryptographically signed by Tor developers and was not tampered with
* Adds "Tor Browser" and "Tor Browser Launcher Settings" application launcher
  to your desktop environment's menu
* Optionally plays a modem sound when you open Tor Browser
  (because Tor is so slow)

%prep
%setup -q -n %{name}-%{commit}
%patch0 -p0

# We need to specify the distro we are building on, Fedora!
sed -i 's#distro = .*#distro = "Fedora"#g' setup.py
sed -i 's/Ubuntu/Fedora/g' setup.py
sed -i "s#'update_over_tor': True#'update_over_tor': False#g" torbrowser_launcher/common.py
sed -i -r "s/^([ \t]+)self.label1 = gtk.Label\(_\('Not installed'\)\)/\
\1self.label1 = gtk.Label\(_\('Not installed'\)\)\n\1self.tor_update_checkbox.\
set_active\(False\)/g" torbrowser_launcher/settings.py

%build
%py3_build
desktop-file-validate share/applications/torbrowser.desktop
desktop-file-validate share/applications/torbrowser-settings.desktop

%install
find . -name apparmor -type d -print0|xargs -0 rm -r --
%{__python3} setup.py install --skip-build --root %{buildroot} --prefix=%{_prefix} --install-data=%{_prefix}
install -m 644 -D share/metainfo/*.appdata.xml \
    %{buildroot}%{_datadir}/appdata/torbrowser-launcher.appdata.xml

if [ "%{_prefix}" != "/usr" ]; then
  cp -ru %{buildroot}/usr/* %{buildroot}%{_prefix}/
  rm -rf %{buildroot}/usr/*
#  sed -i 's|\/usr|\${_prefix}|g' torbrowser-launcher.lang
fi

%find_lang %{name}


%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml

%files -f %{name}.lang
%{_bindir}/%{name}
%doc README.md
%license LICENSE
%{_datadir}/applications/*
%{_datadir}/appdata/*
%{_datadir}/pixmaps/*
%{_datadir}/%{name}/*
#%%{python3_sitelib}/%%{oname}-%%{version}-py%%{python3_version}.egg-info
%{python3_sitelib}/%{oname}-0.3.1-py%{python3_version}.egg-info
%{python3_sitelib}/%{oname}/*
%exclude %{_datadir}/locale/torbrowser-launcher.mo
%exclude %{_datadir}/metainfo/torbrowser.appdata.xml


%changelog
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.2-7
- Rebuilt for Python 3.8

* Thu Jul 25 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.2-6
- Patch setup to honor prefix.

* Thu Jul 25 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.2-5
- Appdata fix.

* Thu Jul 25 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.2-4
- Create appdata dir.

* Thu Jul 25 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.2-3
- Validate desktop files in build.

* Thu Jul 25 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.2-2
- Cleanup.

* Wed Jul 24 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.2-1
- 0.3.2

* Mon Apr 29 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.1-7
- Fix appdata filename.

* Fri Mar 08 2019 Gwyn Ciesla <gwync@protonmail.com> - 0.3.1-6
- Switch to python3

* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Tue Jan 15 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.1-4
- Require python2 variants of packages explicitly.

* Wed Jan 09 2019 Gwyn Ciesla <limburgher@gmail.com> - 0.3.1-3
- Require python2-requests.

* Tue Jan 08 2019 Gwyn Ciesla <limburgher@gmail.com> - 0.3.1-2
- Fix dependencies.

* Wed Dec 26 2018 Gwyn Ciesla <limburgher@gmail.com> - 0.3.1-1
- 0.3.1

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.2.9-2
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Tue Feb 13 2018 Robert Mayr <robyduck@fedoraoproject.org> 0.2.9-1
- Updated AppStream metadata
- Add appdata check

* Mon Aug 07 2017 Robert Mayr <robyduck@fedoraoproject.org> 0.2.8-1
- Automatically refresh GPG keyring, to prevent signature verification false positives
- Improve GnuPG code by using GPGME if available
- Added Czech, Hungarian localization

* Fri Feb 03 2017 Robert Mayr <robyduck@fedoraoproject.org> 0.2.7-1
- Updated Tor Browser signing key because they added a new subkey and verification was failing
- Improved localization, and added Russian

* Thu Aug 11 2016 Robert Mayr <robyduck@fedoraoproject.org> 0.2.6-1
- Fix issue where Tor Browser Launcher failed to launch if currently installed version
  of Tor Browser was too old
- Fixed bug related to fallback to English feature that caused Settings to crash

* Mon Mar 14 2016 Robert Mayr <robyduck@fedoraoproject.org> 0.2.4-1
- Fix signature verification bypass attack, reported by Jann Horn

* Sat Mar 05 2016 Robert Mayr <robyduck@fedoraoproject.org> 0.2.3-1
- Removed certificate pinning to https://www.torproject.org to avoid issues with upcoming
  certificate change, and hard-coded minimum Tor Browser version in the release
- Fix issue with detecting language
- Make Tor SOCKS5 proxy configurable, for users not running on 9050
- Added translations
- Switched from xpm icons to png icons
- Changed "Exit" button to "Cancel" button
- New package description

* Sat Nov 14 2015 Robert Mayr <robyduck@fedoraoproject.org> 0.2.2-1
- Torbrowser Launcher no longer attempts to auto-update, now that Tor Browser has this feature
- System Tor is now an optional dependency
- Fix issue where downloads fail because of unicode URLs
- Removed window management code that stopped working many releases ago, and removed wmctrl dependency
- Removed test code that caused signature verification to happen at the wrong time

* Sat Nov 07 2015 Robert Mayr <robyduck@fedoraoproject.org> 0.2.1-1
- Stop using RecommendedTBBVersions and start using more reliable "release" channel XML
- Converted settings file from pickle format to JSON
- Download tarball signatures to verify, rather than SHA256SUMS and signature

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 30 2015 Robert Mayr <robyduck@fedoraoproject.org> 0.2.0-1
- bump release to version 0.2.0
- no need to set active flags in settings
- Added better support for updating over Tor
- Print less console output

* Mon Mar 02 2015 Robert Mayr <robyduck@fedoraoproject.org> 0.1.9-2
- bump release to version 0.1.9
- fix bug when firefox browser is already open
- don't check for updates at first install

* Wed Feb 25 2015 Robert Mayr <robyduck@fedoraoproject.org> 0.1.8-1
- downgrade to latest working version and fix minor bugs
- Import new TBB GPG keys for download
- fix insane spec file and changelog

* Sat Jan 24 2015 Robert Mayr <robyduck@fedoraoproject.org> 0.1.9-1
- fix required txsocksx and service-identity
- bump to last version available

* Wed Nov 26 2014 Robert Mayr <robyduck@fedoraoproject.org> 0.1.7-1
- Fixes bug #1167576
- You can now pass URLs into TBL, and set it as your default browser
- Hides TBL window before launching TBB
- Default mirror switched to https://dist.torproject.org/
- Added AppData file to look better in software centers
- Exclude AppArmor profiles in Ubuntu, where they're broken

* Thu Nov 06 2014 Robert Mayr <robyduck@fedoraoproject.org> 0.1.6-3
- Fix broken dependencies bug

* Sat Oct 18 2014 Robert Mayr <robyduck@fedoraoproject.org> 0.1.6-2
- Remove shortcommit from spec file

* Thu Oct 16 2014 Robert Mayr <robyduck@fedoraoproject.org> 0.1.6-1
- Fixed bug related to TBB 4.0's new folder structure
- Updated .desktop files to comply with standards
- Updated licensing confusion to just be MIT in all locations

* Sun Oct 12 2014 Robert Mayr <robyduck@fedoraoproject.org> 0.1.5-3
- Remove apparmor and bump release

* Sat Oct 11 2014 Robert Mayr <robyduck@fedoraoproject.org> 0.1.5-2
- License fix and Source URL commit

* Fri Oct 10 2014 Robert Mayr <robyduck@fedoraoproject.org> 0.1.5-1
- Initial package for Fedora