# $Id: PKGBUILD 62769 2012-01-26 14:42:40Z spupykin $ # Maintainer: Sergej Pupykin # Maintainer: Jeff 'codemac' Mickey # Contributor: Sergej Pupykin pkgname=ejabberd pkgver=2.1.10 pkgrel=2 pkgdesc="An erlang jabber server" arch=(i686 x86_64 'mips64el') url="http://www.ejabberd.im/" license=("GPL") depends=('expat' 'openssl' 'zlib' 'erlang' 'pam') makedepends=() backup=(etc/ejabberd/ejabberd.cfg etc/logrotate.d/ejabberd) install=ejabberd.install source=(http://www.process-one.net/downloads/ejabberd/${pkgver/_/-}/ejabberd-${pkgver}.tar.gz ejabberd ejabberd.logrotate) md5sums=('70f0e17983114c62893e43b6ef2e9d0c' 'c49bb73bdcb50ea7fcf411bbfed7629a' 'f97c8a96160f30e0aecc9526c12e6606') build() { cd ${srcdir}/${pkgname}-${pkgver}/src sed -i "s|EJABBERDDIR = \$(DESTDIR)@prefix@/var/lib/ejabberd|EJABBERDDIR = \$(DESTDIR)@prefix@/usr/lib/ejabberd|g" ./Makefile.in [ $NOEXTRACT -eq 1 ] || ./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}/ejabberd ${pkgdir}/etc/rc.d/ejabberd install -d ${pkgdir}/var/spool/ejabberd install -d ${pkgdir}/var/lib/ejabberd install -D -m0644 ${srcdir}/ejabberd.logrotate ${pkgdir}/etc/logrotate.d/ejabberd chmod ug+r ${pkgdir}/etc/ejabberd/* rm -rf $pkgdir/var/lock }