server/disorder-dump
server/disorder-rescan
server/disorder-speaker
-cgi/disorder.cgi
+cgi/disorder
server/disorderd
server/trackname
sounds/Makefile
<p>Mail is now sent via the system sendmail program, though it remains
possible to use TCP to connect to an SMTP server. See <tt>sendmail</tt> and
<tt>smtp_server</tt> in disorder_config(5).</p>
+
+ <p>The makefiles will now install the CGI automatically. If they cannot
+ figure out the location of the cgi-bin directory on your system, set
+ <tt>cgidir</tt> on the <tt>configure</tt> command line.</p>
</div>
<!--
Local Variables:
fill-column:79
+indent-tabs-mode:nil
End:
-->
--without-gtk Don't build GTK+ client (Disobedience)
--without-python Don't build Python support
+ If configure cannot figure out where your CGI programs live, you must set
+ cgidir on the command line, e.g.:
+
+ ./configure cgidir=/whatever/cgi-bin
+
See README.client for setting up a standalone client (or read the
disobedience man page).
make installdirs install
- The CGI interface has to be installed separately; see under 'Web Interface'
- below.
-
NB steps 3 to 6 are covered by scripts/setup. It should work on FreeBSD, OS
X and Linux and could be adapted to other platforms.
cd /var/www
ln -s /usr/local/share/disorder/static disorder
-4. Install disorder.cgi in an appropriate location. Remember to make it
- executable. Example:
-
- install -m 755 cgi/disorder.cgi /usr/lib/cgi-bin/disorder
-
-5. Try it out. You should be able to perform read-only operations straight
+4. Try it out. You should be able to perform read-only operations straight
away, and after visiting the 'Login' page to authenticate, perform other
operations like adding a track to the queue.
-6. If you run into problems, always look at the appropriate error log; the
+5. If you run into problems, always look at the appropriate error log; the
message you see in your web browser will usually not be sufficient to
diagnose the problem all by itself.
-7. If you have a huge number of top level directories, then you might find
+6. If you have a huge number of top level directories, then you might find
that the 'Choose' page is unreasonably large. If so add the following line
to /etc/disorder/options.user:
label sidebar.choosewhich choosealpha
# USA
#
-noinst_PROGRAMS=disorder.cgi
+cgi_PROGRAMS=disorder
AM_CPPFLAGS=-I${top_srcdir}/lib -I../lib
-disorder_cgi_SOURCES=macros-disorder.c lookup.c options.c actions.c \
+disorder_SOURCES=macros-disorder.c lookup.c options.c actions.c \
login.c cgimain.c disorder-cgi.h
-disorder_cgi_LDADD=../lib/libdisorder.a \
+disorder_LDADD=../lib/libdisorder.a \
$(LIBPCRE) $(LIBGCRYPT) $(LIBDL) $(LIBDB)
-disorder_cgi_LDFLAGS=-export-dynamic
-disorder_cgi_DEPENDENCIES=../lib/libdisorder.a
-
-cgi.o: ../lib/definitions.h
+disorder_LDFLAGS=-export-dynamic
+disorder_DEPENDENCIES=../lib/libdisorder.a
want_gtk=yes
want_python=yes
want_tests=yes
+want_server=yes
+want_cgi=yes
# APIs we want
want_alsa=yes
AC_CHECK_LIB([gpg-error], [gpg_strerror])
AC_CHECK_LIB([pthread], [pthread_create])
want_server=no
+ want_cgi=no
;;
*linux* | *Linux* )
AC_MSG_RESULT([Linux])
- want_server=yes
;;
*-apple-darwin* )
AC_MSG_RESULT([Mac OS X])
- want_server=yes
if test $want_coreaudio = yes; then
COREAUDIO="-framework CoreAudio"
fi
;;
*-freebsd* )
AC_MSG_RESULT([FreeBSD])
- want_server=yes
# Ports install to /usr/local but the compiler stupidly doesn't look
# there by default
LDFLAGS="${LDFLAGS} -L/usr/local/lib"
;;
* )
AC_MSG_RESULT([unknown, winging it])
- want_server=no
;;
esac
AC_SUBST([COREAUDIO])
[AS_HELP_STRING([--without-server],
[do not build server])],
[want_server=$withval])
+AC_ARG_WITH([cgi],
+ [AS_HELP_STRING([--without-cgi],
+ [do not build CGI])],
+ [want_cgi=$withval])
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--without-gtk],
[do not build GTK+ client])],
[do not build Python support])],
[want_python=$withval])
+if test $want_server = no; then
+ want_cgi=no
+fi
+
+if test $want_cgi = yes; then
+ if test -z "$cgidir"; then
+ AC_CACHE_CHECK([for CGI directory],[rjk_cv_cgidir],[
+ rjk_cv_cgidir="not found"
+ for dir in /usr/lib/cgi-bin \
+ /Library/WebServer/CGI-Executables \
+ /usr/local/lib/cgi-bin \
+ /usr/local/www/cgi-bin \
+ /usr/local/www/*/cgi-bin; do
+ if test -d "$dir"; then
+ rjk_cv_cgidir="$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])
+ fi
+ cgidir="$rjk_cv_cgidir"
+ fi
+fi
+AC_ARG_VAR([cgidir], [location of cgi-bin directory, e.g. /usr/lib/cgi-bin])
+
subdirs="scripts lib"
if test $want_tests = yes; then
subdirs="${subdirs} libtests"
subdirs="${subdirs} clients doc examples debian"
if test $want_server = yes; then
- subdirs="${subdirs} server cgi plugins driver templates sounds images"
+ subdirs="${subdirs} server plugins driver sounds"
+fi
+if test $want_cgi = yes; then
+ subdirs="${subdirs} cgi templates images"
fi
if test $want_gtk = yes; then
subdirs="${subdirs} disobedience"
if test $want_python = no; then
AC_MSG_WARN([cannot run the test suit without Python])
fi
+
+# Local Variables:
+# indent-tabs-mode:nil
+# End:
debian/disorder-server/etc/disorder/options
$(INSTALL_DATA) debian/etc.disorder.options.user \
debian/disorder-server/etc/disorder/options.user
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) cgi/disorder.cgi \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) cgi/disorder \
$(shell pwd)/debian/disorder-server/usr/lib/cgi-bin/disorder
dpkg-shlibdeps -Tdebian/substvars.disorder-server \
debian/disorder-server/usr/lib/cgi-bin/disorder \
launchctl load /Library/LaunchDaemons
echo "Starting DisOrder server"
launchctl start uk.org.greenend.rjk.disorder
- CGIBIN=/Library/WebServer/CGI-Executables
DOCROOT=/Library/WebServer/Documents
sever_running=true
;;
esac
web=$1
echo "Found $web"
- CGIBIN=$web/cgi-bin
DOCROOT=$web/data
server_running=true
;;
break
fi
done
- echo "Looking for cgi-bin directory"
- for d in /var/www/cgi-bin /usr/lib/cgi-bin; do
- if [ -d $d ]; then
- CGIBIN=$d
- break
- fi
- done
server_running=true
;;
* )
ln -s pkgdatadir/static $DOCROOT/disorder
fi
-echo
-if [ -z "$CGIBIN" ]; then
- echo "Cannot find your web server's cgi-bin directory"
-else
- echo "Installing CGI in $CGIBIN"
- install -m 555 cgi/disorder.cgi $CGIBIN/disorder
-fi
-
if $server_running; then
first=true
sleep 5