1 # Contributor: C Anthony Risinger
6 pkgdesc="Open Source Groupware Solution"
8 url="http://www.zarafa.com/"
10 depends=('libical>=0.40'
18 makedepends=('php>=5.2.0'
21 optdepends=('zarafa-webaccess-ajax: AJAX based web-interface')
22 backup=('etc/zarafa/server.cfg')
23 install=${pkgname}.install
24 source=("zarafa-${pkgver}.tar.gz::http://download.zarafa.com/community/final/7.0/${pkgver}-${pkgrel}/sourcecode/zcp-${pkgver}.tar.gz"
28 md5sums=('9a0604a9b769057941a1e83781134176'
29 '44d98735e4806e0ed1b8e62931d42eee'
30 '4a2337e721e6579d012243f990a06252')
34 cd ${srcdir}/zarafa-${pkgver}
36 msg "Starting build..."
37 ./configure --prefix=/usr \
44 --with-userscript-prefix=/etc/zarafa/userscripts \
45 --with-quotatemplate-prefix=/etc/zarafa/quotamails \
46 --with-sysconfdir=/etc
48 # --with-vmime-prefix=/home/steffen/vmime/pkg/usr/include
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 # This isn't really a PEAR package... but Arch's default PHP config has open_basedir restrictions
55 # and I doubt there will ever be a MAPI PEAR package to conflict, so one less thing user will have to do
56 mv ${pkgdir}/usr/share/php ${pkgdir}/usr/share/pear
59 install -o root -g zarafa -d ${pkgdir}/var/log/zarafa
61 # contributed by archist
62 install -o root -g root -D ${srcdir}/rc.zarafa-ical ${pkgdir}/etc/rc.d/zarafa-ical
63 install -o root -g root -D ${srcdir}/rc.zarafa-server ${pkgdir}/etc/rc.d/zarafa-server
65 # copy example configs to their active locations
66 for cfg in ${pkgdir}/usr/share/doc/zarafa/example-config/*.cfg; do
67 install -o root -g root -D ${cfg} ${pkgdir}/etc/zarafa
70 mkdir -p ${pkgdir}/etc/httpd/conf/extra/
71 install ${srcdir}/zarafa-${pkgver}/php-webclient-ajax/zarafa-webaccess.conf ${pkgdir}/etc/httpd/conf/extra/zarafa-webaccess.conf
72 install ${srcdir}/zarafa-${pkgver}/php-mobile-webaccess/zarafa-webaccess-mobile.conf ${pkgdir}/etc/httpd/conf/extra/zarafa-webaccess-mobile.conf
74 mkdir -p ${pkgdir}/usr/share/zarafa-webaccess/
75 install -d ${pkgdir}/usr/share/zarafa-webaccess/
76 cp -r ${srcdir}/zarafa-${pkgver}/php-webclient-ajax/* ${pkgdir}/usr/share/zarafa-webaccess/
77 mv ${pkgdir}/usr/share/zarafa-webaccess/config.php.dist ${pkgdir}/usr/share/zarafa-webaccess/config.php
78 sed -i 's$/usr/share/php/$/usr/share/pear/$' ${pkgdir}/usr/share/zarafa-webaccess/config.php
79 mkdir -p ${pkgdir}/usr/share/zarafa-webaccess-mobile/
80 install -d ${pkgdir}/usr/share/zarafa-mobile-webaccess/
81 cp -r ${srcdir}/zarafa-${pkgver}/php-mobile-webaccess/* ${pkgdir}/usr/share/zarafa-mobile-webaccess/
83 # edit cfg files for better initial defaults... maybe not Arch-like :( ...
84 # /etc/zarafa/server.cfg
85 # sed -e "s/^\(run_as_\(user\|group\)\)\([ \\t]*=\).*$/\\1\\3 zarafa/" \
86 # -e "s/^\(mysql_\(user\|password\)\)\([ \\t]*=\).*$/\\1\\3 zarafa/" \
87 # -e "s/^\(enable_hosted_zarafa\)\([ \\t]*=\).*$/\\1\\2 true/" \
88 # -e "s/^\(loginname_format\)\([ \\t]*=\).*$/\\1\\2 %u@%c/" \
89 # -i ${pkgdir}/etc/zarafa/server.cfg
91 # rmdir ${pkgdir}/usr/etc