summaryrefslogtreecommitdiff
path: root/social/bitcoin-daemon/PKGBUILD
blob: dee3f8daa9bd3cd96770f5e8c47a9d2eb6ba144d (plain)
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
# Maintainer: fauno <fauno@kiwwwi.com.ar>
# Contributor: Artefact2 <artefact2@gmail.com>
# Contributor: shahid <helllamer@gmail.com>
# Based on bitcoin by
# Maintainer : shahid <helllamer@gmail.com>

pkgname=bitcoin-daemon
_pkgname=bitcoin
pkgver=0.4.0
pkgrel=1
pkgdesc="Bitcoin is a peer-to-peer network based digital currency (daemon with JSON-RPC interface)."
arch=('i686' 'x86_64' 'mips64el')
url="http://www.bitcoin.org/"
depends=('expat' 'boost-libs>=1.46' 'miniupnpc>=1.6')
makedepends=('boost')
conflicts=('bitcoin')
license=('MIT')
install="bitcoin-daemon.install"
source=("http://downloads.sourceforge.net/sourceforge/${_pkgname}/${_pkgname}-${pkgver}-linux.tar.gz"
        makefile.parabola
        bitcoin-daemon.install
        rc.bitcoind)
md5sums=('cb085fef9d49d25e7f3dd263950b1ed2'
         '8d40b6a332721bf7354cca4070e082df'
         '0375ba4d6c3425eee350dc8b7575403d'
         '7faa439885f3adbba5847ae75aac5484')

s1=$srcdir/${_pkgname}-${pkgver}-linux
src=$s1/src/src/
makefile_unix=makefile.unix

build() {
	cd $src

	msg "Patching $makefile_unix..."
	sed -i $makefile_unix \
		-e 's/\(-DNOPCH\)/\1 -DBOOST_FILESYSTEM_VERSION=2/' \
		-e 's/-Bstatic/--as-needed ${LDFLAGS}/g' \
		-e 's/\(USE_UPNP:=\)0/\11/' \
		-e 's/$(DEBUGFLAGS)//g' \
		-e 's/CXXFLAGS/CPPFLAGS/g' \
		-e 's/-O[0-3]/${CXXFLAGS}/g' 

	# single-threaded build due to OOM issues reported
	make -j1 -f $makefile_unix bitcoind
}

package() {
	# get compiled binaries
	mkdir -p $pkgdir/{usr/{bin,share/licenses/$pkgname},var/lib/$pkgname}
	install -D -m755 $src/bitcoind $pkgdir/usr/bin/

	# install locales (FIXME bicycle with find|xargs)
	mkdir -p $pkgdir/usr/share/locale
	cd $s1/locale/
	find -name *.mo | xargs -I{} install -D -m644 {} $pkgdir/usr/share/locale/{}
	

    install -D -m 644 $s1/COPYING \
                      $pkgdir/usr/share/licenses/$pkgname/

}