-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbitcoin.spec
323 lines (248 loc) · 9.84 KB
/
bitcoin.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
%if 0%{?_no_wallet}
%define walletargs --disable-wallet
%define _buildqt 0
%define guiargs --with-gui=no
%else
%if 0%{?_no_gui}
%define _buildqt 0
%define guiargs --with-gui=no
%else
%define _buildqt 1
%define guiargs --with-qrencode --with-gui=qt5
%endif
%endif
%global _python_bytecompile_extra 0
Name: bitcoin
Version: 0.20.1
Release: 1%{?dist}
Summary: Peer to Peer Cryptographic Currency
Group: Applications/System
License: MIT
URL: https://bitcoincore.org/
Source0: https://bitcoincore.org/bin/%{name}-core-%{version}/%{name}-%{version}.tar.gz
Source10: bitcoin.conf
Source11: bitcoind.service
Source12: bitcoin-qt.desktop
Source13: bitcoin-qt-testnet.desktop
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: gettext
BuildRequires: libtool
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libevent-devel
BuildRequires: boost-devel
BuildRequires: miniupnpc-devel
%description
Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
operate with no central authority or banks; managing transactions and the
issuing of bitcoins is carried out collectively by the network.
%if %{_buildqt}
%package qt
Summary: Peer to Peer Cryptographic Currency
Group: Applications/System
Obsoletes: %{name} < %{version}-%{release}
Provides: %{name} = %{version}-%{release}
BuildRequires: libdb4-devel
BuildRequires: libdb4-cxx-devel
BuildRequires: qt5-qttools-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: protobuf-devel
BuildRequires: qrencode-devel
BuildRequires: desktop-file-utils
%description qt
Bitcoin is a digital cryptographic currency that uses peer-to-peer technology to
operate with no central authority or banks; managing transactions and the
issuing of bitcoins is carried out collectively by the network.
This package contains the Qt based graphical client and node. If you are looking
to run a Bitcoin wallet, this is probably the package you want.
%package qt-testnet
Summary: Peer to Peer Cryptographic Currency
Group: Applications/System
Requires: %{name}-qt = %{version}-%{release}
%description qt-testnet
This package provides a .desktop file that launches the Bitcoin Qt client in
testnet mode.
%endif
%package libs
Summary: Bitcoin shared libraries
Group: System Environment/Libraries
%description libs
This package provides the bitcoinconsensus shared libraries. These libraries
may be used by third party software to provide consensus verification
functionality.
Unless you know need this package, you probably do not.
%package devel
Summary: Development files for bitcoin
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
%description devel
This package contains the header files and static library for the
bitcoinconsensus shared library. If you are developing or compiling software
that wants to link against that library, then you need this package installed.
Most people do not need this package installed.
%package -n bitcoin-cli
Summary: CLI utils for bitcoin
Group: Applications/System
%description -n bitcoin-cli
This package installs command line programs like bitcoin-cli and bitcoin-tx that
can be used to interact with the bitcoin daemon.
%package -n bitcoind
Summary: The bitcoin daemon
Group: System Environment/Daemons
BuildRequires: systemd
Requires: bitcoin-cli = %{version}-%{release}
%description -n bitcoind
This package provides a stand-alone bitcoin daemon. For most users, this package
is only needed if they need a full-node without the graphical client.
Some third party wallet software will want this package to provide the actual
bitcoin node they use to connect to the network.
If you use the graphical bitcoin client then you almost certainly do not
need this package.
%prep
%autosetup -n %{name}-%{version}
%build
./autogen.sh
%configure --disable-bench %{?walletargs} %{?guiargs}
%make_build
%check
LC_ALL=C.UTF-8 make check
%install
make install DESTDIR=%{buildroot}
# no need to generate debuginfo data for the test executables
rm -f %{buildroot}%{_bindir}/test_bitcoin*
%if %{_buildqt}
# qt icons
install -D -p share/pixmaps/bitcoin.ico %{buildroot}%{_datadir}/pixmaps/bitcoin.ico
mkdir -p %{buildroot}%{_datadir}/bitcoin
install -p share/rpcauth/rpcauth.py %{buildroot}/%{_datadir}/bitcoin/rpcauth.py
mkdir -p %{buildroot}%{_sharedstatedir}/bitcoin
mkdir -p %{buildroot}%{_sysconfdir}
install -p %{SOURCE10} %{buildroot}%{_sysconfdir}/bitcoin.conf
mkdir -p %{buildroot}%{_unitdir}
install -p %{SOURCE11} %{buildroot}%{_unitdir}/bitcoind.service
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install %{SOURCE12} %{buildroot}%{_datadir}/applications/bitcoin-qt.desktop
desktop-file-install %{SOURCE13} %{buildroot}%{_datadir}/applications/bitcoin-qt-testnet.desktop
%endif
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%pre -n bitcoind
getent group bitcoin >/dev/null || groupadd -r bitcoin
getent passwd bitcoin >/dev/null ||\
useradd -r -g bitcoin -d %{_sharedstatedir}/bitcoin -s /sbin/nologin \
-c "Bitcoin wallet server" bitcoin
%post -n bitcoind
%systemd_post bitcoind.service
%posttrans -n bitcoind
%{_bindir}/systemd-tmpfiles --create
%preun -n bitcoind
%systemd_preun bitcoind.service
%postun -n bitcoind
%systemd_postun_with_restart bitcoind.service
%clean
rm -rf %{buildroot}
%if %{_buildqt}
%files qt
%defattr(-,root,root,-)
%license COPYING
%doc COPYING doc/README.md doc/bips.md doc/files.md doc/reduce-traffic.md doc/release-notes.md doc/tor.md
%attr(0755,root,root) %{_bindir}/bitcoin-qt
%attr(0644,root,root) %{_datadir}/applications/bitcoin-qt.desktop
%attr(0644,root,root) %{_datadir}/pixmaps/*.ico
%attr(0644,root,root) %{_mandir}/man1/bitcoin-qt.1*
%files qt-testnet
%attr(0644,root,root) %{_datadir}/applications/bitcoin-qt-testnet.desktop
%endif
%files libs
%defattr(-,root,root,-)
%license COPYING
%doc COPYING doc/README.md doc/shared-libraries.md
%{_libdir}/lib*.so.*
%files devel
%defattr(-,root,root,-)
%license COPYING
%doc COPYING doc/README.md doc/developer-notes.md doc/shared-libraries.md
%attr(0644,root,root) %{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/*.la
%attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
%files -n bitcoin-cli
%defattr(-,root,root,-)
%license COPYING
%attr(0644,root,root) %{_mandir}/man1/bitcoin-cli.1*
%attr(0644,root,root) %{_mandir}/man1/bitcoin-tx.1*
%attr(0755,root,root) %{_bindir}/bitcoin-cli
%attr(0755,root,root) %{_bindir}/bitcoin-tx
%attr(0755,root,root) %{_bindir}/bitcoin-wallet
%attr(0644,root,root) %{_mandir}/man1/bitcoin-wallet.1*
%files -n bitcoind
%defattr(-,root,root,-)
%license COPYING
%doc COPYING 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
%attr(0644,root,root) %{_mandir}/man1/bitcoind.1*
%attr(0644,root,root) %{_unitdir}/bitcoind.service
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/bitcoin.conf
%attr(0700,bitcoin,bitcoin) %{_sharedstatedir}/bitcoin
%attr(0755,root,root) %{_bindir}/bitcoind
%attr(0644,root,root) %{_datadir}/bitcoin/rpcauth.py
%changelog
* Fri Sep 18 2020 Evan Klitzke <[email protected]> - 0.20.1-1
- Update for Bitcoin 0.20.1
* Thu Jul 09 2020 Evan Klitzke <[email protected]> - 0.20.0-1
- Update for Bitcoin 0.20.0
* Thu Mar 12 2020 Evan Klitzke <[email protected]> - 0.19.1-1
- Update for Bitcoin 0.19.1
* Thu Aug 15 2019 Evan Klitzke <[email protected]> - 0.18.1-1
- new version
* Sun Jul 14 2019 Evan Klitzke <[email protected]> - 0.18.0-1
- Update for Bitcoin 0.18.0
* Sat Mar 16 2019 Evan Klitzke <[email protected]> - 0.17.1-1
- Update for Bitcoin 0.17.1
* Tue Oct 23 2018 Evan Klitzke <[email protected]> - 0.17.0-1
- Update for Bitcoin 0.17.0
* Mon Feb 26 2018 Evan Klitzke <[email protected]> - 0.16.0-3
- split out bitcoin-cli package
* Fri Feb 23 2018 Evan Klitzke <[email protected]> - 0.16.0-2
- Add BuildRequires: systemd for F28/Rawhide
* Fri Feb 23 2018 Evan Klitzke <[email protected]> - 0.16.0-1
- Bump for official 0.16.0 release
* Fri Feb 16 2018 Evan Klitzke <[email protected]> - 0.16.0rc4-1
- rebuild for rc4
* Sat Feb 10 2018 Evan Klitzke <[email protected]> - 0.16.0rc3-2
- Fix for GitHub tarballs (not created with "make dist")
* Sat Feb 10 2018 Evan Klitzke <[email protected]> - 0.16.0rc3-1
- rebuilt for rc3
* Mon Feb 05 2018 Evan Klitzke <[email protected]> - 0.16.0rc2-2
- rebuilt
* Wed Jan 31 2018 Evan Klitzke <[email protected]> - 0.16.0rc1-1
- rebuilt for 0.16
* Wed Dec 13 2017 Evan Klitzke <[email protected]> - 0.15.1-13
- Configure systemd to use bitcoin-cli stop to shutdown bitcoind
* Wed Nov 29 2017 Evan Klitzke <[email protected]>
- Add .desktop file for bitcoin-qt testnet
* Mon Nov 20 2017 Evan Klitzke <[email protected]> - 0.15.1-11
- Mark /etc/bitcoin.conf as a (noreplace) config file
* Sun Nov 19 2017 Evan Klitzke <[email protected]> - 0.15.1-10
- Just use /etc/bitcoin.conf, a whole new dir seems unnecessary
* Sun Nov 19 2017 Evan Klitzke <[email protected]> - 0.15.1-9
- Remove bitcoin-cli package (move those to bitcoind)
- Set up a real system service for bitcoind
* Wed Nov 15 2017 Evan Klitzke <[email protected]> - 0.15.1-8
- Remove bench_bitcoin from the bitcoin-cli package.
* Wed Nov 15 2017 Evan Klitzke <[email protected]> - 0.15.1-7
- bitcoin-daemon -> bitcoind, bitcoin-utils -> bitcoin-cli
* Wed Nov 15 2017 Evan Klitzke <[email protected]> - 0.15.1-6
- Fix the desktop file.
* Wed Nov 15 2017 Evan Klitzke <[email protected]> - 0.15.1-5
- Don't depend on SELinux stuff, rename the .desktop file
* Wed Nov 15 2017 Evan Klitzke <[email protected]> - 0.15.1-4
- Split into subpackages.
* Wed Nov 15 2017 Evan Klitzke <[email protected]> - 0.15.1-3
- Fix test_bitcoin logic, allow building without wallet.
* Wed Nov 15 2017 Evan Klitzke <[email protected]> - 0.15.1-2
- Remove test_bitcoin executable from bindir.
* Tue Nov 14 2017 Evan Klitzke <[email protected]> - 0.15.1-1
- Initial build.