aboutsummaryrefslogtreecommitdiffstats
path: root/community/matrix-appservice-irc/APKBUILD
blob: 455654d5047d440cb93800b39be15688e7b85b47 (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
55
56
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=matrix-appservice-irc
pkgver=0.17.1
pkgrel=0
pkgdesc="Node.js IRC bridge for Matrix"
url="https://github.com/matrix-org/matrix-appservice-irc"
arch="all !s390x !mips !mips64" # fails on CI, mips blocking on nodejs
license="Apache-2.0"
depends="nodejs"
makedepends="npm python3"
subpackages="$pkgname-openrc"
source="https://github.com/matrix-org/matrix-appservice-irc/archive/$pkgver/matrix-appservice-irc-$pkgver.tar.gz
	matrix-appservice-irc.initd
	matrix-appservice-irc.confd"

case "$CARCH" in
	x86)
		options="textrels"
		;;
esac

build() {
	npm install
}

check() {
	npm test
}

package() {
	mkdir -p "$pkgdir"/etc/matrix-appservice-irc
	mkdir -p "$pkgdir"/usr/bin
	mkdir -p "$pkgdir"/usr/share/webapps/matrix-appservice-irc

	cp config.sample.yaml "$pkgdir"/etc/matrix-appservice-irc

	cp -r \
		"$builddir"/bin \
		"$builddir"/node_modules \
		"$builddir"/app.js \
		"$builddir"/config.schema.yml \
		"$builddir"/lib \
		"$builddir"/scripts \
		"$pkgdir"/usr/share/webapps/matrix-appservice-irc

	ln -s /usr/share/webapps/matrix-appservice-irc/bin/matrix-appservice-irc \
		"$pkgdir"/usr/bin/matrix-appservice-irc

	install -Dm755 "$srcdir"/matrix-appservice-irc.initd "$pkgdir"/etc/init.d/matrix-appservice-irc
	install -Dm644 "$srcdir"/matrix-appservice-irc.confd "$pkgdir"/etc/conf.d/matrix-appservice-irc
}

sha512sums="0cefebb72cec4bfbfdcfc833151abb566204b8b0674c19fb2e1500830fb0c39979d11b1ce1b15eb960569813230b151b528cf4f5d8c80566cd959f1dc1df72f2  matrix-appservice-irc-0.17.1.tar.gz
c1cd9ebbf25c464159a05c369b3ff408e24aeb8beb8c06f336fb14b97ff15f9579b68c10f253f9cd207a117152510a4a49538064676bb2d1008434f985ef1c28  matrix-appservice-irc.initd
7b9e320a44cd07bb2876704eb1fa33dc0a8a6e237badf1e3d026d347df113eab144b42a0ad0e42b8f6e598c435e26982b37ef2ecdbd663fe34f34757e2e279cf  matrix-appservice-irc.confd"