aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ejabberd/APKBUILD
blob: b69d8fb0a17cf98fef2605cfd670a3c513a0bc59 (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
65
66
67
68
69
70
71
72
73
74
75
76
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: John Regan <john@jrjrtech.com>
pkgname=ejabberd
pkgver=17.09
pkgrel=0
pkgdesc="An erlang jabber server"
url="http://www.ejabberd.im"
arch="all"
license="GPL2+"
_erl_deps="erlang-asn1 erlang-crypto erlang-eldap erlang-mnesia
	erlang-public-key erlang-sasl erlang-ssl erlang-syntax-tools
	"
_erl_make_deps="erlang-eunit erlang-parsetools"
depends="erlang util-linux yaml $_erl_deps"
depends_dev="erlang-dev expat-dev libressl-dev zlib-dev heimdal-dev yaml-dev git"
makedepends="$depends_dev $_erl_deps $_erl_make_deps automake autoconf gd-dev
	libjpeg-turbo-dev libpng-dev libwebp-dev"
pkgusers="ejabberd"
pkggroups="ejabberd"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/processone/$pkgname/archive/$pkgver.tar.gz
	https://github.com/processone/fast_tls/archive/1.0.7.tar.gz
	ejabberd.initd
	ejabberd.logrotate
	ejabberd.confd
	makefile.patch
	libressl.patch
	"

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

prepare() {
	cd "$builddir"
	mkdir deps
	mv "$srcdir"/fast_tls-1.0.7 \
		"$builddir"/deps/fast_tls || return 1
	default_prepare
}

build() {
	cd "$builddir"
	./autogen.sh || return 1
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info || return 1
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1

	install -d ${pkgdir}/var/spool/$pkgname
	install -d ${pkgdir}/var/lib/$pkgname
	install -D -m0644 "$srcdir"/$pkgname.logrotate \
		${pkgdir}/etc/logrotate.d/$pkgname
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	chown -R ejabberd.ejabberd "$pkgdir"/var/log/ejabberd
	chown -R ejabberd.ejabberd "$pkgdir"/var/spool/ejabberd
	chown -R ejabberd.ejabberd "$pkgdir"/var/lib/ejabberd
	chgrp ejabberd "$pkgdir"/etc/ejabberd/ejabberd.yml \
		"$pkgdir"/etc/ejabberd/ejabberdctl.cfg "$pkgdir"/etc/ejabberd
}

sha512sums="3eb253642d6688bbe93d0a1234ac29725ed02ed929a1b87a8424e9d01b2200eb174192cd164ba2c31fb8082e92b2886e4068effa504f66025809685867ba90f0  ejabberd-17.09.tar.gz
46a3ebab09ec5e18b086c8c3e2a87a5d6a35e406e8988c48979d94c3e303d5f9a8bcdb1e8ce74266ba8c59fbb4a4310e445f5ad65f072d28a7b44a0bdec50b62  1.0.7.tar.gz
e2310e1b5b471e5c27ce2ec5d5fc6549656f9f49ba1d65a515ebc3af6d3237a461894c6c4c55c8c6eb1b9be0b01573057591ead51eb9014f5cf1258d387c9fc8  ejabberd.initd
47fd2cfd9177c4e978a9799a153ba74392a9891822221af8194686a40f6bf01f38644833e1e1f5416c6357e0bfb7ca3dae96f55a4fcd7cd629ec798d85a72807  ejabberd.logrotate
96a571c0ab2be366e931bda423a61ef920cbaba2107e61ddbc501472ce3efe2804418cc6579c99310b902a9a99aaecb9284cf2420c071dbca2f670efb4034135  ejabberd.confd
36eacec7780ed95ffc310db30e34f9d5ba8ead65f8fc44fb06c7d825f7252effad83e07c4a010e65b80a63f4a1d985290e8a489906a8c225c306f5b5b642ce36  makefile.patch
2579f21ab6428a8450399bea4d0c6f0967606d4cba73432942b34cf5445d037bed436f418e3c5aadec9a3525191824af1195f9e342ec7cbe20f99147445e4e6d  libressl.patch"