aboutsummaryrefslogtreecommitdiffstats
path: root/testing/namecoin/APKBUILD
blob: 434b5959d2bc284ef47c6d8748913bf4107141d9 (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=0.3.76
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/nc$pkgver.tar.gz
	12-fix-miniupnpc.patch
	20-boost-multithread-dynamic.patch
	31-set-default-env-function.patch
	$pkgname.initd
	$pkgname.conf
	"

_builddir="$srcdir"/namecoin-nc$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="ec7d7e4cc15dc8a7d8aa6f8cd6102e23  namecoin-0.3.76.tar.gz
a9491dcb41e00275c5ffaa1f1653134c  12-fix-miniupnpc.patch
e4e43d7420191a94500189fe58a34a9c  20-boost-multithread-dynamic.patch
5fd72171fddc40f88740b8893336e44e  31-set-default-env-function.patch
9ecdbd9e17240075d064498a80fd50bd  namecoin.initd
59b2e0e765738ba48f632051fb6917ae  namecoin.conf"
sha256sums="bb6c9decc86447ccfc7dca6cd25e8af181f3cd057cc0aa13ba67c143a438e300  namecoin-0.3.76.tar.gz
583df477b3f85939a5920f8fb00a4cee4ed1643fe28dbddb97938e39757aad51  12-fix-miniupnpc.patch
1b0e2c1c3ca849df816405c9f8dd86e056daed213c3e4c4e72161cabd64e67e8  20-boost-multithread-dynamic.patch
5cadb754f66e100a4b4146eb5178cf21b4d5a1367cf278a7d10d56a5875f181f  31-set-default-env-function.patch
04ae66115343aa8ed7343139a2370b1e570c8ab4397d09457f5f157dd906a204  namecoin.initd
4b413833527929ea863351469a5a4fc1e0ac365fe9df5e8a8304d8667acf8cea  namecoin.conf"
sha512sums="7f4ee2f49fd136e087a65ca0a1814afe62e285e3b20fdd25033a2c186dc29ed4b1b44238ba5d96b6168c66e64cd975112297eb8049333d939ecdcf80569b9b3d  namecoin-0.3.76.tar.gz
c53e3bff2b57d2137730790e9314b364572a5f3c4e449cc6c9d9d2643bdd980bbaee857a53eceaa22de35688a147675d89d1e427927a14b3d0130c54626c82f9  12-fix-miniupnpc.patch
fc13574fef73cca20178e5895e2327567f40c91d25105d72b301a155f9025bfb494ce337096424fd71da8034fb0544562b8459c1d8ae2598ee503efd5995c6bf  20-boost-multithread-dynamic.patch
1bb4e2b0c3b2a7f952cbc0a8fd8014641eef19875b945cce1c5c648236ccd5fd5a9144d796ca68afddde88b13adaaa1675efc26ec2100149d9e3481569fd95d7  31-set-default-env-function.patch
3048248b3da7300b0b3cb5667283badc17b41e6c90573604fd9ea9eb9933e93f9b1d6288846793b4e7a001a4cae5e52d2ce42e4bdc83e48f72aca6ee0e8ddd43  namecoin.initd
3f92cb9a5f66d0e9e3792691b2e62b929c092030273bb87ebd9564e0c02196a5a9f69c458162f1b35099ac28e9b79b1c4035144b9d2dae4ad3e87d05a40d7ed4  namecoin.conf"