aboutsummaryrefslogtreecommitdiffstats
path: root/testing/namecoin/APKBUILD
blob: f8523789635da294e4fe4edbc7af6566ad5fb892 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=namecoin
pkgver=3.72
pkgrel=0
pkgdesc="Namecoin is a peer to peer DNS based on bitcoin"
url="https://github.com/namecoin/namecoin"
arch="all"
license="GPL"
depends=""
depends_dev="openssl-dev db-dev boost-dev miniupnpc-dev glib-dev qt-dev"
makedepends="$depends_dev"
install="$pkgname.post-install $pkgname.pre-install"
subpackages="$pkgname-qt"
source="$pkgname-$pkgver.tar.gz::https://github.com/namecoin/namecoin/archive/vQ.$pkgver.tar.gz
	10-use-latest-UPnP-lib.patch
	20-boost-multithread-dynamic.patch
	30-set-default-env.patch
	$pkgname.initd
	$pkgname.conf
	"

_builddir="$srcdir"/namecoin-vQ.$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"/src
	# build namecoind
	make USE_UPNP=1 USE_SSL=1 || return 1
	cd ..
	# build namecoin-qt
	qmake
	# Fix boost_multi thread linking in the GUI too
	sed -i 's/-lboost_thread/-lboost_thread-mt/g' ./Makefile
	sed -i 's/-lboost_program_options/-lboost_program_options-mt/g' ./Makefile
	sed -i 's/-lboost_chrono/-lboost_chrono-mt/g' ./Makefile
	make || return 1
}

package() {
	cd "$_builddir"/src
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
	install -m600 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf || return 1
        install -Dm755 namecoind "$pkgdir"/usr/bin/namecoind || return 1
}

qt() {
        pkgdesc="Namecoin with a Qt frontend"
        cd "$_builddir"
        mkdir -p "$subpkgdir"/usr/bin
        install -Dm755 namecoin-qt "$subpkgdir"/usr/bin/namecoin-qt || return 1
}

md5sums="dc1cc80bcf0833f0bf7239e7ae6c1399  namecoin-3.72.tar.gz
d7fdd69e1918b3ab7887e55043807aed  10-use-latest-UPnP-lib.patch
c77c66d690ba5d1c35e5362809737c75  20-boost-multithread-dynamic.patch
a1dde84304c5792a39264b5a02f902e8  30-set-default-env.patch
9ecdbd9e17240075d064498a80fd50bd  namecoin.initd
59b2e0e765738ba48f632051fb6917ae  namecoin.conf"
sha256sums="8c30214186bf0baf4f779235e82715a99686c8c358524ffa352b88e2a3d98725  namecoin-3.72.tar.gz
08eebd4cd4c021fafcb90146661950214c07aaf420cb6d14f76bb853712344f2  10-use-latest-UPnP-lib.patch
a605ee805cd2de213188bbe87b43929134538646797daf9a8635fa7824b5c20e  20-boost-multithread-dynamic.patch
e05690acce74a1eb0a2f28d45b6190218b61f4a759f0e53e2837816da3a6ba09  30-set-default-env.patch
04ae66115343aa8ed7343139a2370b1e570c8ab4397d09457f5f157dd906a204  namecoin.initd
4b413833527929ea863351469a5a4fc1e0ac365fe9df5e8a8304d8667acf8cea  namecoin.conf"
sha512sums="fac3b0cb3d02ccb438869752581ab57df6dd8e47201e613e73c64459009d9d20358f6595400938e61bf795f679466a098bbc77f1b2940591ec93d04cc387ea32  namecoin-3.72.tar.gz
f33c9080c462550030a559f0a5564d67150712151ffcb2be75474b56e0083c561dbe4d9f5d6699fe1fb915f54bda342c0e217502594035da6afd3c92cf9ab0b2  10-use-latest-UPnP-lib.patch
c98027c1f51f411053c64279a9740ee66002f7dc13618363ec64b9f9a77a47ee535b95d810c50057a86d63c370b86bb7108f46cf6db5dfb627da80fdd1cb38ab  20-boost-multithread-dynamic.patch
b3a074f3c3e5a0e4c22e75894b0b2d3152b4b22853b27621aa2e325ba274adec4562577779d63dd795ef0fd543699ecb3474329cec6e20347f6122446746a77b  30-set-default-env.patch
3048248b3da7300b0b3cb5667283badc17b41e6c90573604fd9ea9eb9933e93f9b1d6288846793b4e7a001a4cae5e52d2ce42e4bdc83e48f72aca6ee0e8ddd43  namecoin.initd
3f92cb9a5f66d0e9e3792691b2e62b929c092030273bb87ebd9564e0c02196a5a9f69c458162f1b35099ac28e9b79b1c4035144b9d2dae4ad3e87d05a40d7ed4  namecoin.conf"