summaryrefslogtreecommitdiff
path: root/community/ejabberd/PKGBUILD
blob: 9573572e71246267593393f4f1055aac52212697 (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
# $Id: PKGBUILD 69776 2012-04-23 09:18:21Z ibiru $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Jeff 'codemac' Mickey <jeff@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>

pkgname=ejabberd
pkgver=2.1.10
pkgrel=4
pkgdesc="Jabber server written in Erlang"
arch=('x86_64' 'i686')
url="http://www.ejabberd.im/"
license=("GPL")
depends=('expat' 'openssl' 'zlib' 'erlang' 'pam' 'iproute2')
backup=(etc/ejabberd/ejabberd.cfg etc/logrotate.d/ejabberd)
install=$pkgname.install
source=("http://www.process-one.net/downloads/ejabberd/${pkgver/_/-}/ejabberd-${pkgver}.tar.gz"
        "$pkgname.logrotate"
        "$pkgname")
sha256sums=('9dc2e5889e919a7d51f2b95b83da835116631db81550a115c02e71909ad932be'
            '31780cac78736d285e46f445f8c8463a70f2aeb2683280c259129db11832ddd2'
            '93f8f9a8751b9e982b332f74e71f766c3c9c4818876991cadef08fe140b83ca6')

build() {
  cd "$srcdir/$pkgname-$pkgver/src"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --enable-pam --enable-odbc
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver/src"

  make DESTDIR="$pkgdir" install
  install -D -m 0755 "$srcdir/$pkgname" "$pkgdir/etc/rc.d/$pkgname"
  install -d "$pkgdir/var/spool/$pkgname"
  install -d "$pkgdir/var/lib/$pkgname"
  install -D -m0644 "$srcdir/$pkgname.logrotate" \
    "$pkgdir/etc/logrotate.d/$pkgname"
  chmod ug+r "$pkgdir/etc/$pkgname/"*
  rm -rf "$pkgdir/var/lock"
}

# vim:set ts=2 sw=2 et: