From 6f3acea989cf8191569cc59d492722662fb25464 Mon Sep 17 00:00:00 2001 Message-Id: <6f3acea989cf8191569cc59d492722662fb25464.1714141924.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 25 Sep 2007 14:10:53 +0100 Subject: [PATCH] separate disobedience package; debconf now asks for a port number Organization: Straylight/Edgeware From: Richard Kettlewell --- .bzrignore | 1 + debian/autorules.m4 | 6 ++++ debian/{conffiles => conffiles.disorder} | 0 debian/{config => config.disorder} | 16 +++++++++- debian/control | 12 ++++++- .../{disorder.config => etc.disorder.config} | 0 .../{options.debian => etc.disorder.options} | 0 debian/{postinst => postinst.disorder} | 0 debian/{postrm => postrm.disorder} | 0 debian/{prerm => prerm.disorder} | 0 debian/rules.m4 | 31 ++++++++++++++----- debian/{templates => templates.disorder} | 7 +++++ doc/disobedience.1.in | 13 ++++++++ 13 files changed, 77 insertions(+), 9 deletions(-) rename debian/{conffiles => conffiles.disorder} (100%) rename debian/{config => config.disorder} (71%) rename debian/{disorder.config => etc.disorder.config} (100%) rename debian/{options.debian => etc.disorder.options} (100%) rename debian/{postinst => postinst.disorder} (100%) rename debian/{postrm => postrm.disorder} (100%) rename debian/{prerm => prerm.disorder} (100%) rename debian/{templates => templates.disorder} (73%) diff --git a/.bzrignore b/.bzrignore index e9353e6..c6956e1 100644 --- a/.bzrignore +++ b/.bzrignore @@ -102,3 +102,4 @@ doc/disorder-playrtp.1 debian/substvars.* debian/disorder-playrtp *.bz2 +debian/disobedience diff --git a/debian/autorules.m4 b/debian/autorules.m4 index d9a4a0c..16bb431 100644 --- a/debian/autorules.m4 +++ b/debian/autorules.m4 @@ -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 diff --git a/debian/conffiles b/debian/conffiles.disorder similarity index 100% rename from debian/conffiles rename to debian/conffiles.disorder diff --git a/debian/config b/debian/config.disorder similarity index 71% rename from debian/config rename to debian/config.disorder index d0ee037..3389538 100755 --- a/debian/config +++ b/debian/config.disorder @@ -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 < /etc/disorder/conf.debconf.new <> /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 diff --git a/debian/control b/debian/control index a7cf9a2..f02e0cb 100644 --- a/debian/control +++ b/debian/control @@ -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. diff --git a/debian/disorder.config b/debian/etc.disorder.config similarity index 100% rename from debian/disorder.config rename to debian/etc.disorder.config diff --git a/debian/options.debian b/debian/etc.disorder.options similarity index 100% rename from debian/options.debian rename to debian/etc.disorder.options diff --git a/debian/postinst b/debian/postinst.disorder similarity index 100% rename from debian/postinst rename to debian/postinst.disorder diff --git a/debian/postrm b/debian/postrm.disorder similarity index 100% rename from debian/postrm rename to debian/postrm.disorder diff --git a/debian/prerm b/debian/prerm.disorder similarity index 100% rename from debian/prerm rename to debian/prerm.disorder diff --git a/debian/rules.m4 b/debian/rules.m4 index 842f46a..2be1ffd 100644 --- a/debian/rules.m4 +++ b/debian/rules.m4 @@ -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 diff --git a/debian/templates b/debian/templates.disorder similarity index 73% rename from debian/templates rename to debian/templates.disorder index a6712d1..fcb1594 100644 --- a/debian/templates +++ b/debian/templates.disorder @@ -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. diff --git a/doc/disobedience.1.in b/doc/disobedience.1.in index c9c9fe7..82916fb 100644 --- a/doc/disobedience.1.in +++ b/doc/disobedience.1.in @@ -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 > .disorder/passwd +echo connect >> .disorder/passwd +chmod 600 .disorder/passwd +.fi +.RE .SH OPTIONS .TP .B --config \fIPATH\fR, \fB-c \fIPATH -- [mdw]