2014-11-15 11:41:14 +01:00
|
|
|
|
#
|
|
|
|
|
# spec file for package bitcoin
|
|
|
|
|
#
|
2015-08-10 09:16:00 +02:00
|
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
# 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/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
# typical altcoin changes: name, name_pretty, consensus 0, is_base 0
|
|
|
|
|
%define base bitcoin
|
|
|
|
|
%define base_pretty Bitcoin
|
|
|
|
|
%define name_pretty %{base_pretty}
|
|
|
|
|
%define consensus 1
|
|
|
|
|
%define is_base 1
|
|
|
|
|
|
2014-11-15 11:41:14 +01:00
|
|
|
|
Name: bitcoin
|
2015-12-13 09:39:49 +01:00
|
|
|
|
Version: 0.11.2
|
2014-11-15 11:41:14 +01:00
|
|
|
|
Release: 0
|
|
|
|
|
Summary: P2P Digital Currency
|
|
|
|
|
License: MIT
|
|
|
|
|
Group: Productivity/Networking/Other
|
2015-11-12 19:41:48 +01:00
|
|
|
|
Url: http://%{name}.org/
|
|
|
|
|
Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz
|
|
|
|
|
Source1: %{base}d.service
|
|
|
|
|
Source2: %{base}d.firewall
|
|
|
|
|
Source3: %{base}d.conf
|
|
|
|
|
Patch1: %{base}_missing_ppc64le_in_ax_boost_base.m4.patch
|
2014-11-15 11:41:14 +01:00
|
|
|
|
BuildRequires: autoconf
|
|
|
|
|
BuildRequires: automake
|
|
|
|
|
BuildRequires: boost-devel
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: git
|
2015-02-18 11:39:08 +01:00
|
|
|
|
BuildRequires: lcov
|
2014-11-15 11:41:14 +01:00
|
|
|
|
BuildRequires: libdb-4_8-devel
|
|
|
|
|
BuildRequires: libminiupnpc-devel
|
|
|
|
|
BuildRequires: libqt5-qtbase-devel
|
|
|
|
|
BuildRequires: libqt5-qttools-devel
|
2015-02-18 11:39:08 +01:00
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
|
BuildRequires: python
|
|
|
|
|
BuildRequires: systemd-rpm-macros
|
2014-11-15 11:41:14 +01:00
|
|
|
|
BuildRequires: update-desktop-files
|
2015-02-18 11:39:08 +01:00
|
|
|
|
BuildRequires: yasm-devel
|
|
|
|
|
BuildRequires: pkgconfig(libqrencode)
|
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
|
|
|
|
BuildRequires: pkgconfig(protobuf)
|
2015-07-20 11:22:56 +02:00
|
|
|
|
Requires(post): update-desktop-files
|
2015-06-02 10:12:21 +02:00
|
|
|
|
Requires(postun): update-desktop-files
|
2014-11-15 11:41:14 +01:00
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
|
|
|
|
|
%description
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{name_pretty} 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.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
|
|
|
|
|
|
|
|
|
%package qt5
|
2015-11-12 19:41:48 +01:00
|
|
|
|
Summary: An end-user Qt5 GUI for the %{name_pretty} crypto-currency
|
2014-11-15 11:41:14 +01:00
|
|
|
|
Group: Development/Libraries/Other
|
2015-02-18 11:39:08 +01:00
|
|
|
|
Provides: %{name} = %{version}
|
|
|
|
|
Obsoletes: %{name} < %{version}
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
%description qt5
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{name_pretty} 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.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
This package provides %{name_pretty}-Qt, a GUI for %{name_pretty} based on Qt.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-02-18 11:39:08 +01:00
|
|
|
|
%package utils
|
2015-11-12 19:41:48 +01:00
|
|
|
|
Summary: An end-user cli for the %{name_pretty} crypto-currency
|
2015-02-18 11:39:08 +01:00
|
|
|
|
Group: Productivity/Networking/Other
|
|
|
|
|
Provides: %{name}-cli = %{version}
|
|
|
|
|
Obsoletes: %{name}-cli < %{version}
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-02-18 11:39:08 +01:00
|
|
|
|
%description utils
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{name_pretty} 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.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
This package provides %{name}-cli - CLI tool to interact with the daemon.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%if %{consensus} == 1
|
2015-02-18 11:39:08 +01:00
|
|
|
|
%package -n lib%{name}consensus0
|
2015-11-12 19:41:48 +01:00
|
|
|
|
Summary: %{name_pretty} consensus library
|
2015-02-18 11:39:08 +01:00
|
|
|
|
Group: System/Library
|
|
|
|
|
|
|
|
|
|
%description -n lib%{name}consensus0
|
2015-11-12 19:41:48 +01:00
|
|
|
|
The purpose of this library is to make the verification functionality that is critical to %{name_pretty}’s consensus available to other applications, e.g. to language bindings such as python-%{name}lib or alternative node implementations.
|
2015-02-18 11:39:08 +01:00
|
|
|
|
|
|
|
|
|
%package -n lib%{name}consensus-devel
|
2015-11-12 19:41:48 +01:00
|
|
|
|
Summary: Developmont files for %{name} consensus library
|
2015-02-18 11:39:08 +01:00
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
|
Requires: lib%{name}consensus0 = %{version}
|
|
|
|
|
|
|
|
|
|
%description -n lib%{name}consensus-devel
|
2015-11-12 19:41:48 +01:00
|
|
|
|
The purpose of this library is to make the verification functionality that is critical to %{name_pretty}’s consensus available to other applications, e.g. to language bindings such as python-%{name}lib or alternative node implementations.
|
2015-02-18 11:39:08 +01:00
|
|
|
|
|
|
|
|
|
This package contains development files.
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%endif
|
2015-02-18 11:39:08 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%package -n %{name}d
|
|
|
|
|
Summary: Headless daemon for %{name_pretty} crypto-currency
|
2014-11-15 11:41:14 +01:00
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%description -n %{name}d
|
|
|
|
|
%{name_pretty} 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.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
This package provides %{name}d, headless %{name} daemon.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
%package test
|
2015-11-12 19:41:48 +01:00
|
|
|
|
Summary: Automated tests for %{name} client
|
2014-11-15 11:41:14 +01:00
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
|
|
|
|
|
|
%description test
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{name_pretty} 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.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
Full transaction history is stored locally at each client. This requires several GB of space, slowly growing.
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
This package provides automated tests for %{name}-qt5 and %{name}d.
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
2015-08-10 09:16:00 +02:00
|
|
|
|
%patch1 -p1
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
# remove 128 resolution from Icon= line
|
|
|
|
|
sed -i s/128// contrib/debian/%{name}-qt.desktop
|
|
|
|
|
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%build
|
2015-07-20 11:22:56 +02:00
|
|
|
|
autoreconf -fiv
|
2015-06-02 10:12:21 +02:00
|
|
|
|
export CXXFLAGS="$CXXFLAGS %{optflags} -fPIC"
|
|
|
|
|
export CFLAGS="$CFLAGS %{optflags} -fPIC"
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%configure \
|
2015-11-16 18:51:20 +01:00
|
|
|
|
--with-cli=yes \
|
|
|
|
|
--with-daemon=yes \
|
|
|
|
|
--with-gui=qt5 \
|
|
|
|
|
--with-miniupnpc \
|
|
|
|
|
--with-qrencode \
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%if %{consensus} == 0
|
|
|
|
|
--without-libs \
|
|
|
|
|
%endif
|
2015-06-02 10:12:21 +02:00
|
|
|
|
--disable-hardening
|
2015-02-18 11:39:08 +01:00
|
|
|
|
|
2015-06-02 10:12:21 +02:00
|
|
|
|
make %{?_smp_mflags} V=1
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-02-18 11:39:08 +01:00
|
|
|
|
%check
|
|
|
|
|
make %{?_smp_mflags} check
|
|
|
|
|
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%install
|
2015-02-18 11:39:08 +01:00
|
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
install -D -m 0644 share/pixmaps/%{base}256.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
|
|
|
|
install -D -m 0644 contrib/debian/%{name}-qt.desktop %{buildroot}%{_datadir}/applications/%{name}-qt.desktop
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}-qt.desktop
|
2015-11-12 19:41:48 +01:00
|
|
|
|
|
|
|
|
|
install -D -m 0644 contrib/debian/manpages/%{name}d.1 %{buildroot}%{_mandir}/man1/%{name}d.1
|
|
|
|
|
install -D -m 0644 contrib/debian/manpages/%{name}-qt.1 %{buildroot}%{_mandir}/man1/%{name}-qt.1
|
|
|
|
|
install -D -m 0644 contrib/debian/manpages/%{name}.conf.5 %{buildroot}%{_mandir}/man5/%{name}.conf.5
|
|
|
|
|
install -D -m 0644 contrib/debian/examples/%{name}.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
|
|
|
|
|
|
|
|
|
%if !%{is_base}
|
|
|
|
|
sed -i "s/%{base}/%{name}/g" %{SOURCE1}
|
|
|
|
|
sed -i "s/%{base}/%{name}/g" %{SOURCE2}
|
|
|
|
|
sed -i "s/%{base}/%{name}/g" %{SOURCE3}
|
|
|
|
|
|
|
|
|
|
sed -i "s/%{base_pretty}/%{name_pretty}/g" %{SOURCE1}
|
|
|
|
|
sed -i "s/%{base_pretty}/%{name_pretty}/g" %{SOURCE2}
|
|
|
|
|
sed -i "s/%{base_pretty}/%{name_pretty}/g" %{SOURCE3}
|
|
|
|
|
%endif
|
|
|
|
|
|
2014-11-15 11:41:14 +01:00
|
|
|
|
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}
|
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
|
2015-11-12 19:41:48 +01:00
|
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}d
|
|
|
|
|
|
2014-11-15 11:41:14 +01:00
|
|
|
|
mkdir %{buildroot}%{_sbindir}
|
2015-11-12 19:41:48 +01:00
|
|
|
|
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}d
|
|
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}d.service
|
2014-11-15 11:41:14 +01:00
|
|
|
|
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}/
|
2015-11-12 19:41:48 +01:00
|
|
|
|
install -m 0644 %{SOURCE3} %{buildroot}/%{_tmpfilesdir}/%{name}d.conf
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%if %{consensus} == 1
|
2015-02-18 11:39:08 +01:00
|
|
|
|
# do not ship these
|
2015-11-16 18:51:20 +01:00
|
|
|
|
rm -f %{buildroot}%{_libdir}/lib%{name}consensus.a
|
|
|
|
|
rm -f %{buildroot}%{_libdir}/lib%{name}consensus.la
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%endif
|
2015-02-18 11:39:08 +01:00
|
|
|
|
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%post qt5
|
|
|
|
|
%desktop_database_post
|
|
|
|
|
|
|
|
|
|
%postun qt5
|
2015-06-02 10:12:21 +02:00
|
|
|
|
%desktop_database_postun
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-16 18:51:20 +01:00
|
|
|
|
%if %{consensus} == 1
|
|
|
|
|
%post -n lib%{name}consensus0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%postun -n lib%{name}consensus0 -p /sbin/ldconfig
|
|
|
|
|
%endif
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%pre -n %{name}d
|
2014-11-15 11:41:14 +01:00
|
|
|
|
getent group %{name} >/dev/null || groupadd -r %{name}
|
2015-11-12 19:41:48 +01:00
|
|
|
|
getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "%{name_pretty} daemon" %{name}
|
|
|
|
|
%service_add_pre %{name}d.service
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%post -n %{name}d
|
|
|
|
|
%service_add_post %{name}d.service
|
2015-06-02 10:12:21 +02:00
|
|
|
|
%if 0%{?suse_version} <= 1320
|
2015-11-12 19:41:48 +01:00
|
|
|
|
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}d.conf >/dev/null 2>&1 || :
|
2015-06-02 10:12:21 +02:00
|
|
|
|
%else
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}d.conf
|
2015-06-02 10:12:21 +02:00
|
|
|
|
%endif
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%preun -n %{name}d
|
|
|
|
|
%service_del_preun %{name}d.service
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%postun -n %{name}d
|
|
|
|
|
%service_del_postun %{name}d.service
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
%files qt5
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc COPYING README.md
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{_bindir}/%{name}-qt
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%{_datadir}/applications/%{name}-qt.desktop
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{_mandir}/man1/%{name}-qt.1%{?ext_man}
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
|
|
2015-02-18 11:39:08 +01:00
|
|
|
|
%files utils
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc COPYING README.md
|
|
|
|
|
%{_bindir}/%{name}-cli
|
|
|
|
|
%{_bindir}/%{name}-tx
|
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%if %{consensus} == 1
|
2015-02-18 11:39:08 +01:00
|
|
|
|
%files -n lib%{name}consensus0
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc COPYING README.md
|
|
|
|
|
%{_libdir}/lib%{name}consensus.so.*
|
|
|
|
|
|
|
|
|
|
%files -n lib%{name}consensus-devel
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc COPYING README.md
|
2015-02-18 11:39:08 +01:00
|
|
|
|
%{_libdir}/lib%{name}consensus.so
|
|
|
|
|
%{_includedir}/%{name}consensus.h
|
2015-07-20 11:22:56 +02:00
|
|
|
|
%{_libdir}/pkgconfig/lib%{name}consensus.pc
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%endif
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%files -n %{name}d
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc COPYING README.md
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{_mandir}/man1/%{name}d.1%{?ext_man}
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%{_mandir}/man5/%{name}.conf.5%{?ext_man}
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{_bindir}/%{name}d
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%dir %attr(700,%{name},%{name}) %{_var}/lib/%{name}
|
|
|
|
|
%dir %{_sysconfdir}/%{name}
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}d
|
2014-11-15 11:41:14 +01:00
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{_unitdir}/%{name}d.service
|
|
|
|
|
%{_sbindir}/rc%{name}d
|
|
|
|
|
%{_tmpfilesdir}/%{name}d.conf
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
%files test
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc COPYING README.md
|
2015-11-12 19:41:48 +01:00
|
|
|
|
%{_bindir}/test_%{name}
|
|
|
|
|
%{_bindir}/test_%{name}-qt
|
2014-11-15 11:41:14 +01:00
|
|
|
|
|
|
|
|
|
%changelog
|