# $Id: PKGBUILD 102533 2013-12-13 10:32:00Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: Jeff 'codemac' Mickey # Contributor: Alexander Rødseth pkgname=ejabberd pkgver=13.12 pkgrel=1 pkgdesc="Jabber server written in Erlang" arch=('x86_64' 'i686' 'mips64el') url="http://www.ejabberd.im/" license=("GPL") depends=('expat' 'openssl' 'zlib' 'erlang-nox' 'pam' 'iproute2' 'erlang-unixodbc' 'libyaml') makedepends=('git' 'rebar') backup=('etc/ejabberd/ejabberd.yml' 'etc/ejabberd/ejabberdctl.cfg' 'etc/logrotate.d/ejabberd') install=$pkgname.install replaces=('ejabberd-mod_mysql' 'ejabberd-mod_mysql-svn' 'ejabberd-mod_pgsql' 'ejabberd-mod_pgsql-svn') source=("$pkgname-$pkgver.tar.gz::https://github.com/processone/ejabberd/archive/$pkgver.tar.gz" "p1_cache_tab::git://github.com/processone/cache_tab" "p1_tls::git://github.com/processone/tls" "p1_stringprep::git://github.com/processone/stringprep" "p1_xml::git://github.com/processone/xml" "p1_yaml::git://github.com/processone/p1_yaml" "git://github.com/rds13/xmlrpc" "p1_pam::git://github.com/processone/epam" "p1_zlib::git://github.com/processone/zlib" "git://github.com/basho/lager" "p1_iconv::git://github.com/processone/eiconv" "git://github.com/DeadZen/goldrush.git" "p1_mysql::git://github.com/processone/mysql.git" "p1_pgsql::git://github.com/processone/pgsql.git" "p1_stun::git://github.com/processone/stun" "git://github.com/davisp/jiffy" "git://github.com/cmullaparthi/ibrowse" "git://github.com/esl/lhttpc" "$pkgname.logrotate" "ejabberd.service" "crash-fix.patch") md5sums=('6eadb6f190d55c8a679de5496ca0c4a9' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'f97c8a96160f30e0aecc9526c12e6606' 'a437aff9d7d477fb036d527205617e18' 'ef3dd667dec1627c1597c7f6f3cfcd4a') prepare() { cd "$srcdir/$pkgname-$pkgver" patch -p1 <$srcdir/crash-fix.patch mkdir -p "$srcdir/$pkgname-$pkgver/deps" for i in goldrush lager p1_cache_tab p1_iconv p1_pam \ p1_stringprep p1_tls p1_xml p1_yaml p1_zlib xmlrpc \ p1_mysql p1_pgsql p1_stun jiffy ibrowse lhttpc; do rm -rf "$srcdir/$pkgname-$pkgver/deps/$i" mv $srcdir/$i "$srcdir/$pkgname-$pkgver/deps" done } build() { cd "$srcdir/$pkgname-$pkgver" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --enable-all make } package() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install install -d "$pkgdir/var/lib/$pkgname" install -D -m0644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname" chmod ug+r "$pkgdir/etc/$pkgname/"* mkdir -p $pkgdir/usr/bin mv $pkgdir/usr/sbin/ejabberdctl $pkgdir/usr/bin/ejabberdctl chmod a+rx "$pkgdir/usr/bin/ejabberdctl" "$pkgdir/usr/lib/ejabberd/priv/bin/captcha.sh" rm -rf "$pkgdir/var/lock" "$pkgdir/usr/sbin" install -Dm0644 $srcdir/ejabberd.service $pkgdir/usr/lib/systemd/system/ejabberd.service # workaround ln -s mod_configure.beam $pkgdir/usr/lib/ejabberd/ebin/configure.beam } # vim:set ts=2 sw=2 et: