aboutsummaryrefslogtreecommitdiffstats
path: root/testing/i2pd/APKBUILD
blob: 9d6bdebe5728d2b54cb23dd2c52db13a3df18018 (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
# Contributor: l-n-s <supervillain@riseup.net>
# Maintainer: l-n-s <supervillain@riseup.net>
pkgname=i2pd
pkgver=2.20.0
pkgrel=0
pkgdesc="I2P Router written in C++"
url="https://github.com/PurpleI2P/i2pd"
arch="all !aarch64" # build fails on aarch64
license="BSD"
pkgusers="i2pd"
depends="musl-utils"
makedepends="boost-dev libressl-dev libressl zlib-dev"
options="!check"
install="$pkgname.pre-install"
source="https://github.com/PurpleI2P/i2pd/archive/$pkgver/$pkgname-$pkgver.tar.gz
	i2pd.initd
	i2pd.confd
	"
subpackages="$pkgname-openrc"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make
}

package() {
	cd "$builddir"

	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 755 contrib/tunnels.conf "$pkgdir"/etc/i2pd/tunnels.conf
	install -D -m 755 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="affade889d32fdf20fc0bc4c7bb809fb511794421a80a93334707e26c72eecc83715d756d79ce7924d43ef44dc9f655925de860b5b392b6c4fe815eb873c1864  i2pd-2.20.0.tar.gz
7911b5e06492ea25c90780a25e5d02f957c655153f41dd89c1f1885fb52ccdaf7c2e643ca3cd2f7d769a1d8c6d1790fcd4f8737abd21eed808940e1997ae6cb4  i2pd.initd
ba94e5505f4eeb9a32159aa0a3b7f68ff077abb9704800f70502ac75fd5bcfcb20450ebd983d0523beca2d13e718d7bf888f53ec455d1f41701c16d09c3b2d28  i2pd.confd"