Blame electrum.spec

4c4c5d
Name:           electrum
e7400f
Version:        2.7.13
9a0863
Release:        2%{?dist}
4c4c5d
Summary:        A lightweight Bitcoin Client
4c4c5d
4c4c5d
License:        MIT and BSD
4c4c5d
URL:            https://electrum.org/
4c4c5d
Source0:        https://download.electrum.org/%{version}/Electrum-%{version}.tar.gz
e5dda5
Source1:        electrum.appdata.xml
4c4c5d
Patch0:         zbar-installation-instructions.patch
4c4c5d
BuildArch:      noarch
4c4c5d
4c4c5d
BuildRequires:  python2-devel
4c4c5d
BuildRequires:  PyQt4-devel
4c4c5d
BuildRequires:  desktop-file-utils
4c4c5d
BuildRequires:  gettext
4c4c5d
e5dda5
BuildRequires:  libappstream-glib
e5dda5
4c4c5d
Requires:       python2
4c4c5d
Requires:       python-ecdsa
4c4c5d
Requires:       python-slowaes
4c4c5d
Requires:       python-dns
4c4c5d
Requires:       python-requests
4c4c5d
Requires:       python-qrcode
4c4c5d
Requires:       protobuf-python
4c4c5d
Requires:       python-pbkdf2
4c4c5d
Requires:       python-jsonrpclib
4c4c5d
Requires:       PyQt4
4c4c5d
4c4c5d
Suggests:       zbar-pygtk
44173f
Suggests:       python2-trezor
9a0863
Suggests:       python2-btchip
4c4c5d
4c4c5d
Provides:       bundled(python-SocksiPy) = 1.00
4c4c5d
4c4c5d
%description
4c4c5d
Electrum is an easy to use Bitcoin client. It protects you from losing
4c4c5d
coins in a backup mistake or computer failure, because your wallet can
4c4c5d
be recovered from a secret phrase that you can write on paper or learn
4c4c5d
by heart. There is no waiting time when you start the client, because
4c4c5d
it does not download the Bitcoin block chain.
4c4c5d
4c4c5d
%prep
0d7a9e
%setup -q -n Electrum-%{version}
4c4c5d
%patch0
4c4c5d
rm -rf Electrum.egg-info
4c4c5d
rm -rf packages
4c4c5d
4c4c5d
%build
4c4c5d
pyrcc4 icons.qrc -o gui/qt/icons_rc.py
4c4c5d
%{py2_build}
4c4c5d
4c4c5d
%install
4c4c5d
%{py2_install}
e5dda5
install -Dpm 644 %{SOURCE1} %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
4c4c5d
4c4c5d
# Remove shebang lines from .py files that aren't executable, and
4c4c5d
# remove executability from .py files that don't have a shebang line:
4c4c5d
# Source: dmalcolm.fedorapeople.org/python3.spec
4c4c5d
find %{buildroot} -name \*.py \
4c4c5d
  \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
4c4c5d
  -print -exec sed -i '1d' {} \; \) -o \( \
4c4c5d
  -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
4c4c5d
  -exec chmod a-x {} \; \) \)
4c4c5d
4c4c5d
# Install Desktop file, fix categories
4c4c5d
desktop-file-install                                    \
4c4c5d
--remove-category="Network"                             \
4c4c5d
--add-category="Office"                                 \
4c4c5d
--add-category="Finance"                                \
4c4c5d
--delete-original                                       \
4c4c5d
--dir=%{buildroot}%{_datadir}/applications              \
4c4c5d
%{buildroot}%{_datadir}/applications/%{name}.desktop
4c4c5d
4c4c5d
%find_lang %{name}
4c4c5d
e5dda5
%check
e5dda5
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
e5dda5
4c4c5d
%post
4c4c5d
/usr/bin/update-desktop-database &> /dev/null || :
4c4c5d
4c4c5d
%postun
4c4c5d
/usr/bin/update-desktop-database &> /dev/null || :
4c4c5d
4c4c5d
%files -f %{name}.lang
4c4c5d
%doc AUTHORS
4c4c5d
%doc README.rst
4c4c5d
%doc RELEASE-NOTES
4c4c5d
%doc PKG-INFO
4c4c5d
%license LICENCE
4c4c5d
%{_bindir}/electrum
e5dda5
%{_datadir}/pixmaps/%{name}.png
e5dda5
%{_datadir}/applications/%{name}.desktop
e5dda5
%{_datadir}/appdata/%{name}.appdata.xml
4c4c5d
%{python2_sitelib}/*
4c4c5d
4c4c5d
%changelog
9a0863
* Mon Jan 09 2017 Jonny Heggheim <jonnyheggheim@sigaint.org> - 2.7.13-2
9a0863
- Added suggests python2-btchip
9a0863
e7400f
* Tue Jan 03 2017 Jonny Heggheim <jonnyheggheim@sigaint.org> - 2.7.13-1
e7400f
- new version
e7400f
e5dda5
* Tue Nov 29 2016 Jonny Heggheim <jonnyheggheim@sigaint.org> - 2.7.12-5
e5dda5
- Include appdata.xml file
e5dda5
4c4c5d
* Fri Nov 18 2016 Jonny Heggheim <jonnyheggheim@sigaint.org> - 2.7.12-4
4c4c5d
- Updated license to MIT and BSD
4c4c5d
4c4c5d
* Tue Nov 15 2016 Jonny Heggheim <jonnyheggheim@sigaint.org> - 2.7.12-3
4c4c5d
- Added Provides: bundled(python-SocksiPy)
4c4c5d
4c4c5d
* Sun Nov 13 2016 Jonny Heggheim <jonnyheggheim@sigaint.org> - 2.7.12-2
4c4c5d
- Added weak dependency on zbar-pygtk
4c4c5d
4c4c5d
* Wed Nov 09 2016 Jonny Heggheim <jonnyheggheim@sigaint.org> - 2.7.12-1
4c4c5d
- new version
4c4c5d
4c4c5d
* Tue Apr 26 2016 gyger@fsfe.org - 2.6.4-2
4c4c5d
- Fixed for python2 and new packaging requirements.
4c4c5d
4c4c5d
* Mon Apr 25 2016 gyger@fsfe.org - 2.6.4-1
4c4c5d
- Upgrade to new Version.
4c4c5d
- Relicenced to MIT.
4c4c5d
4c4c5d
* Sat Nov 7 2015 gyger@fsfe.org - 2.5.2-1
4c4c5d
- Upgrade to new Version.
4c4c5d
4c4c5d
* Sat Jul 25 2015 gyger@fsfe.org - 2.3.3-1
4c4c5d
- Upgrade to new Version.
4c4c5d
4c4c5d
* Wed Jan 28 2015 gyger@fsfe.org - 2.0.0-4
4c4c5d
- Add Dependency on Pbkdf2
4c4c5d
4c4c5d
* Wed Jan 28 2015 gyger@fsfe.org - 2.0.0-1
4c4c5d
- Packaging the Beta Version.
4c4c5d
4c4c5d
* Wed Jan 28 2015 gyger@fsfe.org - 1.9.8-1
4c4c5d
- Initial Packaging for electrum on Fedora