192 lines
7.5 KiB
RPMSpec
192 lines
7.5 KiB
RPMSpec
|
#
|
||
|
# spec file for package bitcoin
|
||
|
#
|
||
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||
|
# Copyright (c) 2011-2014 P Rusnak <prusnak@opensuse.org>
|
||
|
#
|
||
|
# All modifications and additions to the file contributed by third parties
|
||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||
|
# upon. The license for this file, and modifications and additions to the
|
||
|
# file, is the same license as for the pristine package itself (unless the
|
||
|
# license for the pristine package is not an Open Source License, in which
|
||
|
# case the license is the MIT License). An "Open Source License" is a
|
||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||
|
# published by the Open Source Initiative.
|
||
|
|
||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
|
#
|
||
|
|
||
|
|
||
|
Name: bitcoin
|
||
|
Version: 0.9.3
|
||
|
Release: 0
|
||
|
Summary: P2P Digital Currency
|
||
|
License: MIT
|
||
|
Group: Productivity/Networking/Other
|
||
|
Url: http://www.bitcoin.org
|
||
|
Source: https://github.com/bitcoin/bitcoin/archive/v%{version}.tar.gz
|
||
|
Source1: bitcoind.service
|
||
|
Source2: bitcoind.firewall
|
||
|
Source3: bitcoind.conf
|
||
|
# PATCH-FIX-OPENSUSE bitcoin-fix-desktop-icon-name.patch prusnak@opensuse.org -- Rename icon in desktop file to remove size reference.
|
||
|
Patch0: bitcoin-fix-desktop-icon-name.patch
|
||
|
BuildRequires: autoconf
|
||
|
BuildRequires: automake
|
||
|
BuildRequires: boost-devel
|
||
|
BuildRequires: gcc-c++
|
||
|
BuildRequires: git
|
||
|
BuildRequires: libdb-4_8-devel
|
||
|
BuildRequires: libminiupnpc-devel
|
||
|
BuildRequires: libopenssl-devel
|
||
|
BuildRequires: libqt5-qtbase-devel
|
||
|
BuildRequires: libqt5-qttools-devel
|
||
|
BuildRequires: protobuf-devel
|
||
|
BuildRequires: qrencode-devel
|
||
|
BuildRequires: systemd
|
||
|
BuildRequires: update-desktop-files
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
%{?systemd_requires}
|
||
|
|
||
|
%description
|
||
|
Bitcoin is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of a P2P network to check for double-spending.
|
||
|
|
||
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
||
|
|
||
|
%package qt5
|
||
|
Summary: An end-user Qt5 GUI for the Bitcoin crypto-currency
|
||
|
License: MIT
|
||
|
Group: Development/Libraries/Other
|
||
|
Provides: bitcoin = %{version}
|
||
|
Obsoletes: bitcoin < %{version}
|
||
|
|
||
|
%description qt5
|
||
|
Bitcoin is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of a P2P network to check for double-spending.
|
||
|
|
||
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
||
|
|
||
|
This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt.
|
||
|
|
||
|
%package cli
|
||
|
Summary: An end-user cli for the Bitcoin crypto-currency
|
||
|
License: MIT
|
||
|
|
||
|
%description cli
|
||
|
Bitcoin is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of a P2P network to check for double-spending.
|
||
|
|
||
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
||
|
|
||
|
This package provides bitcoin-cli - CLI tool to interact with the daemon.
|
||
|
|
||
|
%package -n bitcoind
|
||
|
Summary: Headless daemon for Bitcoin crypto-currency
|
||
|
License: MIT
|
||
|
Group: Development/Libraries/Other
|
||
|
|
||
|
%description -n bitcoind
|
||
|
Bitcoin is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of a P2P network to check for double-spending.
|
||
|
|
||
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
||
|
|
||
|
This package provides bitcoind, headless bitcoin daemon.
|
||
|
|
||
|
%package test
|
||
|
Summary: Automated tests for bitcoin client
|
||
|
License: MIT
|
||
|
Group: Development/Libraries/Other
|
||
|
|
||
|
%description test
|
||
|
Bitcoin is a free open source peer-to-peer electronic cash system that is completely decentralized, without the need for a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of a P2P network to check for double-spending.
|
||
|
|
||
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
||
|
|
||
|
This package provides automated tests for bitcoin-qt5 and bitcoind.
|
||
|
|
||
|
%prep
|
||
|
%setup -q
|
||
|
%patch0 -p1
|
||
|
|
||
|
%build
|
||
|
autoreconf -fvi
|
||
|
%configure \
|
||
|
--with-cli=yes \
|
||
|
--with-daemon=yes \
|
||
|
--with-gui=qt5 \
|
||
|
--with-miniupnpc \
|
||
|
--disable-silent-rules
|
||
|
make %{?_smp_mflags}
|
||
|
|
||
|
%install
|
||
|
%make_install
|
||
|
|
||
|
install -D -m 0644 share/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||
|
install -D -m 0644 contrib/debian/bitcoin-qt.desktop %{buildroot}%{_datadir}/applications/%{name}-qt.desktop
|
||
|
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}-qt.desktop
|
||
|
install -D -m 0644 contrib/debian/manpages/bitcoind.1 %{buildroot}%{_mandir}/man1/bitcoind.1
|
||
|
install -D -m 0644 contrib/debian/manpages/bitcoin-qt.1 %{buildroot}%{_mandir}/man1/bitcoin-qt.1
|
||
|
install -D -m 0644 contrib/debian/manpages/bitcoin.conf.5 %{buildroot}%{_mandir}/man5/bitcoin.conf.5
|
||
|
install -D -m 0644 contrib/debian/examples/bitcoin.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
||
|
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}
|
||
|
install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
|
||
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bitcoind
|
||
|
mkdir %{buildroot}%{_sbindir}
|
||
|
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcbitcoind
|
||
|
install -D -m 0644 $RPM_SOURCE_DIR/bitcoind.service %{buildroot}/%{_unitdir}/bitcoind.service
|
||
|
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}/
|
||
|
install -m 0644 %{SOURCE3} %{buildroot}/%{_tmpfilesdir}/bitcoind.conf
|
||
|
|
||
|
%post qt5
|
||
|
%desktop_database_post
|
||
|
|
||
|
%postun qt5
|
||
|
%desktop_database_post
|
||
|
|
||
|
%pre -n bitcoind
|
||
|
getent group %{name} >/dev/null || groupadd -r %{name}
|
||
|
getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "Bitcoin daemon" %{name}
|
||
|
%service_add_pre bitcoind.service
|
||
|
|
||
|
%post -n bitcoind
|
||
|
%service_add_post bitcoind.service
|
||
|
systemd-tmpfiles --create %{_tmpfilesdir}/bitcoind.conf
|
||
|
|
||
|
%preun -n bitcoind
|
||
|
%service_del_preun bitcoind.service
|
||
|
|
||
|
%postun -n bitcoind
|
||
|
%service_del_postun bitcoind.service
|
||
|
|
||
|
%files qt5
|
||
|
%defattr(-,root,root)
|
||
|
%doc COPYING README.md
|
||
|
%{_bindir}/bitcoin-qt
|
||
|
%{_datadir}/applications/%{name}-qt.desktop
|
||
|
%{_mandir}/man1/bitcoin-qt.1%{?ext_man}
|
||
|
%{_datadir}/pixmaps/%{name}.png
|
||
|
|
||
|
%files cli
|
||
|
%defattr(-,root,root)
|
||
|
%doc COPYING README.md
|
||
|
%{_bindir}/bitcoin-cli
|
||
|
|
||
|
%files -n bitcoind
|
||
|
%defattr(-,root,root)
|
||
|
%doc COPYING README.md
|
||
|
%{_mandir}/man1/bitcoind.1%{?ext_man}
|
||
|
%{_mandir}/man5/%{name}.conf.5%{?ext_man}
|
||
|
%{_bindir}/bitcoind
|
||
|
%dir %attr(700,%{name},%{name}) %{_var}/lib/%{name}
|
||
|
%dir %{_sysconfdir}/%{name}
|
||
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bitcoind
|
||
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
||
|
%{_unitdir}/bitcoind.service
|
||
|
%{_sbindir}/rcbitcoind
|
||
|
%{_tmpfilesdir}/bitcoind.conf
|
||
|
|
||
|
%files test
|
||
|
%defattr(-,root,root)
|
||
|
%doc COPYING README.md
|
||
|
%{_bindir}/test_bitcoin
|
||
|
%{_bindir}/test_bitcoin-qt
|
||
|
|
||
|
%changelog
|