From e709c597b12450d07d225419f6d08e8d3d295820 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 20 Jun 2007 19:27:18 +0000 Subject: [PATCH] Put files for Debian package pazpar2-test1 and pazpar2-jsdemo in /usr/share/pazpar2/test1 and /usr/share/pazpar2/jsdemo respectively. This makes our package only use one Apache2 config rather than one for each UI. The ProxyPass rule(s) are only specified in pazpar2-apache2. --- debian/ap2jsdemo.cfg | 4 ---- debian/ap2pazpar2.cfg | 5 +++++ debian/ap2test1.cfg | 4 ---- debian/control | 4 ++-- debian/pazpar2-jsdemo.dirs | 3 +-- debian/pazpar2-test1.dirs | 3 +-- debian/rules | 10 ++++------ www/test1/search.js | 16 ++++++++-------- 8 files changed, 21 insertions(+), 28 deletions(-) delete mode 100644 debian/ap2jsdemo.cfg delete mode 100644 debian/ap2test1.cfg diff --git a/debian/ap2jsdemo.cfg b/debian/ap2jsdemo.cfg deleted file mode 100644 index 4878bff..0000000 --- a/debian/ap2jsdemo.cfg +++ /dev/null @@ -1,4 +0,0 @@ -Alias /pazpar2-jsdemo /usr/share/pazpar2-jsdemo/ - -ProxyPass /pazpar2-jsdemo/search.pz2 http://localhost:8004/search.pz2 - diff --git a/debian/ap2pazpar2.cfg b/debian/ap2pazpar2.cfg index 7c38f45..7d4da9d 100644 --- a/debian/ap2pazpar2.cfg +++ b/debian/ap2pazpar2.cfg @@ -6,6 +6,11 @@ ProxyVia Off +ProxyPass /pazpar2/search.pz2 http://localhost:8004/search.pz2 + +# for jsdemo (this should be configurable in pz2.js later). +ProxyPass /pazpar2/jsdemo/search.pz2 http://localhost:8004/search.pz2 + Alias /pazpar2 /usr/share/pazpar2/ diff --git a/debian/ap2test1.cfg b/debian/ap2test1.cfg deleted file mode 100644 index 11686b1..0000000 --- a/debian/ap2test1.cfg +++ /dev/null @@ -1,4 +0,0 @@ -Alias /pazpar2-test1 /usr/share/pazpar2-test1/ - -ProxyPass /pazpar2-test1/search.pz2 http://localhost:8004/search.pz2 - diff --git a/debian/control b/debian/control index 25ecdc6..25ab2ef 100644 --- a/debian/control +++ b/debian/control @@ -48,7 +48,7 @@ Description: Pazpar2 portal test1 . This is a simple metasearch interface using Pazpar2 that is using Apache2 as frontend HTTP server. When installed, this service is - available at http://host/pazpar2-test1/ . + available at http://host/pazpar2/test1/ . Package: pazpar2-jsdemo Architecture: all @@ -59,4 +59,4 @@ Description: Pazpar2 demo using the pz2.js library ranking, record sorting, and faceted results. . This is a metasearch interface using Pazpar2 JavaScript library pz2.js - library. Is available at http://host/pazpar2-jsdemo/ . + library. Is available at http://host/pazpar2/jsdemo/ . diff --git a/debian/pazpar2-jsdemo.dirs b/debian/pazpar2-jsdemo.dirs index b09f3ea..6a600dd 100644 --- a/debian/pazpar2-jsdemo.dirs +++ b/debian/pazpar2-jsdemo.dirs @@ -1,2 +1 @@ -etc/apache2/conf.d -usr/share/pazpar2-jsdemo +usr/share/pazpar2/jsdemo diff --git a/debian/pazpar2-test1.dirs b/debian/pazpar2-test1.dirs index 90980f1..72efcc7 100644 --- a/debian/pazpar2-test1.dirs +++ b/debian/pazpar2-test1.dirs @@ -1,2 +1 @@ -etc/apache2/conf.d -usr/share/pazpar2-test1 +usr/share/pazpar2/test1 diff --git a/debian/rules b/debian/rules index afc57d3..1068b5a 100755 --- a/debian/rules +++ b/debian/rules @@ -83,13 +83,11 @@ binary-arch: build install cp etc/*.xsl $(CURDIR)/debian/pazpar2/etc/pazpar2/ cp $(CURDIR)/debian/ap2pazpar2.cfg $(CURDIR)/debian/pazpar2-apache2/etc/apache2/conf.d # pazpar2-test1 package - cp www/test1/index.html $(CURDIR)/debian/pazpar2-test1/usr/share/pazpar2-test1/ - cp www/test1/search.js $(CURDIR)/debian/pazpar2-test1/usr/share/pazpar2-test1/ - cp $(CURDIR)/debian/ap2test1.cfg $(CURDIR)/debian/pazpar2-test1/etc/apache2/conf.d + cp www/test1/index.html $(CURDIR)/debian/pazpar2-test1/usr/share/pazpar2/test1/ + cp www/test1/search.js $(CURDIR)/debian/pazpar2-test1/usr/share/pazpar2/test1/ # pazpar2-jsdemo package - cp www/jsdemo/*.html $(CURDIR)/debian/pazpar2-jsdemo/usr/share/pazpar2-jsdemo/ - cp www/jsdemo/*.js $(CURDIR)/debian/pazpar2-jsdemo/usr/share/pazpar2-jsdemo/ - cp $(CURDIR)/debian/ap2jsdemo.cfg $(CURDIR)/debian/pazpar2-jsdemo/etc/apache2/conf.d + cp www/jsdemo/*.html $(CURDIR)/debian/pazpar2-jsdemo/usr/share/pazpar2/jsdemo/ + cp www/jsdemo/*.js $(CURDIR)/debian/pazpar2-jsdemo/usr/share/pazpar2/jsdemo/ dh_installchangelogs NEWS dh_installdocs dh_installexamples diff --git a/www/test1/search.js b/www/test1/search.js index 6aace33..e1b3b24 100644 --- a/www/test1/search.js +++ b/www/test1/search.js @@ -1,4 +1,4 @@ -/* $Id: search.js,v 1.13 2007-06-19 12:50:02 adam Exp $ +/* $Id: search.js,v 1.14 2007-06-20 19:27:18 adam Exp $ * --------------------------------------------------- * Javascript container */ @@ -65,7 +65,7 @@ function session_started() function start_session() { xinitSession = GetXmlHttpObject(); - var url="search.pz2?"; + var url="/pazpar2/search.pz2?"; url += "command=init"; xinitSession.onreadystatechange=session_started; xinitSession.open("GET", url); @@ -78,7 +78,7 @@ function ping_session() { if (!session) return; - var url = "search.pz2?command=ping&session=" + session; + var url = "/pazpar2/search.pz2?command=ping&session=" + session; SendXmlHttpObject(xpingSession = GetXmlHttpObject(), url, session_pinged); } @@ -126,7 +126,7 @@ function load_targets() alert("Please enter a target definition file name"); return; } - var url="search.pz2?" + + var url="/pazpar2/search.pz2?" + "command=load" + "&session=" + session + "&name=" + fn; @@ -207,7 +207,7 @@ function show_records() function check_search() { clearTimeout(searchtimer); - var url = "search.pz2?" + + var url = "/pazpar2/search.pz2?" + "command=show" + "&start=" + document.search.startrec.value + "&num=" + recstoshow + @@ -297,7 +297,7 @@ function show_termlist() function check_termlist() { - var url = "search.pz2?" + + var url = "/pazpar2/search.pz2?" + "command=termlist" + "&session=" + session + "&num=20" + @@ -343,7 +343,7 @@ function show_stat() function check_stat() { - var url = "search.pz2?" + + var url = "/pazpar2/search.pz2?" + "command=stat" + "&session=" + session; xstat = GetXmlHttpObject(); @@ -385,7 +385,7 @@ function start_search() return; } var query = escape(document.getElementById('query').value); - var url = "search.pz2?" + + var url = "/pazpar2/search.pz2?" + "command=search" + "&session=" + session + "&query=" + query; -- 1.7.10.4