File bitcoin.spec of Package bitcoin
#
# spec file for package BitCoin (BitCoin trunk)
#
# Copyright 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# norootforbuild
#!BuildIgnore: post-build-checks
%define datadir %{_datadir}/%{name}
%define docdir %{_defaultdocdir}/%{name}
Name: bitcoin
Version: trunk
Release: 0
Summary: Virtual Currency Client
License: LGPL
Group: Network
Source0: %{name}-%{version}.tar.bz2
Source1: wxWidgets-2.9.0.tar.bz2
#Patch0: %{name}.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: gcc-c++ libdb-4_7-devel openssl-devel pkg-config gtk2-devel
BuildRequires: boost-devel boost-jam xorg-x11-devel xorg-x11-libs xorg-x11
BuildRequires: xorg-x11-server
Requires: gtk2
%description
Bitcoin is a peer-to-peer network based anonymous digital currency.
Peer-to-peer (P2P) means that there is no central authority to issue new money
or keep track of transactions. Instead, these tasks are managed collectively
by the nodes of the network. Anonymity means that the real world identity of
the parties of a transaction can be kept hidden from the public or even from
the parties themselves.
%prep
%setup
echo RPM_BUILD_ROOT=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
%build
cd $RPM_BUILD_ROOT
echo Executing build in `pwd`.
echo Extracting in `pwd`
tar -xjf /usr/src/packages/SOURCES/wxWidgets-2.9.0.tar.bz2
tar -xjf /usr/src/packages/SOURCES/bitcoin-trunk.tar.bz2
tar -xjf /usr/src/packages/SOURCES/boost_1_38_0.tar.bz2
# Build wxWidgets statically
cd $RPM_BUILD_ROOT/wxWidgets-2.9.0/
./configure --with-gtk --enable-debug --disable-shared --enable-monolithic
make
cp `find . -iname "*.a"` $RPM_BUILD_ROOT/
# Build and install old version of boost
cd $RPM_BUILD_ROOT/boost_1_38_0/
./configure
make
mkdir $RPM_BUILD_ROOT/lib/
cp `find . -iname "libboost_system*-mt*.a"` $RPM_BUILD_ROOT/lib/libboost_system-mt.a
cp `find . -iname "libboost_filesystem*-mt*.a"` $RPM_BUILD_ROOT/lib/libboost_filesystem-mt.a
# Build bitcoin itself
cd $RPM_BUILD_ROOT/bitcoin-trunk/
echo Patching makefile:
cp /usr/src/packages/SOURCES/makefile.unix .
cat makefile.unix
make -f makefile.unix
%clean
cd $RPM_BUILD_ROOT/bitcoin-trunk
make -f makefile.unix clean
cd $RPM_BUILD_ROOT/wxWidgets-2.9.0/
make clean
rm -rf $RPM_BUILD_ROOT
%install
install -d $RPM_BUILD_ROOT/usr/bin/
install -T bitcoin $RPM_BUILD_ROOT/usr/bin/%{name}
%files
%defattr(755,root,root)
%doc %{docdir}
/usr/bin/%{name}
%changelog