aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ejabberd-git/APKBUILD
blob: c97531e07e50d9b51290ace1af531253ca9da74d (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
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=ejabberd-git
_pkgname=ejabberd
pkgver=0_git20130607
pkgrel=1
pkgdesc="An erlang jabber server, git version"
url="http://www.ejabberd.im"
arch="all"
license="GPL2+"
depends="erlang util-linux"
depends_dev="erlang-dev expat-dev libiconv-dev openssl-dev zlib-dev heimdal-dev"
makedepends="$depends_dev"
pkgusers="ejabberd"
pkggroups="ejabberd"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd"
giturl="git://github.com/processone/$_pkgname.git"
disturl="dev.alpinelinux.org:/archive/$pkgname/"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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

package() {
	cd "$_builddir"/src
	make DESTDIR="$pkgdir" install

	install -d ${pkgdir}/var/spool/$pkgname
	install -d ${pkgdir}/var/lib/$pkgname
	install -D -m0644 ../../../$pkgname.logrotate ${pkgdir}/etc/logrotate.d/$pkgname
	install -m755 -D ../../../$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D ../../../$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.cfg "$pkgdir"/etc/ejabberd/ejabberdctl.cfg "$pkgdir"/etc/ejabberd
}

md5sums="6cd08c03d22f70580cc06f836e0f65dd  ejabberd-git-0_git20130607.tar.gz
e0ef3a939e87779737ce75469e79fef1  ejabberd-git.initd
1681f2c06d35b5f09f52edadfcdf9ebb  ejabberd-git.confd"
sha256sums="d52a1374e2be264ca821d3eac5ad34c2cf40a46f37591ac2c0c469259830d8f4  ejabberd-git-0_git20130607.tar.gz
1c07fa02152b42bee44a8d1cd3f031596aeee37276ec4a36d765e3c54aa23075  ejabberd-git.initd
0296d3d281a321cd7380772c1d89a94e4a86f85b7f43bf9dc1af74935c2e6386  ejabberd-git.confd"
sha512sums="06283e49b6145d51629830568887ec3fd9f159c8174d5224f0918068dc778e8837e58414f8bb5745f2aa5ac07f6052df243402a25daff7f1c2238e16e184e721  ejabberd-git-0_git20130607.tar.gz
1142b4f1ca240f20603ca9a64819780ff4a1d9fbde2940fd1dab6cbca1d2de5108cf35aa00ff1c037dc72a778c6502521e3908c6cde5a39c4bb3c9fc1c70aceb  ejabberd-git.initd
07143642982df18461fdecd16daaad3baf6a06f8222d7a76757797c531be2803975ed60cc43aace24a624aa7c73bd8fdc6e023e739de492271b79e571f27c8fb  ejabberd-git.confd"