updated on Fri Jan 20 08:04:04 UTC 2012
[aur-mirror.git] / bitcoin / PKGBUILD
blob64810db4bfffef68b196f77d9aa8aa96bca3429f
1 ## Maintainer : shahid <helllamer@gmail.com>
2 ## Long PKGBUILD description, todo, wiki:
3 ## * https://bitbucket.org/helllamer/archlinux-pkgbuild/wiki/pkgbuild/bitcoin
5 ## Wanna take part on development my PKGBUILDs? Feel welcome on my repo:
6 ## * https://bitbucket.org/helllamer/archlinux-pkgbuild/
8 name=bitcoin
9 pkgname=$name
10 pkgver=0.5.2
11 pkgrel=1
12 pkgdesc="Bitcoin is a peer-to-peer network based digital currency."
13 arch=('i686' 'x86_64')
14 url="http://www.bitcoin.org/"
15 depends=('qt>=4.6' 'libpng>=1.4' 'expat' 'gcc-libs' 'boost-libs>=1.46' 'miniupnpc>=1.6' 'openssl')
16 makedepends=('boost' 'gcc' 'make' 'automoc4')
17 conflicts=('bitcoin-bin' 'bitcoin-git' 'bitcoin-daemon')
18 license=('MIT')
19 source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}-linux.tar.gz"
20         "${pkgname}.desktop")
21 md5sums=('6d40f645ddc042de26d64e83656f38e0'
22          '77139ce8a40f46bd7d7ad0a743672113')
23 s1=$srcdir/${pkgname}-${pkgver}-linux
24 src_qt=$s1/src
25 src_d=$s1/src/src/
26 makefile_unix=makefile.unix
28 build() {
29         cd $src_d
31         msg "Patching $makefile_unix..."
32         sed -i $makefile_unix \
33                 -e 's/\(-DNOPCH\)/\1 -DBOOST_FILESYSTEM_VERSION=2/' \
34                 -e 's/-Bstatic/--as-needed ${LDFLAGS}/g' \
35                 -e 's/\(USE_UPNP:=\)0/\11/' \
36                 -e 's/$(DEBUGFLAGS)//g' \
37                 -e 's/CXXFLAGS/CPPFLAGS/g' \
38                 -e 's/-O[0-3]/${CXXFLAGS}/g'
40         # make bitcoind
41         make $MAKEFLAGS -f $makefile_unix bitcoind
43         # and make qt gui
44         cd $src_qt
45         qmake
46         make $MAKEFLAGS
50 package() {
51         mkdir -p $pkgdir/usr/bin
52         mkdir -p $pkgdir/usr/share/pixmaps
53         mkdir -p $pkgdir/usr/share/applications
55         # get compiled binaries
56         install -D -m755 $src_qt/bitcoin-qt $pkgdir/usr/bin/
57         install -D -m755 $src_d/bitcoind $pkgdir/usr/bin/
58         
59         # add icon and .desktop file to pkg
60         install -D -m644 $src_qt/src/qt/res/icons/bitcoin.png $pkgdir/usr/share/pixmaps/
61         install -D -m644 $srcdir/$name.desktop $pkgdir/usr/share/applications/