Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 20th, 2010  |  syntax: None  |  size: 2.94 KB  |  hits: 235  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: C Anthony Risinger
  2.  
  3. pkgname=zarafa-server
  4. pkgver=6.40.0
  5. pkgrel=1
  6. pkgdesc="Open Source Groupware Solution"
  7. arch=('i686' 'x86_64')
  8. url="http://www.zarafa.com/"
  9. license=('AGPL')
  10. depends=('libical>=0.40'
  11.          'libvmime=0.7.1'
  12.          'libmysqlclient'
  13.          'libxml2'
  14.          'libldap'
  15.          'heimdal')
  16. makedepends=('php>=5.2.0'
  17.              'e2fsprogs')
  18. optdepends=('zarafa-webaccess-ajax: AJAX based web-interface')
  19. backup=('etc/zarafa/server.cfg')
  20. install=${pkgname}.install
  21. source=("zarafa-${pkgver}.tar.gz::http://download.zarafa.com/zarafa/drupal/ondemand.php?version=${pkgver}&src=zarafa-${pkgver}"
  22.         "rc.zarafa-ical"
  23.         "rc.zarafa-server"
  24.         "stdsoap2.cpp.patch"
  25.         "ECKrbAuth.cpp.patch")
  26. noextract=()
  27. md5sums=('389d195eb7659ccd05769208686e4b0d'
  28.          '44d98735e4806e0ed1b8e62931d42eee'
  29.          '4a2337e721e6579d012243f990a06252'
  30.          '55c78ae5e64632ce89269a29113ddfa2'
  31.          '7b95e9ee64f6158fcf90d1fc849259ec')
  32. build() {
  33.  
  34.   cd ${srcdir}/zarafa-${pkgver}
  35.  
  36.   msg "Starting build..."
  37.   ./configure --prefix=/usr \
  38.     --enable-oss \
  39.     --disable-debug \
  40.     --disable-perl \
  41.     --disable-testtools \
  42.     --disable-static \
  43.     --with-userscript-prefix=/etc/zarafa/userscripts \
  44.     --with-quotatemplate-prefix=/etc/zarafa/quotamails
  45.  
  46.   msg "Patching..."
  47.   patch -Np2 < ../stdsoap2.cpp.patch || return 1
  48.   patch -Np2 < ../ECKrbAuth.cpp.patch || return 1
  49.  
  50.   # make/g++ doesnt pick up -luuid properly without this... even though configure
  51.   # finds it, and -luuid is present in the actual command that fails...
  52.   make LDFLAGS="-luuid" || return 1
  53.   make DESTDIR=${pkgdir} install || return 1
  54.  
  55.   # This isn't really a PEAR package... but Arch's default PHP config has open_basedir restrictions
  56.   # and I doubt there will ever be a MAPI PEAR package to conflict, so one less thing user will have to do
  57.   mv ${pkgdir}/usr/share/php ${pkgdir}/usr/share/pear
  58.  
  59.   # Finalize
  60.   #install -o root -g root -D ${pkgdir}/usr/share/doc/zarafa/zarafa.logrotate ${pkgdir}/etc/logrotate.d/zarafa
  61.   #install -o root -g zarafa -d ${pkgdir}/var/log/zarafa
  62.  
  63.   # contributed by archist
  64.   install -o root -g root -D ${srcdir}/rc.zarafa-ical ${pkgdir}/etc/rc.d/zarafa-ical
  65.   install -o root -g root -D ${srcdir}/rc.zarafa-server ${pkgdir}/etc/rc.d/zarafa-server
  66.  
  67.   # copy example configs to their active locations
  68.   for cfg in ${pkgdir}/usr/share/doc/zarafa/example-config/*.cfg; do
  69.     install -o root -g root -D ${cfg} ${pkgdir}/etc/zarafa
  70.   done
  71.  
  72.   # edit cfg files for better initial defaults... maybe not Arch-like :( ...
  73.   # /etc/zarafa/server.cfg
  74.   sed -e "s/^\(run_as_\(user\|group\)\)\([ \\t]*=\).*$/\\1\\3 zarafa/" \
  75.       -e "s/^\(mysql_\(user\|password\)\)\([ \\t]*=\).*$/\\1\\3 zarafa/" \
  76.       -e "s/^\(enable_hosted_zarafa\)\([ \\t]*=\).*$/\\1\\2 true/" \
  77.       -e "s/^\(loginname_format\)\([ \\t]*=\).*$/\\1\\2 %u@%c/" \
  78.   -i ${pkgdir}/etc/zarafa/server.cfg
  79.  
  80.   #rmdir ${pkgdir}/usr/etc
  81.  
  82. }