# Maintainer: Pierrick Le Brun pkgname=zarafa-webapp pkgver=1.1 pkgrel=1plb arch=noarch source=(http://download.zarafa.com/community/final/WebApp/1.1/webapp-1.1.svn35292.tar.gz) sourcetemplate=http://people.salixos.org/akuna/packaging/$pkgname/$pkgver/ dotnew=('etc/zarafa/webapp/config.php') options=('noautodotnew') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "zarafa-webapp (Zarafa new web interface)" "New and improved WebApp for the Zarafa Collaboration Platform." "Provides a web-client written in PHP that makes use of Jason and ExtJS" "to allow users to make full use of the Zarafa Collaboration Platform" "through a modern web browser." ) build() { docdir=webapp confdir=etc/zarafa/webapp apachedir=etc/httpd/extra docroot=var/www/htdocs phpuser=root phpgroup=apache srcdir=src/webapp-1.1.svn35292 # Prepare directories along with permissions cd $startdir/$srcdir install -d -m 755 $startdir/pkg/$confdir install -d -m 755 $startdir/pkg/$apachedir install -d -m 755 $startdir/pkg/$docroot/$docdir install -d -m 755 -o $phpuser -g $phpgroup $startdir/pkg/var/lib/$pkgname/tmp chmod g+w $startdir/pkg/var/lib/$pkgname/tmp # Generate deployment & copy it to target ant deploy ant deploy-plugins cp -a deploy/* deploy/.htaccess $startdir/pkg/$docroot/$docdir # Cleanup files & links sed -i $startdir/pkg/$docroot/$docdir/zarafa-webapp.conf -e 's|/usr/share/zarafa-webapp|var/www/htdocs/webapp|g' mv $startdir/pkg/$docroot/$docdir/zarafa-webapp.conf $startdir/pkg/$apachedir for i in $(find $startdir/pkg/$docroot/$docdir/ -maxdepth 1 -type f \! -name '*.php*' | grep -v htaccess); do rm $i done for i in $(find $startdir/pkg/$docroot/$docdir/ -name \*debug\*); do rm $i done mv $startdir/pkg/$docroot/$docdir/config.php.dist $startdir/pkg/$confdir/config.php cd $startdir/pkg/$docroot/$docdir ln -s ../../../../$confdir/config.php config.php }