summaryrefslogtreecommitdiff
path: root/community/prosody/PKGBUILD
blob: 34a000900dac9e87249c88495047293de54521e3 (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
# $Id: PKGBUILD 48848 2011-06-06 14:44:51Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Dwayne Bent <dbb.0@liqd.org>
# Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com>

pkgname=prosody
pkgver=0.8.1
pkgrel=1
pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua."
arch=('i686' 'x86_64' 'mips64el')
url="http://prosody.im/"
license=('MIT')
depends=('lua>=5.1' 'luasocket' 'luaexpat' 'luafilesystem' 'libidn>=0.5.18' 'openssl')
optdepends=('luasec: TLS encryption support'
	    'lua-zlib: compression support'
	    'luadbi: SQL storage support')
install=prosody.install
backup=('etc/logrotate.d/prosody'
	'etc/prosody/prosody.cfg.lua')
source=("http://prosody.im/depot/${pkgver}/prosody-${pkgver}.tar.gz"
	'prosody.rcd'
	'prosody.logrotated'
	'fix-config.patch')
md5sums=('2be3e9deed0b96f109efc5707d7728ba'
         'd2b5f9c8e42bb31819e715eb1756ee53'
         '26466fdbea87963a3ca6f48f76fe4a29'
         '59a1bf2dfd0bd386cef6fa646e2a3752')

build() {
    cd "$srcdir/prosody-$pkgver"
    patch -p1 <$srcdir/fix-config.patch
    ./configure --prefix=/usr --sysconfdir=/etc/prosody \
        --datadir=/var/lib/prosody
    make
}

package() {
    cd "$srcdir/prosody-$pkgver"

    make DESTDIR="$pkgdir" install

    rm $pkgdir/etc/prosody/certs/*

    install -d "$pkgdir/etc/rc.d"
    install -d "$pkgdir/etc/logrotate.d"
    install -d "$pkgdir/var/log/prosody"

    install -o root -g root -m 755 "$srcdir/prosody.rcd" \
        "$pkgdir/etc/rc.d/prosody"
    install -o root -g root -m 644 "$srcdir/prosody.logrotated" \
        "$pkgdir/etc/logrotate.d/prosody"

    install -D -m0644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
}