Pazpar2-js no longer requires Apache2 PAZ-989
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 6 Jan 2015 11:56:18 +0000 (12:56 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 6 Jan 2015 12:05:10 +0000 (13:05 +0100)
Package pazpar2-apache2 sets up everything WRT apache and only
package which requires it. pazpar2-apache depends on pazpar2-js.

debian/control
debian/pazpar2-apache2.postinst
debian/pazpar2-js.postinst [deleted file]
debian/pazpar2-js.postrm [deleted file]

index 507358c..c50b234 100644 (file)
@@ -33,7 +33,6 @@ Description: debugging symbols for Pazpar2
 
 Package: pazpar2-js
 Architecture: all
-Depends: apache2.2-common
 Description: Java Script utilities
  Pazpar2 is a high-performance, user interface-independent, data
  model-independent metasearching middleware featuring merging, relevance
@@ -65,7 +64,7 @@ Description: Documentation for Pazpar2 metasearcher
 
 Package: pazpar2-apache2
 Architecture: all
-Depends: pazpar2, apache2
+Depends: pazpar2, apache2, pazpar2-js
 Description: Apache2 configuration for Pazpar2
  Pazpar2 is a high-performance, user interface-independent, data
  model-independent metasearching middleware featuring merging, relevance
@@ -76,7 +75,7 @@ Description: Apache2 configuration for Pazpar2
 
 Package: pazpar2-test1
 Architecture: all
-Depends: pazpar2-apache2, pazpar2-js
+Depends: pazpar2-apache2
 Description: Pazpar2 portal test1
  Pazpar2 is a high-performance, user interface-independent, data
  model-independent metasearching middleware featuring merging, relevance
@@ -88,7 +87,7 @@ Description: Pazpar2 portal test1
 
 Package: pazpar2-jsdemo
 Architecture: all
-Depends: pazpar2-apache2, pazpar2-js
+Depends: pazpar2-apache2
 Description: Pazpar2 demo using the pz2.js library
  Pazpar2 is a high-performance, user interface-independent, data
  model-independent metasearching middleware featuring merging, relevance
index 6c4f18b..29a837a 100644 (file)
@@ -15,6 +15,10 @@ reload_apache()
 }
 
 if [ -e /etc/apache2/apache2.conf ]; then
+    if [ -d /etc/apache2/conf.d ]; then
+       ln -sf /etc/pazpar2/ap2pazpar2-js.cfg /etc/apache2/conf.d/pazpar2-js
+    fi
+
     if [ ! -f /etc/apache2/mods-enabled/proxy_http.load ]; then
        a2enmod proxy_http || true
     fi
diff --git a/debian/pazpar2-js.postinst b/debian/pazpar2-js.postinst
deleted file mode 100644 (file)
index 2e91299..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ "$1" != "configure" ]; then
-    exit 0
-fi
-
-reload_apache()
-{
-    if apache2ctl configtest 2>/dev/null; then
-       invoke-rc.d apache2 force-reload || true
-    else
-       echo "Your apache2 configuration is broken, so we're not restarting it for you."
-    fi
-}
-
-if [ -e /etc/apache2/apache2.conf ]; then
-    if [ -d /etc/apache2/conf.d ]; then
-       ln -sf /etc/pazpar2/ap2pazpar2-js.cfg /etc/apache2/conf.d/pazpar2-js
-    fi
-    
-    reload_apache
-fi
-exit 0
diff --git a/debian/pazpar2-js.postrm b/debian/pazpar2-js.postrm
deleted file mode 100644 (file)
index cbfc288..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh -e
-
-case "$1" in
-    purge|remove)
-        WEBSERVERS="apache2"
-        for apache in $WEBSERVERS; do
-            if [ -f "/etc/$apache/conf.d/pazpar2-js" ]; then
-                echo "Removing pazpar2-js configuration file for $apache.."
-                rm -f /etc/$apache/conf.d/pazpar2-js
-                if [ -f "/var/run/$apache.pid" ]; then
-                    invoke-rc.d $apache reload
-                fi
-            fi
-        done
-        ;;
-    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-        ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-esac
-
-
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
-