aboutsummaryrefslogtreecommitdiffstats
path: root/community/prosody/APKBUILD
blob: be9fc2eb261338f29abd72dc19d6882599f7d566 (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
57
58
59
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
_luaver=5.2
pkgname=prosody
pkgver=0.11.6
pkgrel=0
pkgdesc="Lua based Jabber/XMPP server"
url="http://prosody.im/"
arch="all"
license="MIT"
depends="lua$_luaver-socket lua$_luaver-expat lua$_luaver-filesystem
	lua$_luaver-sec lua$_luaver lua$_luaver-busted"
makedepends="linux-headers lua$_luaver-dev libidn-dev openssl-dev"
checkdepends="lua-busted"
install="prosody.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
pkgusers="prosody"
pkggroups="prosody"
source="https://prosody.im/downloads/source/prosody-$pkgver.tar.gz
	prosody.cfg.lua.patch
	$pkgname.logrotate
	$pkgname.initd
	"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/prosody \
		--ostype=linux \
		--with-lua-lib=/usr/lib \
		--with-lua-include=/usr/include \
		--lua-version=$_luaver \
		--no-example-certs \
		--runwith=lua$_luaver
	# Don't generate certs
	rm -f "$builddir"/certs/Makefile

	make
}

check() {
	/usr/bin/lua$_luaver /usr/bin/busted --lua=/usr/bin/lua$_luaver
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm644 "$srcdir"/$pkgname.logrotate $pkgdir/etc/logrotate.d
	install -d -o prosody -g prosody "$pkgdir/var/log/prosody"
	install -d -o prosody -g prosody "$pkgdir/var/run/prosody"
	install -d -m750 -o prosody -g prosody "$pkgdir/var/lib/prosody"

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

sha512sums="4ba048f686d3780ed9a58d81bbb791bec85d6c1caf60793fa85f9921c5352d74ccfc70b3c8db57a16edd8ad8f05cfc26e1403e4e2d0fa53a0d2ecc238dd2781d  prosody-0.11.6.tar.gz
3613c009e77c086468c960c6629827092d8bf95176ec37bb7b3a3420b7ccf059d8e70d76c7de9e17ad01d1d09852070004f538872f64879cb747fc3f4f4ebdbd  prosody.cfg.lua.patch
20bc16c981072be39f967d27ed983aaae16383d922172a4f0751858d4bd12a521496d5f621ef178e9a0da61102d4c01ba709f63ad9ddf5b8e55fbb5f6793e7cb  prosody.logrotate
24360603dbd5d2a92758e6c4b4aab4f02cbd05373580cba2df76df98b6045891e8108e8c2d16af9508e93968ed5880db952e7a21b2742ebeec6f14b167968c2c  prosody.initd"