- # Contributor: C Anthony Risinger
- pkgname=zarafa-server
- pkgver=6.40.0
- pkgrel=1
- pkgdesc="Open Source Groupware Solution"
- arch=('i686' 'x86_64')
- url="http://www.zarafa.com/"
- license=('AGPL')
- depends=('libical>=0.40'
- 'libvmime=0.7.1'
- 'libmysqlclient'
- 'libxml2'
- 'libldap'
- 'heimdal')
- makedepends=('php>=5.2.0'
- 'e2fsprogs')
- optdepends=('zarafa-webaccess-ajax: AJAX based web-interface')
- backup=('etc/zarafa/server.cfg')
- install=${pkgname}.install
- source=("zarafa-${pkgver}.tar.gz::http://download.zarafa.com/zarafa/drupal/ondemand.php?version=${pkgver}&src=zarafa-${pkgver}"
- "rc.zarafa-ical"
- "rc.zarafa-server"
- "stdsoap2.cpp.patch"
- "ECKrbAuth.cpp.patch")
- noextract=()
- md5sums=('389d195eb7659ccd05769208686e4b0d'
- '44d98735e4806e0ed1b8e62931d42eee'
- '4a2337e721e6579d012243f990a06252'
- '55c78ae5e64632ce89269a29113ddfa2'
- '7b95e9ee64f6158fcf90d1fc849259ec')
- build() {
- cd ${srcdir}/zarafa-${pkgver}
- msg "Starting build..."
- ./configure --prefix=/usr \
- --enable-oss \
- --disable-debug \
- --disable-perl \
- --disable-testtools \
- --disable-static \
- --with-userscript-prefix=/etc/zarafa/userscripts \
- --with-quotatemplate-prefix=/etc/zarafa/quotamails
- msg "Patching..."
- patch -Np2 < ../stdsoap2.cpp.patch || return 1
- patch -Np2 < ../ECKrbAuth.cpp.patch || return 1
- # make/g++ doesnt pick up -luuid properly without this... even though configure
- # finds it, and -luuid is present in the actual command that fails...
- make LDFLAGS="-luuid" || return 1
- make DESTDIR=${pkgdir} install || return 1
- # This isn't really a PEAR package... but Arch's default PHP config has open_basedir restrictions
- # and I doubt there will ever be a MAPI PEAR package to conflict, so one less thing user will have to do
- mv ${pkgdir}/usr/share/php ${pkgdir}/usr/share/pear
- # Finalize
- #install -o root -g root -D ${pkgdir}/usr/share/doc/zarafa/zarafa.logrotate ${pkgdir}/etc/logrotate.d/zarafa
- #install -o root -g zarafa -d ${pkgdir}/var/log/zarafa
- # contributed by archist
- install -o root -g root -D ${srcdir}/rc.zarafa-ical ${pkgdir}/etc/rc.d/zarafa-ical
- install -o root -g root -D ${srcdir}/rc.zarafa-server ${pkgdir}/etc/rc.d/zarafa-server
- # copy example configs to their active locations
- for cfg in ${pkgdir}/usr/share/doc/zarafa/example-config/*.cfg; do
- install -o root -g root -D ${cfg} ${pkgdir}/etc/zarafa
- done
- # edit cfg files for better initial defaults... maybe not Arch-like :( ...
- # /etc/zarafa/server.cfg
- sed -e "s/^\(run_as_\(user\|group\)\)\([ \\t]*=\).*$/\\1\\3 zarafa/" \
- -e "s/^\(mysql_\(user\|password\)\)\([ \\t]*=\).*$/\\1\\3 zarafa/" \
- -e "s/^\(enable_hosted_zarafa\)\([ \\t]*=\).*$/\\1\\2 true/" \
- -e "s/^\(loginname_format\)\([ \\t]*=\).*$/\\1\\2 %u@%c/" \
- -i ${pkgdir}/etc/zarafa/server.cfg
- #rmdir ${pkgdir}/usr/etc
- }