aboutsummaryrefslogtreecommitdiffstats
path: root/testing/i2pd/APKBUILD
blob: a630c08ba759981d3992d0f6087384e19efe3de0 (plain) (blame)
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
# Maintainer: l-n-s <supervillain@riseup.net>
# Contributor: r4sas <r4sas@i2pmail.org>
pkgname=i2pd
pkgver=2.34.0
pkgrel=1
pkgdesc="I2P Router written in C++"
url="https://github.com/PurpleI2P/i2pd"
arch="all"
license="BSD-3-Clause"
pkgusers="i2pd"
depends="musl-utils"
makedepends="boost-dev miniupnpc-dev openssl-dev openssl zlib-dev"
options="!check" # No test suite
install="$pkgname.pre-install"
source="https://github.com/PurpleI2P/i2pd/archive/$pkgver/i2pd-$pkgver.tar.gz
	i2pd.initd
	i2pd.confd
	"
subpackages="$pkgname-openrc"

build() {
	local _arch_opts="USE_UPNP=yes"

	case "$CARCH" in
		aarch64|arm*) _arch_opts="$_arch_opts USE_AESNI=no USE_AVX=no" ;;
	esac

	make $_arch_opts
}

package() {

	install -D -m 755 i2pd "$pkgdir"/usr/sbin/i2pd

	install -dm755 -o $pkgusers \
		"$pkgdir"/etc/$pkgname \
		"$pkgdir"/usr/share/$pkgname \
		"$pkgdir"/var/lib/$pkgname \
		"$pkgdir"/var/log/$pkgname

	install -D -m 644 contrib/tunnels.conf "$pkgdir"/etc/i2pd/tunnels.conf
	install -D -m 644 contrib/i2pd.conf "$pkgdir"/etc/i2pd/i2pd.conf
	cp -r contrib/certificates/ "$pkgdir"/usr/share/$pkgname/certificates
	ln -s /usr/share/$pkgname/certificates "$pkgdir"/var/lib/$pkgname/certificates

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="74c8234b850159c6e680fa61b20e2c22a0f04ca8397b4aa68f92fa20520fb74a63e442ac75c2fbb17dc1e5a193011b9b38085cee08746de4496620778aa7f027  i2pd-2.34.0.tar.gz
5a95beef635fc2f5beecee314964fd41713ed61f92c4e972276208e0a2c86604c2b42a8e922863fc658a7a5789c9f43fddf7f76350fc281a44f2f42258a01201  i2pd.initd
ba94e5505f4eeb9a32159aa0a3b7f68ff077abb9704800f70502ac75fd5bcfcb20450ebd983d0523beca2d13e718d7bf888f53ec455d1f41701c16d09c3b2d28  i2pd.confd"