File bitcoin.spec of Package bitcoin
Name: bitcoin
Version: 30.0
Release: 0
Summary: Bitcoin cryptocurrency client
License: MIT
Group: Productivity/Financial
URL: https://bitcoin.org
Source0: https://bitcoincore.org/bin/bitcoin-core-%{version}/bitcoin-%{version}-x86_64-linux-gnu.tar.gz
Source1: bitcoin256.png
# Минимальные зависимости для бинарного пакета
BuildRequires: desktop-file-utils
BuildRequires: hicolor-icon-theme
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Bitcoin is a peer-to-peer Internet currency that enables instant, near-zero cost payments to anyone in the world.
Bitcoin is an open source, global payment network that is fully decentralized without any central authorities.
Mathematics secures the network and empowers individuals to control their own finances.
%package utils
Summary: Command-line utilities for Bitcoin
Group: Productivity/Financial
%description utils
Command-line utilities for Bitcoin cryptocurrency including bitcoin-cli and bitcoin-tx.
%package qt
Summary: Qt GUI for Bitcoin
Group: Productivity/Financial
%description qt
Qt-based graphical user interface for Bitcoin cryptocurrency.
%package -n bitcoind
Summary: Bitcoin headless daemon
Group: Productivity/Financial
%description -n bitcoind
Headless daemon for Bitcoin cryptocurrency (bitcoind).
%prep
%setup -q -n bitcoin-%{version}
%build
# Бинарный пакет - компиляция не требуется
echo "Building binary package - no compilation needed"
%install
# Создание необходимых каталогов
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/256x256/apps
mkdir -p %{buildroot}%{_datadir}/pixmaps
# Установка бинарных файлов из готового архива
install -m 755 bin/bitcoin-cli %{buildroot}%{_bindir}
install -m 755 bin/bitcoin-qt %{buildroot}%{_bindir}
install -m 755 bin/bitcoin-tx %{buildroot}%{_bindir}
install -m 755 bin/bitcoind %{buildroot}%{_bindir}
# Установка desktop-файла
cat > %{buildroot}%{_datadir}/applications/bitcoin-qt.desktop << 'EOF'
[Desktop Entry]
Encoding=UTF-8
Name=Bitcoin Core
Comment=Bitcoin cryptocurrency client
Exec=bitcoin-qt
Icon=bitcoin
Terminal=false
Type=Application
Categories=Office;Finance;
EOF
# Установка иконок из локального источника
if [ -f %{SOURCE1} ]; then
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/bitcoin.png
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/bitcoin.png
else
echo "Warning: bitcoin256.png not found in sources"
fi
# Создание файла лицензии, если его нет в архиве
if [ ! -f COPYING ]; then
cat > COPYING << 'EOF'
Copyright (c) 2009-2025 The Bitcoin Core developers
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
EOF
fi
# Установка документации и лицензии
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}
mkdir -p %{buildroot}%{_defaultlicensedir}/%{name}
if [ -f README.md ]; then
install -m 644 README.md %{buildroot}%{_defaultdocdir}/%{name}/
else
# Создание минимального README если его нет
cat > %{buildroot}%{_defaultdocdir}/%{name}/README.md << 'EOF'
# Bitcoin Core
Bitcoin is a peer-to-peer Internet currency that enables instant, near-zero cost payments to anyone in the world.
## Installation
This is a binary distribution of Bitcoin Core for openSUSE Tumbleweed.
## Usage
- bitcoin-qt: Graphical user interface
- bitcoind: Headless daemon
- bitcoin-cli: Command line interface
- bitcoin-tx: Transaction tool
For more information visit: https://bitcoin.org
EOF
fi
if [ -f COPYING ]; then
install -m 644 COPYING %{buildroot}%{_defaultdocdir}/%{name}/
install -m 644 COPYING %{buildroot}%{_defaultlicensedir}/%{name}/
else
install -m 644 COPYING %{buildroot}%{_defaultdocdir}/%{name}/
install -m 644 COPYING %{buildroot}%{_defaultlicensedir}/%{name}/
fi
%post qt
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun qt
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%files
%defattr(-,root,root,-)
%doc %{_defaultdocdir}/%{name}/
%license %{_defaultlicensedir}/%{name}/
%files utils
%defattr(-,root,root,-)
%{_bindir}/bitcoin-cli
%{_bindir}/bitcoin-tx
%files qt
%defattr(-,root,root,-)
%{_bindir}/bitcoin-qt
%{_datadir}/applications/bitcoin-qt.desktop
%{_datadir}/icons/hicolor/256x256/apps/bitcoin.png
%{_datadir}/pixmaps/bitcoin.png
%files -n bitcoind
%defattr(-,root,root,-)
%{_bindir}/bitcoind
%changelog
* Wed Oct 15 2025 Alvin J. Merphy aka Sylar <renard.corp@hotmail.com> - 30.0-0
- Initial Bitcoin package for openSUSE Tumbleweed
- Binary package distribution - no compilation
- Adapted from Litecoin package specification
- Added bitcoin256.png icon support from local source