summaryrefslogtreecommitdiff
path: root/social/bitcoin-daemon/PKGBUILD
blob: d0b4d7bb1d418dde2dc27376a4e4c436e44c356e (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>

pkgname=bitcoin-daemon
_pkgname=bitcoin
pkgver=0.3.24
_bcver=0.3.24
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.43' 'miniupnpc')
makedepends=('boost' 'openssl')
conflicts=('bitcoin')
license=('MIT')
install="bitcoin-daemon.install"
source=(http://ufpr.dl.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-$_bcver/bitcoin-$pkgver-linux.tar.gz
        makefile.parabola
        bitcoin-daemon.install
        rc.bitcoind)

build() {
	cd $srcdir/$_pkgname-$_bcver/src/src
	
	# copy correct makefile to src dir
	cp $srcdir/makefile.parabola Makefile

    # fixes...
    mkdir -p obj/nogui 2>/dev/null
    rm -f cryptopp/obj/*

	# to build (single-threaded make due to OOM issues)
	make bitcoind
}

package() {
    cd $srcdir/$_pkgname-$_bcver/src/src

	mkdir -p $pkgdir/{usr/bin,usr/share/licenses/$pkgname,etc/rc.d,var/lib/$pkgname}
	
	install -D -m755 ./bitcoind $pkgdir/usr/bin/
	install -D -m755 $srcdir/rc.bitcoind $pkgdir/etc/rc.d/bitcoind

    install -D -m 644 $srcdir/$_pkgname-$_bcver/COPYING \
                      $pkgdir/usr/share/licenses/$pkgname/
	
	# strip shit from executables
	find $pkgdir/usr/bin/ -type f | xargs -L1 strip
	
	# the bitcoin data directory should not readable by others (wallet is sensitive data)
	chown -R 8333:8333 $pkgdir/var/lib/$pkgname
	chmod -R 700 $pkgdir/var/lib/$pkgname
}
md5sums=('7a9e5d45cccd21ef88b8cbbe20946599'
         'dc3d207309d11e285ece6b3bdf61d90b'
         'a388684057de2bb543cb7f795dc693cf'
         '7faa439885f3adbba5847ae75aac5484')
md5sums=('7a9e5d45cccd21ef88b8cbbe20946599'
         '3172bdbc0096cb277971a26e0ca9adb6'
         'a388684057de2bb543cb7f795dc693cf'
         '7faa439885f3adbba5847ae75aac5484')