aboutsummaryrefslogtreecommitdiffstats
path: root/testing/prosody/APKBUILD
blob: 66af7ee751aceeaea06eca5f4142ab892c94cfd7 (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
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
_luaver=5.1
pkgname=prosody
pkgver=0.9.9
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}"
makedepends="lua${_luaver}-dev libidn-dev openssl-dev"
install="prosody.pre-install"
subpackages="$pkgname-doc"
pkgusers="prosody"
pkggroups="prosody"
source="http://prosody.im/downloads/source/$pkgname-$pkgver.tar.gz
	$pkgname.cfg.lua.patch
	$pkgname.initd
	"

_builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$_builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/prosody \
		--with-lua=/usr/bin \
		--with-lua-lib=/usr/lib \
		--with-lua-include=/usr/include \
		--runwith=lua${_luaver} \
		--no-example-certs \
		|| return 1

	# Don't generate certs
	rm -f "$_builddir"/certs/Makefile

	make || return 1
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make DESTDIR="$pkgdir" install || return 1

	install -d -o prosody -g prosody "$pkgdir/var/log/prosody" || return 1
	install -d -o prosody -g prosody "$pkgdir/var/run/prosody" || return 1
	install -d -m750 -o prosody -g prosody "$pkgdir/var/lib/prosody" \
		|| return 1

	patch "$pkgdir/etc/prosody/prosody.cfg.lua" "$srcdir/prosody.cfg.lua.patch" || return 1
	install -D -m755 "$srcdir"/"$pkgname".initd "$pkgdir"/etc/init.d/"$pkgname"
}

md5sums="8f7c529b072e78ab9e82ecbedfee7145  prosody-0.9.9.tar.gz
b839353efd51b724723f0f4293f76bfb  prosody.cfg.lua.patch
9b68b81deb2148a3a6c3b5d2eb9c96b9  prosody.initd"
sha256sums="5624fd80d1030c4d1e239172f7a0d58761a14ffad28713240e8f3165d5cacf2e  prosody-0.9.9.tar.gz
8653ccb14a0a5e27fee95b5baf412158543f619f6ca54fd7630c8d333ddddadd  prosody.cfg.lua.patch
0db9babd65354fe8693d1233945da61ebbea525915f881cf601211110ea50b08  prosody.initd"
sha512sums="f1b40d312819ba9f7eef0656e3e009319179a6c931fae6886ce8ad0e57c79365431ab3d115c3a9b2c8742e6027e5370af9c4732e01116038f64e0a5af5d396f3  prosody-0.9.9.tar.gz
950d9b53887d859b7d64986ba3817f92fb45ed1b653998759458156197b9623f1cc240559da071e20992f7aa497ef37d422da2168aa5b3c4ea3946482d160f41  prosody.cfg.lua.patch
95f46dde7e066a93429c46a8ac42698af3754ebe0ed89c7dc86fad042d68264695f4270ecc5a9dabec2b5c2f989928e50b0556ccbcc513ff73ddbb5e01b47dfe  prosody.initd"