summaryrefslogtreecommitdiff
path: root/network/zarafa-webaccess-ajax/zarafa-webaccess-ajax.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/zarafa-webaccess-ajax/zarafa-webaccess-ajax.SlackBuild')
-rw-r--r--network/zarafa-webaccess-ajax/zarafa-webaccess-ajax.SlackBuild25
1 files changed, 19 insertions, 6 deletions
diff --git a/network/zarafa-webaccess-ajax/zarafa-webaccess-ajax.SlackBuild b/network/zarafa-webaccess-ajax/zarafa-webaccess-ajax.SlackBuild
index a7277db9f7..37b84a9456 100644
--- a/network/zarafa-webaccess-ajax/zarafa-webaccess-ajax.SlackBuild
+++ b/network/zarafa-webaccess-ajax/zarafa-webaccess-ajax.SlackBuild
@@ -4,10 +4,10 @@
# Ajax-based solution for webaccess to zarafa
# Written by Niels Horn <niels.horn@gmail.com>
-# revision date 2010/05/28
+# revision date 2010/09/07
PRGNAM=zarafa-webaccess-ajax
-VERSION=${VERSION:-6.30.14}
+VERSION=${VERSION:-6.40.2}
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -17,6 +17,13 @@ DOCDIR=${DOCDIR:-webaccess}
PHPUSER=${PHPUSER:-root}
PHPGROUP=${PHPGROUP:-apache}
+# To create valid symlinks, we need a relative path from DOCROOT
+RELPATH=""
+for i in $(echo $DOCROOT | tr "/" " "); do
+ RELPATH="${RELPATH}../"
+done
+
+SRCNAM=zarafa
UNTARDIR=php-webclient-ajax
CONFDIR=etc/zarafa
@@ -27,11 +34,11 @@ OUTPUT=${OUTPUT:-/tmp}
set -e
-rm -rf $TMP/$UNTARDIR $PKG
+rm -rf $TMP/$SRCNAM-$VERSION $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $UNTARDIR
+tar --wildcards -xvf $CWD/$SRCNAM-$VERSION.tar.gz $SRCNAM-$VERSION/$UNTARDIR/*
+cd $SRCNAM-$VERSION/$UNTARDIR
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -47,7 +54,13 @@ mv $PKG/$DOCROOT/$DOCDIR/config.php.dist $PKG/$CONFDIR/config.php.new
chown root:$PHPGROUP $PKG/$CONFDIR/config.php.new
chmod 640 $PKG/$CONFDIR/config.php.new
-( cd $PKG/$DOCROOT/$DOCDIR ; ln -s /$CONFDIR/config.php )
+# Create tmp dir
+mkdir -p $PKG/var/lib/zarafa-webaccess/tmp
+chown $PHPUSER:$PHPGROUP $PKG/var/lib/zarafa-webaccess/tmp
+
+cd $PKG/$DOCROOT/$DOCDIR
+ ln -s ../${RELPATH}$CONFDIR/config.php config.php
+cd -
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild