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}/semanage port
-a
-t bitcoin_port_t
-p tcp
18443
340 %{_sbindir}/semanage port
-a
-t bitcoin_port_t
-p tcp
18444
341 %{_sbindir}/fixfiles
-R bitcoin
-server restore
&> /dev
/null ||
:
342 %{_sbindir}/restorecon -R %{_localstatedir}/lib
/bitcoin ||
:
346 %{_bindir}/systemd
-tmpfiles
--create
349 %systemd_preun bitcoin.service
352 %systemd_postun bitcoin.service
354 if [ $
1 -eq
0 ]; then
355 if [ `
%{_sbindir}/sestatus |grep
-c "disabled"`
-eq
0 ]; then
356 %{_sbindir}/semanage port
-d
-p tcp
8332
357 %{_sbindir}/semanage port
-d
-p tcp
8333
358 %{_sbindir}/semanage port
-d
-p tcp
18332
359 %{_sbindir}/semanage port
-d
-p tcp
18333
360 %{_sbindir}/semanage port
-d
-p tcp
18443
361 %{_sbindir}/semanage port
-d
-p tcp
18444
362 for selinuxvariant
in %{selinux_variants}; do
363 %{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin
&> /dev
/null ||
:
365 %{_sbindir}/fixfiles
-R bitcoin
-server restore
&> /dev
/null ||
:
366 [ -d
%{_localstatedir}/lib
/bitcoin
] && \
367 %{_sbindir}/restorecon -R %{_localstatedir}/lib
/bitcoin
&> /dev
/null ||
:
376 %defattr(-,root
,root
,-)
377 %license COPYING db
-%{bdbv}.NC
-LICENSE
378 %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
379 %attr(0755,root
,root
) %{_bindir}/bitcoin
-qt
380 %attr(0644,root
,root
) %{_datadir}/applications
/bitcoin
-core.desktop
381 %attr(0644,root
,root
) %{_datadir}/kde4
/services
/bitcoin
-core.protocol
382 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.ico
383 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.bmp
384 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.svg
385 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.png
386 %attr(0644,root
,root
) %{_datadir}/pixmaps
/*.xpm
387 %attr(0644,root
,root
) %{_mandir}/man1
/bitcoin
-qt
.1*
391 %defattr(-,root
,root
,-)
393 %doc COPYING doc
/README.md doc
/shared
-libraries.md
397 %defattr(-,root
,root
,-)
399 %doc COPYING doc
/README.md doc
/developer
-notes.md doc
/shared
-libraries.md
400 %attr(0644,root
,root
) %{_includedir}/*.h
404 %attr(0644,root
,root
) %{_libdir}/pkgconfig
/*.pc
407 %defattr(-,root
,root
,-)
408 %license COPYING db
-%{bdbv}.NC
-LICENSE
409 %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
410 %attr(0755,root
,root
) %{_sbindir}/bitcoind
411 %attr(0644,root
,root
) %{_tmpfilesdir}/bitcoin.conf
412 %attr(0644,root
,root
) %{_unitdir}/bitcoin.service
413 %dir %attr(0750,bitcoin
,bitcoin
) %{_sysconfdir}/bitcoin
414 %dir %attr(0750,bitcoin
,bitcoin
) %{_localstatedir}/lib
/bitcoin
415 %config(noreplace
) %attr(0600,root
,root
) %{_sysconfdir}/sysconfig
/bitcoin
416 %attr(0644,root
,root
) %{_datadir}/selinux
/*/*.pp
417 %attr(0644,root
,root
) %{_mandir}/man1
/bitcoind
.1*
420 %defattr(-,root
,root
,-)
422 %doc COPYING bitcoin.conf.example doc
/README.md
423 %attr(0755,root
,root
) %{_bindir}/bitcoin
-cli
424 %attr(0755,root
,root
) %{_bindir}/bitcoin
-tx
425 %attr(0755,root
,root
) %{_bindir}/bench_bitcoin
426 %attr(0644,root
,root
) %{_mandir}/man1
/bitcoin
-cli
.1*
431 * Fri Feb
26 2016 Alice Wonder
<buildmaster@librelamp.com
> - 0.12.0-2
432 - Rename Qt package from bitcoin to bitcoin
-core
433 - Make building of the Qt package optional
434 - When building the Qt package
, default to Qt5 but allow building
436 - Only run SELinux stuff
in post scripts
if it is not
set to disabled
438 * Wed Feb
24 2016 Alice Wonder
<buildmaster@librelamp.com
> - 0.12.0-1
439 - Initial spec file
for 0.12.0 release
441 # This spec file is written from scratch but a lot of the packaging decisions are directly
442 # based upon the 0.11.2 package spec file from https://www.ringingliberty.com/bitcoin/