updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / zarafa-server / PKGBUILD
blob7cf1ff44fcdc1b72c3fdcd0695c41e607d4d0ee0
1 # Contributor: C Anthony Risinger
3 pkgname=zarafa-server
4 pkgver=7.0.2
5 pkgrel=29470
6 pkgdesc="Open Source Groupware Solution"
7 arch=('i686' 'x86_64')
8 url="http://www.zarafa.com/"
9 license=('AGPL3')
10 depends=('libical>=0.40'
11          'zarafa-libvmime=602'
12          'mysql'
13          'curl'
14          'libxml2'
15          'openssl'
16          'openldap'
17          'heimdal')
18 makedepends=('php>=5.2.0'
19              'e2fsprogs'
20              'openldap')
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"
25         "rc.zarafa-ical"
26         "rc.zarafa-server")
27 noextract=()
28 md5sums=('9a0604a9b769057941a1e83781134176'
29          '44d98735e4806e0ed1b8e62931d42eee'
30          '4a2337e721e6579d012243f990a06252')
32 build() {
34   cd ${srcdir}/zarafa-${pkgver}
36   msg "Starting build..."
37   ./configure --prefix=/usr \
38     --enable-oss \
39     --disable-debug \
40     --disable-perl \
41     --disable-python \
42     --disable-testtools \
43     --disable-static \
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
58   # Finalize
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
68   done
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