summaryrefslogtreecommitdiffstats
path: root/testing/namecoin/APKBUILD
blob: 82436a967005a84e7075d190bfbb08f6c12b991e (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
80
81
82
83
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=namecoin
pkgver=3.75
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 qt5-qtbase-dev qt5-qttools-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/nc0.$pkgver.tar.gz
	12-fix-miniupnpc.patch	
	20-boost-multithread-dynamic.patch
	31-set-default-env-function.patch
	40-build-qt5.patch
	$pkgname.initd
	$pkgname.conf
	"

_builddir="$srcdir"/namecoin-nc0.$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 -Dm755 namecoind "$pkgdir"/usr/bin/namecoind || return 1
	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
}

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="ee67ce5cc01cbf4dae4c76f56933c465  namecoin-3.75.tar.gz
83a1465c87097c871f92b1518a66dbf8  12-fix-miniupnpc.patch
9d5c1c0945e7dd825c0070cc3c7e0583  20-boost-multithread-dynamic.patch
adcb5d3142435cc278f4f90d2f796094  31-set-default-env-function.patch
8e0dea0fbb6c4582b45a4f8934f7354f  40-build-qt5.patch
9ecdbd9e17240075d064498a80fd50bd  namecoin.initd
59b2e0e765738ba48f632051fb6917ae  namecoin.conf"
sha256sums="6ca938951f408828a3b3d2c3ec3078956aa8a060405eb8f0632f4bfd824d7f98  namecoin-3.75.tar.gz
403bdbad00961620eac497191302448e33b5f7f307b6f10e94089984fbdddafa  12-fix-miniupnpc.patch
17a7aaabd71cc826d58851d58e81e978d2a5134953d477b11ef85292360de5a5  20-boost-multithread-dynamic.patch
48dbfc38b9d2130b2c57ed265d037096d24554c870b56eda65d2e43a614bffc9  31-set-default-env-function.patch
06c1bf0f780fdbc6df2dde73fe6aa3ae185e635ce581664e6a3663f046709f3f  40-build-qt5.patch
04ae66115343aa8ed7343139a2370b1e570c8ab4397d09457f5f157dd906a204  namecoin.initd
4b413833527929ea863351469a5a4fc1e0ac365fe9df5e8a8304d8667acf8cea  namecoin.conf"
sha512sums="96c823aa05ba9cf2f8cc92ebdf71c8c0377baa14f7192c4e6d577f6f9f421dc55b17f35a8d1019d1da917209c2773d78c114e986c2c56f4af5b6b7e2f8867d1c  namecoin-3.75.tar.gz
fdf06dcf40d2333728b89c9dcdc6ac0f7330c865578cfccb5daea008d572901d5efc48784bb308c9b0f8e778c0c6e179816e2357e9d92f64c15f6482f9a1b698  12-fix-miniupnpc.patch
f4555776c9bb34bb3e805e07ceb702199df8f07bdc1358e5035a1f05e995a5999dfcc45d24bc79e66b9a40e3f0b3789878816073d5adacd7aa848c4429224da7  20-boost-multithread-dynamic.patch
2ad327f21e685b86ca6767cf4545af29ad82d3593f5e3cc6cf6a64036408fe7bdd05cde98571c1747ece2ccd2fe88b5e77c59594a12a5377486d4e40b16c6096  31-set-default-env-function.patch
ae4651f7695a4efb68859875c1628e552ef6b46721e625bc43618d8142551704d4c85226bd053a14e5f577e438dec45bd61170d529f28ab83944b7e209c11381  40-build-qt5.patch
3048248b3da7300b0b3cb5667283badc17b41e6c90573604fd9ea9eb9933e93f9b1d6288846793b4e7a001a4cae5e52d2ce42e4bdc83e48f72aca6ee0e8ddd43  namecoin.initd
3f92cb9a5f66d0e9e3792691b2e62b929c092030273bb87ebd9564e0c02196a5a9f69c458162f1b35099ac28e9b79b1c4035144b9d2dae4ad3e87d05a40d7ed4  namecoin.conf"