2 %global selinux_variants mls strict targeted
6 %define buildargs
--with
-gui
=no
10 %define buildargs
--with
-qrencode
--with
-gui
=qt4
12 %define buildargs
--with
-qrencode
--with
-gui
=qt5
19 Summary: Peer to Peer Cryptographic Currency
21 Group: Applications
/System
23 URL: https
://bitcoin.org
/
24 Source0: https
://bitcoin.org
/bin
/bitcoin
-core
-%{version}/bitcoin-%{version}.tar.gz
25 Source1: http
://download.oracle.com
/berkeley
-db
/db
-%{bdbv}.NC.tar.gz
27 Source10: https
://raw.githubusercontent.com
/bitcoin
/bitcoin
/v
%{version}/contrib
/debian
/examples
/bitcoin.conf
30 Source20: https
://raw.githubusercontent.com
/bitcoin
/bitcoin
/v
%{version}/doc
/man
/bitcoind
.1
31 Source21: https
://raw.githubusercontent.com
/bitcoin
/bitcoin
/v
%{version}/doc
/man
/bitcoin
-cli
.1
32 Source22: https
://raw.githubusercontent.com
/bitcoin
/bitcoin
/v
%{version}/doc
/man
/bitcoin
-qt
.1
35 Source30: https
://raw.githubusercontent.com
/bitcoin
/bitcoin
/v
%{version}/contrib
/rpm
/bitcoin.te
36 # Source31 - what about bitcoin-tx and bench_bitcoin ???
37 Source31
: https
://raw.githubusercontent.com
/bitcoin
/bitcoin
/v
%{version}/contrib
/rpm
/bitcoin.
fc
38 Source32
: https
://raw.githubusercontent.com
/bitcoin
/bitcoin
/v
%{version}/contrib
/rpm
/bitcoin.
if
40 Source100
: https
://upload.wikimedia.org
/wikipedia
/commons
/4/46/Bitcoin.svg
42 %if 0%{?_use_libressl:1}
43 BuildRequires
: libressl
-devel
45 BuildRequires
: openssl
-devel
47 BuildRequires
: boost
-devel
48 BuildRequires
: miniupnpc
-devel
49 BuildRequires
: autoconf automake libtool
50 BuildRequires
: libevent
-devel
53 Patch0: bitcoin
-0.12.0-libressl.patch
57 Bitcoin is a digital cryptographic currency that uses peer
-to
-peer technology to
58 operate with no central authority or banks
; managing transactions and the
59 issuing of bitcoins is carried out collectively by the network.
63 Summary: Peer to Peer Cryptographic Currency
64 Group: Applications
/System
65 Obsoletes
: %{name} < %{version}-%{release}
66 Provides: %{name} = %{version}-%{release}
68 BuildRequires
: qt
-devel
70 BuildRequires
: qt5
-qtbase
-devel
71 # for /usr/bin/lrelease-qt5
72 BuildRequires
: qt5
-linguist
74 BuildRequires
: protobuf
-devel
75 BuildRequires
: qrencode
-devel
76 BuildRequires
: %{_bindir}/desktop
-file
-validate
77 # for icon generation from SVG
78 BuildRequires
: %{_bindir}/inkscape
79 BuildRequires
: %{_bindir}/convert
82 Bitcoin is a digital cryptographic currency that uses peer
-to
-peer technology to
83 operate with no central authority or banks
; managing transactions and the
84 issuing of bitcoins is carried out collectively by the network.
86 This package contains the Qt based graphical client and node. If you are looking
87 to run a Bitcoin wallet
, this is probably the package you want.
92 Summary: Bitcoin shared libraries
93 Group: System Environment
/Libraries
96 This package provides the bitcoinconsensus shared libraries. These libraries
97 may be used by third party software to provide consensus verification
100 Unless you know need this package
, you probably
do not.
103 Summary: Development files
for bitcoin
104 Group: Development
/Libraries
105 Requires: %{name}-libs = %{version}-%{release}
108 This package contains the header files and static library
for the
109 bitcoinconsensus shared library. If you are developing or compiling software
110 that wants to link against that library
, then you need this package installed.
112 Most people
do not need this package installed.
115 Summary: The bitcoin daemon
116 Group: System Environment
/Daemons
117 Requires: bitcoin
-utils
= %{version}-%{release}
118 Requires: selinux
-policy policycoreutils
-python
119 Requires(pre
): shadow
-utils
120 Requires(post
): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
121 Requires(postun
): %{_sbindir}/semodule %{_sbindir}/restorecon %{_sbindir}/fixfiles %{_sbindir}/sestatus
122 BuildRequires
: systemd
123 BuildRequires
: checkpolicy
124 BuildRequires
: %{_datadir}/selinux
/devel
/Makefile
127 This package provides a stand
-alone bitcoin
-core daemon. For most users
, this
128 package is only needed
if they need a full
-node without the graphical client.
130 Some third party wallet software will want this package to provide the actual
131 bitcoin
-core node they use to connect to the network.
133 If you use the graphical bitcoin
-core client
then you almost certainly
do not
137 Summary: Bitcoin utilities
138 Group: Applications
/System
141 This package provides several
command line utilities
for interacting with a
144 The bitcoin
-cli utility allows you to communicate and control a bitcoin daemon
145 over RPC
, the bitcoin
-tx utility allows you to create a custom transaction
, and
146 the bench_bitcoin utility can be used to perform some benchmarks.
148 This package contains utilities needed by the bitcoin
-server package.
153 %patch0 -p1
-b .libressl
154 cp
-p
%{SOURCE10} .
/bitcoin.conf.example
156 cp
-p db
-%{bdbv}.NC/LICENSE ./db-%{bdbv}.NC
-LICENSE
158 cp
-p
%{SOURCE30} %{SOURCE31} %{SOURCE32} SELinux
/
163 cd db
-%{bdbv}.NC
/build_unix
/
164 ..
/dist
/configure
--enable-cxx
--disable
-shared
--with
-pic
--prefix
=$
{CWD
}/db4
169 %configure LDFLAGS
="
-L$
{CWD
}/db4
/lib
/" CPPFLAGS
="
-I$
{CWD
}/db4
/include
/"
--with
-miniupnpc
--enable-glibc
-back
-compat
%{buildargs}
173 for selinuxvariant
in %{selinux_variants}; do
174 make NAME
=$
{selinuxvariant
} -f
%{_datadir}/selinux
/devel
/Makefile
175 mv bitcoin.pp bitcoin.pp.$
{selinuxvariant
}
176 make NAME
=$
{selinuxvariant
} -f
%{_datadir}/selinux
/devel
/Makefile clean
182 make install DESTDIR
=%{buildroot}
184 mkdir -p
-m755
%{buildroot}%{_sbindir}
185 mv
%{buildroot}%{_bindir}/bitcoind %{buildroot}%{_sbindir}/bitcoind
188 mkdir -p
%{buildroot}%{_tmpfilesdir}
189 cat
<<EOF
> %{buildroot}%{_tmpfilesdir}/bitcoin.conf
190 d
/run
/bitcoind
0750 bitcoin bitcoin
-
192 touch
-a
-m
-t
201504280000 %{buildroot}%{_tmpfilesdir}/bitcoin.conf
194 mkdir -p
%{buildroot}%{_sysconfdir}/sysconfig
195 cat
<<EOF
> %{buildroot}%{_sysconfdir}/sysconfig
/bitcoin
196 # Provide options to the bitcoin daemon here, for example
197 # OPTIONS="-testnet -disable-wallet"
201 # System service defaults.
202 # Don't change these unless you know what you're doing.
203 CONFIG_FILE
="
%{_sysconfdir}/bitcoin
/bitcoin.conf"
204 DATA_DIR
="
%{_localstatedir}/lib
/bitcoin"
205 PID_FILE
="
/run
/bitcoind
/bitcoind.pid"
207 touch
-a
-m
-t
201504280000 %{buildroot}%{_sysconfdir}/sysconfig
/bitcoin
209 mkdir -p
%{buildroot}%{_unitdir}
210 cat
<<EOF
> %{buildroot}%{_unitdir}/bitcoin.service
212 Description
=Bitcoin daemon
213 After
=syslog.target network.target
217 ExecStart
=%{_sbindir}/bitcoind -daemon -conf=\${CONFIG_FILE} -datadir=\${DATA_DIR} -pid=\${PID_FILE} \$OPTIONS
218 EnvironmentFile
=%{_sysconfdir}/sysconfig
/bitcoin
226 StartLimitInterval
=240
230 WantedBy
=multi
-user.target
232 touch
-a
-m
-t
201504280000 %{buildroot}%{_unitdir}/bitcoin.service
235 mkdir %{buildroot}%{_sysconfdir}/bitcoin
236 mkdir -p
%{buildroot}%{_localstatedir}/lib
/bitcoin
239 for selinuxvariant
in %{selinux_variants}; do
240 install -d
%{buildroot}%{_datadir}/selinux/${selinuxvariant}
241 install -p
-m
644 SELinux
/bitcoin.pp.$
{selinuxvariant
} %{buildroot}%{_datadir}/selinux/${selinuxvariant}/bitcoin.pp
246 install -D
-p share
/pixmaps
/bitcoin.ico
%{buildroot}%{_datadir}/pixmaps
/bitcoin.ico
247 install -p share
/pixmaps
/nsis
-header.bmp
%{buildroot}%{_datadir}/pixmaps
/
248 install -p share
/pixmaps
/nsis
-wizard.bmp
%{buildroot}%{_datadir}/pixmaps
/
249 install -p
%{SOURCE100} %{buildroot}%{_datadir}/pixmaps
/bitcoin.svg
250 %{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps
/bitcoin16.png
-w16
-h16
251 %{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps
/bitcoin32.png
-w32
-h32
252 %{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps
/bitcoin64.png
-w64
-h64
253 %{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps
/bitcoin128.png
-w128
-h128
254 %{_bindir}/inkscape %{SOURCE100} --export-png=%{buildroot}%{_datadir}/pixmaps
/bitcoin256.png
-w256
-h256
255 %{_bindir}/convert -resize 16x16 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps
/bitcoin16.xpm
256 %{_bindir}/convert -resize 32x32 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps
/bitcoin32.xpm
257 %{_bindir}/convert -resize 64x64 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps
/bitcoin64.xpm
258 %{_bindir}/convert -resize 128x128 %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps
/bitcoin128.xpm
259 %{_bindir}/convert %{buildroot}%{_datadir}/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps
/bitcoin256.xpm
260 touch
%{buildroot}%{_datadir}/pixmaps/*.png -r %{SOURCE100}
261 touch
%{buildroot}%{_datadir}/pixmaps/*.xpm -r %{SOURCE100}
263 # Desktop File - change the touch timestamp if modifying
264 mkdir -p
%{buildroot}%{_datadir}/applications
265 cat
<<EOF
> %{buildroot}%{_datadir}/applications
/bitcoin
-core.desktop
269 Comment
=Bitcoin P2P Cryptocurrency
270 Comment
[fr
]=Bitcoin
, monnaie virtuelle cryptographique pair à pair
271 Comment
[tr
]=Bitcoin
, eşten eşe kriptografik sanal para birimi
276 MimeType
=x
-scheme
-handler
/bitcoin
;
277 Categories
=Office
;Finance
;
279 # change touch date when modifying desktop
280 touch
-a
-m
-t
201511100546 %{buildroot}%{_datadir}/applications
/bitcoin
-core.desktop
281 %{_bindir}/desktop-file-validate %{buildroot}%{_datadir}/applications
/bitcoin
-core.desktop
283 # KDE protocol - change the touch timestamp if modifying
284 mkdir -p
%{buildroot}%{_datadir}/kde4
/services
285 cat
<<EOF
> %{buildroot}%{_datadir}/kde4
/services
/bitcoin
-core.protocol
298 # change touch date when modifying protocol
299 touch
-a
-m
-t
201511100546 %{buildroot}%{_datadir}/kde4
/services
/bitcoin
-core.protocol
303 install -D
-p
%{SOURCE20} %{buildroot}%{_mandir}/man1
/bitcoind
.1
304 install -p
%{SOURCE21} %{buildroot}%{_mandir}/man1
/bitcoin
-cli
.1
306 install -p
%{SOURCE22} %{buildroot}%{_mandir}/man1
/bitcoin
-qt
.1
309 # nuke these, we do extensive testing of binaries in %%check before packaging
310 rm -f
%{buildroot}%{_bindir}/test_
*
314 srcdir
=src
test/bitcoin
-util
-test.py
315 test/functional
/test_runner.py
--extended
317 %post libs
-p
/sbin
/ldconfig
319 %postun libs
-p
/sbin
/ldconfig
322 getent group bitcoin
>/dev
/null || groupadd
-r bitcoin
323 getent passwd bitcoin
>/dev
/null ||
324 useradd
-r
-g bitcoin
-d
/var
/lib
/bitcoin
-s
/sbin
/nologin \
325 -c "Bitcoin wallet server" bitcoin
329 %systemd_post bitcoin.service
331 if [ `
%{_sbindir}/sestatus |grep
-c "disabled"`
-eq
0 ]; then
332 for selinuxvariant
in %{selinux_variants}; do
333 %{_sbindir}/semodule -s ${selinuxvariant} -i %{_datadir}/selinux/${selinuxvariant}/bitcoin.pp
&> /dev
/null ||
:
335 %{_sbindir}/semanage port
-a
-t bitcoin_port_t
-p tcp
8332
336 %{_sbindir}/semanage port
-a
-t bitcoin_port_t
-p tcp
8333
337 %{_sbindir}/semanage port
-a
-t bitcoin_port_t
-p tcp
18332
338 %{_sbindir}/semanage port
-a
-t bitcoin_port_t
-p tcp
18333
339 %{_sbindir}/fixfiles
-R bitcoin
-server restore
&> /dev
/null ||
:
340 %{_sbindir}/restorecon -R %{_localstatedir}/lib
/bitcoin ||
:
344 %{_bindir}/systemd
-tmpfiles
--create
347 %systemd_preun bitcoin.service
350 %systemd_postun bitcoin.service
352 if [ $
1 -eq
0 ]; then
353 if [ `
%{_sbindir}/sestatus |grep
-c "disabled"`
-eq
0 ]; then
354 %{_sbindir}/semanage port
-d
-p tcp
8332
355 %{_sbindir}/semanage port
-d
-p tcp
8333
356 %{_sbindir}/semanage port
-d
-p tcp
18332
357 %{_sbindir}/semanage port
-d
-p tcp
18333
358 for selinuxvariant
in %{selinux_variants}; do
359 %{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin
&> /dev
/null ||
:
361 %{_sbindir}/fixfiles
-R bitcoin
-server restore
&> /dev
/null ||
:
362 [ -d
%{_localstatedir}/lib
/bitcoin
] && \
363 %{_sbindir}/restorecon -R %{_localstatedir}/lib
/bitcoin
&> /dev
/null ||
:
372 %defattr(-,root
,root
,-)
373 %license COPYING db
-%{bdbv}.NC
-LICENSE
374 %doc COPYING bitcoin.conf.example doc
/README.md doc
/bips.md doc
/files.md doc
/multiwallet
-qt.md doc
/reduce
-traffic.md doc
/release
-notes.md doc
/tor.md
375 %attr(0755,root
,root
) %{_bindir}/bitcoin
-qt
376 %attr(0644,root
,root
) %{_datadir}/applications
/bitcoin
-core.desktop
377 %attr(0644,root
,root
) %{_datadir}/kde4
/services
/bitcoin
-core.protocol
378 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.ico
379 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.bmp
380 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.svg
381 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.png
382 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.xpm
383 %attr(0644,root
,root
) %{_mandir}/man1
/bitcoin
-qt
.1*
387 %defattr(-,root
,root
,-)
389 %doc COPYING doc
/README.md doc
/shared
-libraries.md
393 %defattr(-,root
,root
,-)
395 %doc COPYING doc
/README.md doc
/developer
-notes.md doc
/shared
-libraries.md
396 %attr(0644,root
,root
) %{_includedir}/*.h
400 %attr(0644,root
,root
) %{_libdir}/pkgconfig
/*.pc
403 %defattr(-,root
,root
,-)
404 %license COPYING db
-%{bdbv}.NC
-LICENSE
405 %doc COPYING bitcoin.conf.example doc
/README.md doc
/REST
-interface.md doc
/bips.md doc
/dnsseed
-policy.md doc
/files.md doc
/reduce
-traffic.md doc
/release
-notes.md doc
/tor.md
406 %attr(0755,root
,root
) %{_sbindir}/bitcoind
407 %attr(0644,root
,root
) %{_tmpfilesdir}/bitcoin.conf
408 %attr(0644,root
,root
) %{_unitdir}/bitcoin.service
409 %dir %attr(0750,bitcoin
,bitcoin
) %{_sysconfdir}/bitcoin
410 %dir %attr(0750,bitcoin
,bitcoin
) %{_localstatedir}/lib
/bitcoin
411 %config(noreplace
) %attr(0600,root
,root
) %{_sysconfdir}/sysconfig
/bitcoin
412 %attr(0644,root
,root
) %{_datadir}/selinux
/*/*.pp
413 %attr(0644,root
,root
) %{_mandir}/man1
/bitcoind
.1*
416 %defattr(-,root
,root
,-)
418 %doc COPYING bitcoin.conf.example doc
/README.md
419 %attr(0755,root
,root
) %{_bindir}/bitcoin
-cli
420 %attr(0755,root
,root
) %{_bindir}/bitcoin
-tx
421 %attr(0755,root
,root
) %{_bindir}/bench_bitcoin
422 %attr(0644,root
,root
) %{_mandir}/man1
/bitcoin
-cli
.1*
427 * Fri Feb
26 2016 Alice Wonder
<buildmaster@librelamp.com
> - 0.12.0-2
428 - Rename Qt package from bitcoin to bitcoin
-core
429 - Make building of the Qt package optional
430 - When building the Qt package
, default to Qt5 but allow building
432 - Only run SELinux stuff
in post scripts
if it is not
set to disabled
434 * Wed Feb
24 2016 Alice Wonder
<buildmaster@librelamp.com
> - 0.12.0-1
435 - Initial spec file
for 0.12.0 release
437 # This spec file is written from scratch but a lot of the packaging decisions are directly
438 # based upon the 0.11.2 package spec file from https://www.ringingliberty.com/bitcoin/