chiark / gitweb /
separate disobedience package; debconf now asks for a port number
authorRichard Kettlewell <rjk@greenend.org.uk>
Tue, 25 Sep 2007 13:10:53 +0000 (14:10 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Tue, 25 Sep 2007 13:10:53 +0000 (14:10 +0100)
13 files changed:
.bzrignore
debian/autorules.m4
debian/conffiles.disorder [moved from debian/conffiles with 100% similarity]
debian/config.disorder [moved from debian/config with 71% similarity]
debian/control
debian/etc.disorder.config [moved from debian/disorder.config with 100% similarity]
debian/etc.disorder.options [moved from debian/options.debian with 100% similarity]
debian/postinst.disorder [moved from debian/postinst with 100% similarity]
debian/postrm.disorder [moved from debian/postrm with 100% similarity]
debian/prerm.disorder [moved from debian/prerm with 100% similarity]
debian/rules.m4
debian/templates.disorder [moved from debian/templates with 73% similarity]
doc/disobedience.1.in

index e9353e6..c6956e1 100644 (file)
@@ -102,3 +102,4 @@ doc/disorder-playrtp.1
 debian/substvars.*
 debian/disorder-playrtp
 *.bz2
+debian/disobedience
index d9a4a0c..16bb431 100644 (file)
@@ -58,6 +58,12 @@ pkg-$1: [build]
        cp debian/changelog \
                debian/$1/usr/share/doc/$1/changelog.Debian
        gzip -9 debian/$1/usr/share/doc/$1/changelog.Debian
+       @for f in preinst postinst prerm postrm conffiles templates config; do\
+         if test -e debian/$$f.$1; then\
+           echo cp debian/$$f.$1 debian/$1/DEBIAN/$$f; \
+           cp debian/$$f.$1 debian/$1/DEBIAN/$$f; \
+         fi;\
+       done
 $2     dpkg-gencontrol -isp -p$1 -Pdebian/$1 -Tdebian/substvars.$1
        chown -R root:root debian/$1
        chmod -R g-ws debian/$1
similarity index 100%
rename from debian/conffiles
rename to debian/conffiles.disorder
similarity index 71%
rename from debian/config
rename to debian/config.disorder
index d0ee037..3389538 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2004, 2005 Richard Kettlewell
+# Copyright (C) 2004, 2005, 2007 Richard Kettlewell
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ set -e
 
 db_input high disorder/roots || true
 db_input high disorder/encoding || true
+db_input high disorder/port || true
 db_input medium disorder/scratches || true
 db_input medium disorder/server-name || true
 db_go || true
@@ -36,6 +37,8 @@ db_get disorder/encoding || true
 encoding="$RET"
 db_get disorder/server-name || true
 server_name="$RET"
+db_get disorder/port || true
+port="$RET"
 
 mkdir -p /etc/disorder
 cat > /etc/disorder/conf.debconf.new <<EOF
@@ -43,12 +46,23 @@ cat > /etc/disorder/conf.debconf.new <<EOF
 # do not edit manually
 # run 'dpkg-reconfigure disorder' instead
 EOF
+echo >> /etc/disorder/conf.debconf.new
+echo "# Collection roots"  >> /etc/disorder/conf.debconf.new
 for r in $roots; do
   echo "collection fs $encoding $r" >> /etc/disorder/conf.debconf.new
 done
+echo >> /etc/disorder/conf.debconf.new
+echo "# Scratches" >> /etc/disorder/conf.debconf.new
 for s in $scratches; do
   echo "scratch $s" >> /etc/disorder/conf.debconf.new
 done
+echo >> /etc/disorder/conf.debconf.new
+echo "# Canonical URL of web interface" >> /etc/disorder/conf.debconf.new
 echo "url http://$server_name/cgi-bin/disorder/disorder" >> /etc/disorder/conf.debconf.new
+if test "$port" != none && test "$port" != ""; then
+  echo >> /etc/disorder/conf.debconf.new
+  echo "# Listen for remote clients" >> /etc/disorder/conf.debconf.new
+  echo "listen 0.0.0.0 $port" >> /etc/disorder/conf.debconf.new
+fi
 
 mv /etc/disorder/conf.debconf.new /etc/disorder/conf.debconf
index a7cf9a2..f02e0cb 100644 (file)
@@ -9,7 +9,7 @@ Architecture: any
 Section: sound
 Priority: extra
 Depends: httpd,pwgen,mpg321,vorbis-tools,sox,debconf,${shlibs:Depends}
-Suggests: disorder-playrtp
+Suggests: disorder-playrtp,disobedience
 Description: Play random or selected digital audio files continuously
  Controlled from the command line or via a web-based interface.
 
@@ -22,3 +22,13 @@ Description: Network play client for DisOrder
   Plays RTP streams issued by DisOrder.  This is only useful if you
   have an install of the disorder package somewhere.
 
+Package: disobedience
+Architecture: any
+Section: sound
+Priority: extra
+Depends: ${shlibs:Depends}
+Suggests: disorder-playrtp
+Description: Controller GUI for DisOrder
+  Allows DisOrder users to remotely control what is played, etc.
+  This is only useful if you have an install of the disorder package
+  somewhere.
similarity index 100%
rename from debian/postinst
rename to debian/postinst.disorder
similarity index 100%
rename from debian/postrm
rename to debian/postrm.disorder
similarity index 100%
rename from debian/prerm
rename to debian/prerm.disorder
index 842f46a..2be1ffd 100644 (file)
@@ -26,7 +26,9 @@ build
 archpkg([disorder], [  m4_dnl
        $(MAKE) DESTDIR=`pwd`/debian/disorder staticdir=/var/www/disorder installdirs install
        rm -f debian/disorder/usr/bin/disorder-playrtp
+       rm -f debian/disorder/usr/bin/disobedience
        rm -f debian/disorder/usr/share/man/man1/disorder-playrtp.1
+       rm -f debian/disorder/usr/share/man/man1/disobedience.1
        mkdir -m 755 -p debian/disorder/etc/disorder
        mkdir -m 755 -p debian/disorder/etc/init.d
        mkdir -m 755 -p debian/disorder/usr/lib/cgi-bin/disorder
@@ -34,9 +36,9 @@ archpkg([disorder], [ m4_dnl
        mkdir -m 755 -p debian/disorder/usr/share/doc/disorder/ChangeLog.d
        $(INSTALL) -m 755 examples/disorder.init \
                debian/disorder/etc/init.d/disorder
-       $(INSTALL) -m 644 debian/disorder.config \
+       $(INSTALL) -m 644 debian/etc.disorder.config \
                debian/disorder/etc/disorder/config
-       $(INSTALL) -m 644 debian/options.debian \
+       $(INSTALL) -m 644 debian/etc.disorder.options \
                debian/disorder/etc/disorder/options
        $(LIBTOOL) --mode=install $(INSTALL) -m 755 server/disorder.cgi \
                $(shell pwd)/debian/disorder/usr/lib/cgi-bin/disorder/disorder
@@ -60,11 +62,6 @@ archpkg([disorder], [        m4_dnl
                 debian/disorder/usr/share/doc/disorder/BUGS \
                 debian/disorder/usr/share/doc/disorder/GPL \
                 debian/disorder/usr/share/man/man*/*
-       $(INSTALL) -m 755 debian/postinst debian/prerm debian/postrm \
-               debian/config \
-               debian/disorder/DEBIAN/.
-       $(INSTALL) -m 644 debian/conffiles debian/templates \
-               debian/disorder/DEBIAN/.
 ])
 
 archpkg([disorder-playrtp], [  m4_dnl
@@ -79,10 +76,30 @@ archpkg([disorder-playrtp], [       m4_dnl
        $(INSTALL) -m 644 debian/README.RTP \
                debian/disorder-playrtp/usr/share/doc/disorder-playrtp/README
        $(INSTALL) -m 644 COPYING debian/disorder-playrtp/usr/share/doc/disorder-playrtp/GPL
+       $(INSTALL) -m 644 CHANGES debian/disorder-playrtp/usr/share/doc/disorder-playrtp/CHANGES
        gzip -9f debian/disorder-playrtp/usr/share/doc/disorder-playrtp/GPL \
+                debian/disorder-playrtp/usr/share/doc/disorder-playrtp/CHANGES \
                 debian/disorder-playrtp/usr/share/man/man*/*
 ])
 
+archpkg([disobedience], [      m4_dnl
+       mkdir -p debian/disobedience/usr/bin
+       mkdir -p debian/disobedience/usr/share/man/man1
+       $(INSTALL) -m 755 disobedience/disobedience \
+               debian/disobedience/usr/bin/disobedience
+       $(INSTALL) -m 755 doc/disobedience.1 \
+               debian/disobedience/usr/share/man/man1/disobedience.1
+       $(INSTALL) -m 644 debian/etc.disorder.config \
+               debian/disorder/etc/disorder/config
+       dpkg-shlibdeps -Tdebian/substvars.disobedience \
+               debian/disobedience/usr/bin/*
+       $(INSTALL) -m 644 COPYING debian/disobedience/usr/share/doc/disobedience/GPL
+       $(INSTALL) -m 644 CHANGES debian/disobedience/usr/share/doc/disobedience/CHANGES
+       gzip -9f debian/disobedience/usr/share/doc/disobedience/GPL \
+                debian/disobedience/usr/share/doc/disobedience/CHANGES \
+                debian/disobedience/usr/share/man/man*/*
+])
+
 binary
 
 clean
similarity index 73%
rename from debian/templates
rename to debian/templates.disorder
index a6712d1..fcb1594 100644 (file)
@@ -26,3 +26,10 @@ Default: localhost
 Description: Web server hostname
  Enter the hostname that the web interface will appear under.
 
+Template: disorder/port
+Type: string
+Default: none
+Description: Port number for clients to connect to
+ Enter the port number that the server should listen on for clients.  This
+ can be set to 'none' to permit only local clients or a port number for
+ remote clients to connect to, e.g. using Disobedience.
index c9c9fe7..82916fb 100644 (file)
@@ -27,6 +27,19 @@ disobedience \- GUI client for DisOrder jukebox
 is a graphical client for DisOrder.  It is a work in progress and many features
 are not implemented yet.  However everything in this man page is either
 implemented or marked as missing.
+.SH "SETTING UP"
+You might use commands such as the following to set up a standalone instance of
+Disobedience:
+.PP
+.RS
+.nf
+cd
+mkdir .disorder
+echo password <your password> > .disorder/passwd
+echo connect <hostname> <port> >> .disorder/passwd
+chmod 600 .disorder/passwd
+.fi
+.RE
 .SH OPTIONS
 .TP
 .B --config \fIPATH\fR, \fB-c \fIPATH