From 911258ad4eb0a6b37229dfba3919e2aed4526dea Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Dec 10 2020 15:05:55 +0000 Subject: Restore zbar as weak dependency since it's only used for QR scanner Fix rpmlint warnings and errors ("E: explicit-lib-dependency libsecp256k" is a false positive) Resolves: #1766821 --- diff --git a/electrum.1 b/electrum.1 new file mode 100644 index 0000000..8807b26 --- /dev/null +++ b/electrum.1 @@ -0,0 +1,75 @@ +.TH electrum 1 "23 June 2013" "electrum" +.SH NAME +electrum \- Lightweight bitcoin client +.SH SYNOPSIS +.B electrum [options] command [options] +.SH DESCRIPTION +.PP +Electrum is a lightweight bitcoin client. +.br +Electrum protects from losing bitcoins in a backup mistake or computer +failure. It allows recovery of wallet from a passphrase which you can +learn by heart or write it down on a paper. +.br +Since electrum does not download the entire bitcoin block chain there +is no waiting time when the client is started. + +.TP +\fB\-g GUI, \-\-gui=GUI\fR +Select user interface, possible values are qt, lite, gtk or text +.TP +\fB\-w WALLET_PATH, \-\-wallet=WALLET_PATH\fR +Use wallet from WALLET_PATH, default is electrum.dat. +.TP +\fB\-o, \-\-offline\fR +Remain offline. +.TP +\fB\-a, \-\-all\fR +Show all addresses. +.TP +\fB\-b, \-\-balance\fR +Show the balance of listed addresses +.TP +\fB\-l, \-\-labels\fR +Show the labels of listed addresses +.TP +\fB\-f TX_FEE, \-\-fee=TX_FEE\fR +set tx fee +.TP +\fB\-F FROM_ADDR, \-\-fromad +dr=FROM_ADDR\fR +.PP +set source address for payto/mktx. if it isn't in the wallet, it will +ask for the private key unless supplied in the format +public_key:private_key. It's not saved in the wallet. +.TP +\fB\-c CHANGE_ADDR, \-\-changeaddr=CHANGE_ADDR\fR +.PP +set the change address for payto/mktx. default is a spare address, or +the source address if it's not in the wallet. +.TP +\fB\-s SERVER, \-\-server=SERVER\fR +set server host:port:protocol, where protocol is t or h +.TP +\fB\-p PROXY, \-\-proxy=PROXY\fR +set proxy [type:]host[:port], where type is socks4,socks5 or http +.TP +\fB\-v, \-\-verbose\fR +show debugging information +.TP +\fB\-P, \-\-portable\fR +portable wallet +.TP +\fB\-L LANGUAGE, \-\-lang=LANGUAGE\fR +default language used in GUI +.TP +\fB\-u, \-\-usb\fR +Turn on support for hardware wallets (EXPERIMENTAL). +.SH AUTHORS +Electrum client was initially written by ThomasV +<\fIthomasv@gitorious\fR> +.br +This manual page was written by Vasudev Kamath +<\fIkamathvasudev@gmail.com\fR> for Debian Project (but can be used by +others). + diff --git a/electrum.spec b/electrum.spec index be91c45..0032e3a 100644 --- a/electrum.spec +++ b/electrum.spec @@ -1,6 +1,6 @@ Name: electrum Version: 4.0.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight Bitcoin Client License: MIT @@ -11,20 +11,24 @@ Source1: https://download.electrum.org/%{version}/Electrum-%{version}.tar #gpg2 --export --export-options export-minimal 6694D8DE7BE8EE5631BED9502BD5824B7F9470E6 > gpgkey-electrum.gpg Source2: gpgkey-electrum.gpg Source3: electrum.appdata.xml +Source4: electrum.1 + +Patch0: fix-desktop-exec.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-qt5-devel -BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: libappstream-glib BuildRequires: gnupg2 Requires: python%{python3_version}dist(pyqt5) +# Unlucky rpm automatic dependency generation doesn't catch this dependency Requires: libsecp256k1 -Requires: zbar + +Suggests: zbar Suggests: python3-trezor >= 0.11.2 Suggests: python3-btchip >= 0.1.30 @@ -40,7 +44,7 @@ it does not download the Bitcoin block chain. %prep gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} -%setup -q -n Electrum-%{version} +%autosetup -n Electrum-%{version} rm -rf Electrum.egg-info rm -rf packages @@ -50,6 +54,7 @@ rm -rf packages %install %{py3_install} install -Dpm 644 %{SOURCE3} %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml +install -Dpm 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/%{name}.1 # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: @@ -60,15 +65,6 @@ find %{buildroot} -name \*.py \ -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ -exec chmod a-x {} \; \) \) -# Install Desktop file, fix categories -desktop-file-install \ ---remove-category="Network" \ ---add-category="Office" \ ---add-category="Finance" \ ---delete-original \ ---dir=%{buildroot}%{_datadir}/applications \ -%{buildroot}%{_datadir}/applications/%{name}.desktop - %find_lang %{name} %check @@ -81,12 +77,18 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata %doc PKG-INFO %license LICENCE %{_bindir}/electrum +%{_mandir}/man1/%{name}.1* %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/%{name}.desktop %{_datadir}/appdata/%{name}.appdata.xml %{python3_sitelib}/* +%exclude %{python3_sitelib}/%{name}/locale %changelog +* Thu Dec 10 2020 Timothy Redaelli - 4.0.7-2 +- Restore zbar as weak dependency since it's only used for QR scanner (#1766821) +- Fix rpmlint warnings and errors ("E: explicit-lib-dependency libsecp256k" is a false positive) + * Thu Dec 10 2020 Timothy Redaelli - 4.0.7-1 - Updated to version 4.0.7 diff --git a/fix-desktop-exec.patch b/fix-desktop-exec.patch new file mode 100644 index 0000000..590d318 --- /dev/null +++ b/fix-desktop-exec.patch @@ -0,0 +1,18 @@ +--- a/electrum.desktop ++++ b/electrum.desktop +@@ -3,7 +3,7 @@ + + [Desktop Entry] + Comment=Lightweight Bitcoin Client +-Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum %u" ++Exec=electrum %u + GenericName[en_US]=Bitcoin Wallet + GenericName=Bitcoin Wallet + Icon=electrum +@@ -18,5 +18,5 @@ MimeType=x-scheme-handler/bitcoin; + Actions=Testnet; + + [Desktop Action Testnet] +-Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum --testnet %u" ++Exec=electrum --testnet %u + Name=Testnet mode