update Ubuntu packaging for Saucy
authorLars Kneschke <l.kneschke@metaways.de>
Sat, 19 Oct 2013 02:30:13 +0000 (04:30 +0200)
committerLars Kneschke <l.kneschke@metaways.de>
Sat, 19 Oct 2013 02:33:06 +0000 (04:33 +0200)
Change-Id: Ice7b7288b2ef3466c08c7126d6ed89428ee7699b
Reviewed-on: https://gerrit.tine20.org/tine20/2433
Reviewed-by: Lars Kneschke <l.kneschke@metaways.de>
Tested-by: Lars Kneschke <l.kneschke@metaways.de>
scripts/packaging/debian/control
scripts/packaging/debian/tine20-webstack.postinst
scripts/packaging/debian/tine20-webstack.postrm

index 4707c17..c1b89a0 100644 (file)
@@ -43,6 +43,7 @@ Depends: ${misc:Depends},
  php5-mcrypt, 
  php5-gd,
  php5-intl,
+ php5-json,
  makepasswd
 Recommends: mysql-client | postgresql-client (>= 9.1), php-apc | php5-apc
 Description: Tine 2.0 webserver integration package
index d6f0559..cb6a33c 100644 (file)
@@ -56,17 +56,30 @@ if [ "$1" = "configure" ]; then
                         fi 
                     fi
                 fi
-    
-                # create vhost configuration links
-                servers="apache2"
-                linkdestination_apache="../../tine20/apache.conf"
-                linkname="tine20"
-    
-                if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
-                    . /usr/share/wwwconfig-common/confd-link.sh
+                
+                # create Apache 2.x configuration links
+                if [ -d /etc/apache2/conf.d/ ]; then
+                    if [ ! -e /etc/apache2/conf.d/tine20 ]; then
+                        ln -s ../../tine20/apache.conf /etc/apache2/conf.d/tine20
+                    fi
+                    
+                elif [ -d /etc/apache2/conf-available ]; then
+                    if [ ! -e /etc/apache2/conf-available/tine20.conf ]; then
+                        ln -s ../../tine20/apache.conf /etc/apache2/conf-available/tine20.conf
+                    fi
+                    
+                    /usr/sbin/a2enconf tine20
                 fi
                 
+                #linkdestination_apache="../../tine20/apache.conf"
+                #linkname="tine20"
+                #
+                #if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
+                #    . /usr/share/wwwconfig-common/confd-link.sh
+                #fi
+                
                 # mark webserver for restart (used by restart.sh)
+                servers="apache2"
                 restart="$restart $webserver"
             
             fi
index 368ecf1..17c4df4 100644 (file)
@@ -42,7 +42,13 @@ if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
 
     case "$webserver" in
         apache2)
-            rm -f /etc/$webserver/conf.d/tine20
+            if [ -L /etc/$webserver/conf.d/tine20 ]; then
+                rm -f /etc/$webserver/conf.d/tine20
+                
+            elif [ -L /etc/$webserver/conf-available/tine20.conf ]; then
+                /usr/sbin/a2disconf tine20
+                rm -f /etc/$webserver/conf-available/tine20.conf
+            fi
             
             # mark webserver for restart (used by restart.sh)
             restart="$restart $webserver"