chiark / gitweb /
Merge from disorder.4.0
authorRichard Kettlewell <rjk@greenend.org.uk>
Mon, 9 Jun 2008 07:37:10 +0000 (08:37 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Mon, 9 Jun 2008 07:37:10 +0000 (08:37 +0100)
CHANGES.html
README
cgi/Makefile.am
configure.ac
debian/rules

index d090beb7a1579fc679ba1c5fe41099fb44e760ab..b0f27e05847393dea720ef36c54206b287c2ce51 100644 (file)
@@ -57,6 +57,16 @@ span.command {
 
 <p>This file documents recent user-visible changes to DisOrder.</p>
 
+<h2>Changes up to version 4.0.1</h2>
+
+<div class=section>
+
+  <p>Libtool and Automake now install the CGI correctly.  As part of this,
+  <tt>cgidir</tt> has been renamed to <tt>cgiexecdir</tt>.  The configure
+  script will report an error if you try to use the old name.</p>
+  
+</div>
+
 <h2>Changes up to version 4.0</h2>
 
 <div class=section>
diff --git a/README b/README
index 91a78976a990dd28b316896e9ff5c4d5db47327d..c00580ba24ea275ca8e2a7065f118263b9a3a74d 100644 (file)
--- a/README
+++ b/README
@@ -91,7 +91,7 @@ platform, please get in touch.
    If configure cannot guess where your web server keeps its HTML documents and
    CGI programs, you may have to tell it, for instance:
 
-     ./configure cgidir=/whatever/cgi-bin httpdir=/whatever/htdocs
+     ./configure cgiexecdir=/whatever/cgi-bin httpdir=/whatever/htdocs
 
    See README.client for setting up a standalone client (or read the
    disobedience man page).
index e2fa8955e7061ac90b3cec5274dea8d3d83edf9a..72ea195a8acfa55827498d2276ab9b351db6464f 100644 (file)
@@ -18,7 +18,7 @@
 # USA
 #
 
-cgi_PROGRAMS=disorder
+cgiexec_PROGRAMS=disorder
 
 AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
 
@@ -28,3 +28,6 @@ disorder_LDADD=../lib/libdisorder.a \
        $(LIBPCRE) $(LIBGCRYPT) $(LIBDL) $(LIBDB)
 disorder_LDFLAGS=-export-dynamic
 disorder_DEPENDENCIES=../lib/libdisorder.a
+
+install-exec-hook:
+       $(LIBTOOL) --mode=finish $(DESTDIR)$(cgiexecdir)
index d1895dc1607fb9370339ef8c0c17a0231bf4f935..03ba3844c58fafdfe9a44caaf05b33a9285742fc 100644 (file)
@@ -219,14 +219,18 @@ if test $want_cgi = yes; then
         fi
       done
     ])
-    if test "$rjk_cv_cgidir" = "not found"; then
+    if test "$rjk_cv_cgiexecdir" = "not found"; then
       AC_MSG_ERROR([cannot identify httpd documentroot.  Set httpdir on configure command line])
     fi
     httpdir="$rjk_cv_httpdir"
   fi
-  if test -z "$cgidir"; then
-    AC_CACHE_CHECK([for CGI directory],[rjk_cv_cgidir],[
-      rjk_cv_cgidir="not found"
+  if test ! -z "$cgidir"; then
+    # This is a bit harsh but should stop any disasters
+    AC_MSG_ERROR([cgidir has been renamed to cgiexecdir])
+  fi
+  if test -z "$cgiexecdir"; then
+    AC_CACHE_CHECK([for CGI directory],[rjk_cv_cgiexecdir],[
+      rjk_cv_cgiexecdir="not found"
       for dir in /usr/lib/cgi-bin \
                  /Library/WebServer/CGI-Executables \
                  /srv/www/cgi-bin \
@@ -237,18 +241,18 @@ if test $want_cgi = yes; then
                  /usr/local/www/cgi-bin \
                  /usr/local/www/*/cgi-bin; do
         if test -d "$dir"; then
-          rjk_cv_cgidir="$dir"
+          rjk_cv_cgiexecdir="$dir"
           break
         fi
       done
     ])
-    if test "$rjk_cv_cgidir" = "not found"; then
-      AC_MSG_ERROR([cannot identify CGI install directory.  Set cgidir on configure command line])
+    if test "$rjk_cv_cgiexecdir" = "not found"; then
+      AC_MSG_ERROR([cannot identify CGI install directory.  Set cgiexecdir on configure command line])
     fi
-    cgidir="$rjk_cv_cgidir"
+    cgiexecdir="$rjk_cv_cgiexecdir"
   fi
 fi
-AC_ARG_VAR([cgidir], [location of cgi-bin directory, e.g. /usr/lib/cgi-bin])
+AC_ARG_VAR([cgiexecdir], [location of cgi-bin directory, e.g. /usr/lib/cgi-bin])
 AC_ARG_VAR([httpdir], [location of http document root, e.g. /var/www/htdocs])
 if test -z "$pkghttpdir"; then
   pkghttpdir='$(httpdir)/disorder'
index 000be812d5b9e782db6bc4641d6c3e750b85bbab..113f9893c05225c4bb934b8ae3628327e8ecf2ba 100755 (executable)
 # USA
 #
 
-cgidir=/usr/lib/cgi-bin
+cgiexecdir=/usr/lib/cgi-bin
 httpdir=/var/www
 browser=x-www-browser
 
 # Options to configure.  This can be overridden by the caller if necessary.
-CONFIGURE=--prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --mandir=/usr/share/man --with-browser=$browser cgidir="${cgidir}" httpdir="${httpdir}"
+CONFIGURE=--prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --mandir=/usr/share/man --with-browser=$browser cgiexecdir="${cgiexecdir}" httpdir="${httpdir}"
 
 # Set DEB_BUILD_OPTIONS=noopt to produce a non-optimized build.
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -149,7 +149,7 @@ pkg-disorder-server: build
        rm -f debian/disorder-server/usr/share/man/man5/disorder_protocol.5
        $(MKDIR) debian/disorder-server/etc/disorder
        $(MKDIR) debian/disorder-server/etc/init.d
-       $(MKDIR) debian/disorder-server/usr/lib/cgi-bin
+       $(MKDIR) debian/disorder-server${cgiexecdir}
        $(MKDIR) debian/disorder-server/var/lib/disorder
        $(INSTALL_SCRIPT) examples/disorder.init \
                debian/disorder-server/etc/init.d/disorder
@@ -160,9 +160,9 @@ pkg-disorder-server: build
        $(INSTALL_DATA) debian/etc.disorder.options.user \
                debian/disorder-server/etc/disorder/options.user
        $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) cgi/disorder \
-               $(shell pwd)/debian/disorder-server/usr/lib/cgi-bin/disorder
+               $(shell pwd)/debian/disorder-server${cgiexecdir}/disorder
        dpkg-shlibdeps -Tdebian/substvars.disorder-server \
-               debian/disorder-server/usr/lib/cgi-bin/disorder \
+               debian/disorder-server${cgiexecdir}/disorder \
                debian/disorder-server/usr/sbin/* \
                debian/disorder-server/usr/lib/disorder/*.so*
        rm -rf debian/disorder-server/usr/share/doc/disorder-server