From 5bc20f5351e70e33a71d699a23a5fc6e245d5745 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 6 Jan 2015 12:56:18 +0100 Subject: [PATCH] Pazpar2-js no longer requires Apache2 PAZ-989 Package pazpar2-apache2 sets up everything WRT apache and only package which requires it. pazpar2-apache depends on pazpar2-js. --- debian/control | 7 +++---- debian/pazpar2-apache2.postinst | 4 ++++ debian/pazpar2-js.postinst | 24 ------------------------ debian/pazpar2-js.postrm | 32 -------------------------------- 4 files changed, 7 insertions(+), 60 deletions(-) delete mode 100644 debian/pazpar2-js.postinst delete mode 100644 debian/pazpar2-js.postrm diff --git a/debian/control b/debian/control index 507358c..c50b234 100644 --- a/debian/control +++ b/debian/control @@ -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 diff --git a/debian/pazpar2-apache2.postinst b/debian/pazpar2-apache2.postinst index 6c4f18b..29a837a 100644 --- a/debian/pazpar2-apache2.postinst +++ b/debian/pazpar2-apache2.postinst @@ -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 index 2e91299..0000000 --- a/debian/pazpar2-js.postinst +++ /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 index cbfc288..0000000 --- a/debian/pazpar2-js.postrm +++ /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 - -- 1.7.10.4