aboutsummaryrefslogtreecommitdiffstats
path: root/community/namecoin/APKBUILD
blob: bb2622992158a121196e7f7f18afbff7ce6c51a4 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=namecoin
pkgver=0.18.1
_ver=${pkgver/_/}
pkgrel=6
pkgdesc="Namecoin is a peer to peer DNS based on bitcoin"
url="https://www.namecoin.org/"
arch="all !s390x"
license="MIT"
makedepends="$depends_dev autoconf automake libtool boost-dev openssl-dev
	db-dev miniupnpc-dev qt5-qtbase-dev qt5-qttools-dev protobuf-dev
	libqrencode-dev libevent-dev chrpath"
install="$pkgname.post-install $pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-qt $pkgname-cli $pkgname-tx $pkgname-tests $pkgname-bench
	$pkgname-doc $pkgname-openrc"
source="$pkgname-$_ver.tar.gz::https://github.com/$pkgname/$pkgname-core/archive/nc${_ver}.tar.gz
	skip-fs-test-utf8.patch
	ssize_t.patch
	boost-1.72.patch
	$pkgname.initd
	$pkgname.conf
	"
builddir="$srcdir/$pkgname-core-nc$_ver"

build() {
	./autogen.sh
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-incompatible-bdb \
		--with-gui=qt5 \
		--with-utils \
		--disable-ccache \
		--disable-static \
		--enable-hardening
	make
}

check() {
	export LC_ALL="C.UTF-8"
	make check
}

package() {
	make install DESTDIR="$pkgdir"
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m600 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf
	rm -f "$pkgdir"/usr/lib/*.la
}

qt() {
	pkgdesc="Namecoin with a Qt frontend & QR Code support"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/$pkgname-qt "$subpkgdir"/usr/bin/
}

cli() {
	pkgdesc="Namecoin CLI"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/$pkgname-cli "$subpkgdir"/usr/bin/
}

tx() {
	pkgdesc="Namecoin TX (Transaction Tool)"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/$pkgname-tx "$subpkgdir"/usr/bin/
}

tests() {
	pkgdesc="Namecoin & Namecoin-QT Unit Tests)"
	mkdir -p "$subpkgdir"/usr/bin
	chrpath -d "$pkgdir"/usr/bin/test_namecoin
	mv "$pkgdir"/usr/bin/test_$pkgname-qt "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/bin/test_$pkgname "$subpkgdir"/usr/bin/
}

bench() {
	pkgdesc="Namecoin Benchmarking Tools"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/bench_$pkgname "$subpkgdir"/usr/bin/
}

dev() {
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
	mv "$pkgdir"/usr/include "$subpkgdir"/usr/
}

sha512sums="5ce720b8fa52a0451a7444922453b0d3a3e01d8d1e39889cdfc341ac834c109e9a24749fb2269d141183e3b9b295d32eabfbdec0259376a699edd82aa5427a84  namecoin-0.18.1.tar.gz
e9a1151af56dcef37720991452ab29fb2661166f2d755d5336ef606e6029a21b1a6d09b1a4da34955f0b97cd1a4febb19a8270e6f31f9fbbd271f19fe676468a  skip-fs-test-utf8.patch
98aa5ad81bdb4ae961b791bc978c39117cdf2d83c2181f92bebbb0db107d9b6e86eda265fb3f93ff8a5ca8a7754d7148818b98095d57201dff9363d60b97e7dd  ssize_t.patch
10e01c26b4e86412ff65bc1f5a8b6765e44d2e032440451130f2679eac431379c17784465574aebf169a61da08d60ff0ecb2d31bcc88943b4486cc2b621743fb  boost-1.72.patch
1753132f349e02cc248a622eb17f2f98a180d561d46f2e8916b84cc26c98d546214ca305bb1ea378ae14090c0abf8d6ac257c98c6776bbe4dabd68c108f595a3  namecoin.initd
3f92cb9a5f66d0e9e3792691b2e62b929c092030273bb87ebd9564e0c02196a5a9f69c458162f1b35099ac28e9b79b1c4035144b9d2dae4ad3e87d05a40d7ed4  namecoin.conf"