- Timestamp:
- Nov 25, 2009, 2:10:09 AM (15 years ago)
- Branches:
- master, debian, mac, no-cups, nodebathena, web
- Children:
- af7788c
- Parents:
- 331360d
- git-author:
- Jessica B. Hamrick <jhamrick@…> (11/25/09 02:10:09)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (11/25/09 02:10:09)
- Location:
- gutenbach/debian
- Files:
-
- 11 added
- 28 moved
Legend:
- Unmodified
- Added
- Removed
-
gutenbach/debian/changelog
r331360d rc631d1a 1 sipbmp3(1.1) unstable; urgency=low1 gutenbach (1.1) unstable; urgency=low 2 2 3 3 * Implemented debconf to retrieve printer and zephyr class names. … … 7 7 -- Jessica Hamrick <jhamrick@mit.edu> Wed, 16 Sep 2009 15:58:40 -0400 8 8 9 sipbmp3(1.0) unstable; urgency=low9 gutenbach (1.0) unstable; urgency=low 10 10 11 11 * Initial release. -
gutenbach/debian/control.in
r331360d rc631d1a 1 Source: sipbmp31 Source: gutenbach 2 2 Section: sound 3 3 Priority: extra … … 6 6 Standards-Version: 3.8.0 7 7 8 Package: sipbmp38 Package: gutenbach 9 9 Architecture: all 10 10 Pre-Depends: debconf -
gutenbach/debian/gutenbach.init
rc061ab8 rc631d1a 1 1 #!/bin/sh 2 2 ### BEGIN INIT INFO 3 # Provides: sipbmp33 # Provides: gutenbach 4 4 # Required-Start: $remote_fs $syslog 5 5 # Required-Stop: $remote_fs $syslog 6 6 # Default-Start: 2 3 4 5 7 7 # Default-Stop: 0 1 6 8 # Short-Description: Starts lpd for sipbmp3.9 # Description: Starts lpd for sipbmp3and creates10 # files for use by sipbmp3.8 # Short-Description: Starts lpd for gutenbach. 9 # Description: Starts lpd for gutenbach and creates 10 # files for use by gutenbach. 11 11 ### END INIT INFO 12 12 13 13 case "$1" in 14 14 start) 15 mkdir /var/run/ sipbmp316 touch /var/run/ sipbmp3/status17 chmod 0777 /var/run/ sipbmp3/status15 mkdir /var/run/gutenbach 16 touch /var/run/gutenbach/status 17 chmod 0777 /var/run/gutenbach/status 18 18 19 19 if [ -x /etc/init.d/lprng ]; then … … 41 41 fi 42 42 43 rm -r /var/run/ sipbmp343 rm -r /var/run/gutenbach 44 44 if which invoke-rc.d >/dev/null 2>&1; then 45 45 invoke-rc.d "$script" stop … … 58 58 fi 59 59 60 rm -r /var/run/ sipbmp360 rm -r /var/run/gutenbach 61 61 if which invoke-rc.d >/dev/null 2>&1; then 62 62 invoke-rc.d "$script" stop … … 65 65 fi 66 66 67 mkdir /var/run/ sipbmp368 touch /var/run/ sipbmp3/status69 chmod 0777 /var/run/ sipbmp3/status67 mkdir /var/run/gutenbach 68 touch /var/run/gutenbach/status 69 chmod 0777 /var/run/gutenbach/status 70 70 if which invoke-rc.d >/dev/null 2>&1; then 71 71 invoke-rc.d "$script" start … … 79 79 80 80 *) 81 echo "Usage: /etc/init.d/ sipbmp3{start|stop|restart}" >&281 echo "Usage: /etc/init.d/gutenbach {start|stop|restart}" >&2 82 82 exit 1 83 83 ;; -
gutenbach/debian/gutenbach.postinst
r331360d rc631d1a 1 1 #!/bin/sh 2 # postinst script for sipbmp32 # postinst script for gutenbach 3 3 # 4 4 # see: dh_installdeb(1) … … 22 22 case "$1" in 23 23 configure|reconfigure) 24 chmod +x /usr/lib/ sipbmp3/inst/create-filter-config25 chmod +x /usr/lib/ sipbmp3/inst/edit-printcap26 chmod +x /usr/lib/ sipbmp3/inst/edit-lpd.conf27 chmod +x /usr/lib/ sipbmp3/inst/run-checkpc28 chmod +x /usr/lib/ sipbmp3/inst/edit-lpd.perms29 /usr/lib/ sipbmp3/inst/create-filter-config30 /usr/lib/ sipbmp3/inst/edit-printcap31 /usr/lib/ sipbmp3/inst/edit-lpd.conf32 /usr/lib/ sipbmp3/inst/run-checkpc33 /usr/lib/ sipbmp3/inst/edit-lpd.perms24 chmod +x /usr/lib/gutenbach/inst/create-filter-config 25 chmod +x /usr/lib/gutenbach/inst/edit-printcap 26 chmod +x /usr/lib/gutenbach/inst/edit-lpd.conf 27 chmod +x /usr/lib/gutenbach/inst/run-checkpc 28 chmod +x /usr/lib/gutenbach/inst/edit-lpd.perms 29 /usr/lib/gutenbach/inst/create-filter-config 30 /usr/lib/gutenbach/inst/edit-printcap 31 /usr/lib/gutenbach/inst/edit-lpd.conf 32 /usr/lib/gutenbach/inst/run-checkpc 33 /usr/lib/gutenbach/inst/edit-lpd.perms 34 34 35 if [ -e /usr/lib/ sipbmp3/config/printer_name ]; then36 rm /usr/lib/ sipbmp3/config/printer_name35 if [ -e /usr/lib/gutenbach/config/printer_name ]; then 36 rm /usr/lib/gutenbach/config/printer_name 37 37 fi 38 38 39 if [ -e /usr/lib/ sipbmp3/config/zephyr_class ]; then40 rm /usr/lib/ sipbmp3/config/zephyr_class39 if [ -e /usr/lib/gutenbach/config/zephyr_class ]; then 40 rm /usr/lib/gutenbach/config/zephyr_class 41 41 fi 42 42 -
gutenbach/debian/gutenbach.postrm
r331360d rc631d1a 1 1 #!/bin/sh 2 # postrm script for sipbmp32 # postrm script for gutenbach 3 3 # 4 4 # see: dh_installdeb(1) … … 23 23 purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 24 24 if [ "$1" = "purge" ]; then 25 if [ -d /usr/lib/ sipbmp3]; then26 echo "Removing /usr/lib/ sipbmp3/..." >&227 rm -r /usr/lib/ sipbmp325 if [ -d /usr/lib/gutenbach ]; then 26 echo "Removing /usr/lib/gutenbach/..." >&2 27 rm -r /usr/lib/gutenbach 28 28 fi 29 29 -
gutenbach/debian/gutenbach.preinst
r331360d rc631d1a 1 1 #!/bin/sh 2 # preinst script for sipbmp32 # preinst script for gutenbach 3 3 # 4 4 # see: dh_installdeb(1) -
gutenbach/debian/gutenbach.prerm
r331360d rc631d1a 1 1 #!/bin/sh 2 # prerm script for sipbmp32 # prerm script for gutenbach 3 3 # 4 4 # see: dh_installdeb(1) … … 20 20 case "$1" in 21 21 remove|upgrade|deconfigure) 22 if [ -e /usr/lib/ sipbmp3/rm/revert_lpd.conf ]; then23 chmod +x /usr/lib/ sipbmp3/rm/revert_lpd.conf24 /usr/lib/ sipbmp3/rm/revert_lpd.conf22 if [ -e /usr/lib/gutenbach/rm/revert_lpd.conf ]; then 23 chmod +x /usr/lib/gutenbach/rm/revert_lpd.conf 24 /usr/lib/gutenbach/rm/revert_lpd.conf 25 25 fi 26 26 27 if [ -e /usr/lib/ sipbmp3/rm/revert_lpd.perms ]; then28 chmod +x /usr/lib/ sipbmp3/rm/revert_lpd.perms29 /usr/lib/ sipbmp3/rm/revert_lpd.perms27 if [ -e /usr/lib/gutenbach/rm/revert_lpd.perms ]; then 28 chmod +x /usr/lib/gutenbach/rm/revert_lpd.perms 29 /usr/lib/gutenbach/rm/revert_lpd.perms 30 30 fi 31 31 32 if [ -e /usr/lib/ sipbmp3/rm/revert_printcap ]; then33 chmod +x /usr/lib/ sipbmp3/rm/revert_printcap34 /usr/lib/ sipbmp3/rm/revert_printcap32 if [ -e /usr/lib/gutenbach/rm/revert_printcap ]; then 33 chmod +x /usr/lib/gutenbach/rm/revert_printcap 34 /usr/lib/gutenbach/rm/revert_printcap 35 35 fi 36 36 ;; -
gutenbach/debian/gutenbach.templates
r331360d rc631d1a 1 Template: sipbmp3/printername1 Template: gutenbach/printername 2 2 Type: string 3 Default: lprmp3 4 _Description: Your sipbmp3 printer name: 5 sipbmp3 creates a printer to which you can print music 6 files. sipbmp3 needs to know what you want to call the 3 _Description: Your gutenbach printer name: 4 gutenbach creates a printer to which you can print music 5 files. gutenbach needs to know what you want to call the 7 6 printer, and then after installation, you will be able 8 7 to do: 9 8 lpr -Pprintername@hostname your-music-file-.mp3 10 9 11 Template: sipbmp3/zephyrclass10 Template: gutenbach/zephyrclass 12 11 Type: string 13 _Description: Your sipbmp3zephyr class:14 When sipbmp3plays a song, it sends a message to a zephyr12 _Description: Your gutenbach zephyr class: 13 When gutenbach plays a song, it sends a message to a zephyr 15 14 class with the song information (title, artist, album, 16 15 etc). Please specify which class you would you these -
gutenbach/debian/inst/edit-printcap
r331360d rc631d1a 11 11 12 12 . /usr/share/debconf/confmodule 13 db_get sipbmp3/printername13 db_get gutenbach/printername 14 14 15 15 printcap=$(cat /etc/printcap | grep ^`echo $RET` || true) … … 20 20 echo " :cm=$RET music spooler" >> /etc/printcap 21 21 echo " :lp=/dev/null" >> /etc/printcap 22 echo " :if=|/usr/lib/ sipbmp3/sipbmp3-filter" >> /etc/printcap22 echo " :if=|/usr/lib/gutenbach/gutenbach-filter" >> /etc/printcap 23 23 echo " :sd=/var/spool/lpd/$RET" >> /etc/printcap 24 24 echo " :ml=0:mx=0:sh:sf" >> /etc/printcap -
gutenbach/debian/inst/run-checkpc
r331360d rc631d1a 15 15 16 16 . /usr/share/debconf/confmodule 17 db_get sipbmp3/printername17 db_get gutenbach/printername 18 18 /usr/sbin/checkpc -P"$RET" -f -
gutenbach/debian/lib/gutenbach-filter
r331360d rc631d1a 1 #!/usr/ bin/perl1 #!/usr/athena/bin/perl 2 2 # Play the data on STDIN as an audio file 3 3 # 4 # $Id: sipbmp3-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $5 # $Source: /usr/local/bin/RCS/ sipbmp3-filter,v $4 # $Id: gutenbach-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $ 5 # $Source: /usr/local/bin/RCS/gutenbach-filter,v $ 6 6 # 7 7 # TODO … … 23 23 use IPC::Open2; 24 24 25 my $zephyr_class = "lprmp3"; 26 my $host = "hostname"; 27 my $queue = "printername"; 25 my $zephyr_class = "gutenbach"; 26 my $host = `hostname`; 27 my $queue = "gutenbach"; 28 my $mixer = "PCM"; 29 my $channel = "Front Left"; 28 30 29 31 # Configuration 30 my $config_file = "/usr/lib/ sipbmp3/config/sipbmp3-filter-config.pl";32 my $config_file = "/usr/lib/gutenbach/config/gutenbach-filter-config.pl"; 31 33 if (-r $config_file) { 32 34 # Inline the configuration file … … 40 42 41 43 close(STDERR); 42 open(STDERR, ">>", "/tmp/ sipbmp3.log") or warn "Couldn't open log: $!";44 open(STDERR, ">>", "/tmp/gutenbach.log") or warn "Couldn't open log: $!"; 43 45 44 46 $ENV{"TERM"}="vt100"; … … 95 97 # Status messages at start of playback 96 98 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i ' . 97 $queue.'@'.$host.' -s " SIPB LPR music spooler"');99 $queue.'@'.$host.' -s "Gutenbach Music Spooler"'); 98 100 99 101 # For the Now Playing remctl command 100 open(STATUS, '>', '/var/run/ sipbmp3/status') or die("Can't open status file /var/run/sipbmp3/status");102 open(STATUS, '>', '/var/run/gutenbach/status') or die("Can't open status file /var/run/gutenbach/status"); 101 103 102 104 print(ZEPHYR "$opts{'n'}\@$opts{'H'} is playing:\n"); … … 106 108 sub clear_status { 107 109 # Possible race condition if the previous status is still going 108 open(STA, '>', '/var/run/ sipbmp3/status');110 open(STA, '>', '/var/run/gutenbach/status'); 109 111 close(STA); 110 112 open(ZEPH, '|/usr/athena/bin/zwrite -d -n -c '. $zephyr_class .' -i '. 111 $queue.'@'.$host.' -s " SIPB LPR music spooler"');113 $queue.'@'.$host.' -s "Gutenbach Music Spooler"'); 112 114 print(ZEPH "Playback aborted.\n"); 113 115 close(ZEPH); … … 266 268 # Prepare to write status: 267 269 open(ZEPHYR, '|/usr/athena/bin/zwrite -d -n -c '.$zephyr_class.' -i ' . 268 $queue.'@'.$host.' -s " SIPB LPR music spooler"');270 $queue.'@'.$host.' -s "Gutenbach Music Spooler"'); 269 271 270 272 # fork for mpg123 … … 290 292 291 293 close(ZEPHYR); 292 open(STATUS, '>', '/var/run/ sipbmp3/status');294 open(STATUS, '>', '/var/run/gutenbach/status'); 293 295 close(STATUS); 294 296 } -
gutenbach/debian/rm/revert_printcap
r331360d rc631d1a 3 3 echo "Reverting changes to /etc/printcap..." >&2 4 4 . /usr/share/debconf/confmodule 5 db_get sipbmp3/printername5 db_get gutenbach/printername 6 6 7 7 mv /etc/printcap /etc/printcap.bak
Note: See TracChangeset
for help on using the changeset viewer.