Changeset e20354c
- Timestamp:
- Jun 24, 2010, 1:48:08 AM (14 years ago)
- Branches:
- master, debian, mac, no-cups, nodebathena, web
- Children:
- b30ec0c
- Parents:
- 7bc8b29
- git-author:
- Jessica B. Hamrick <jhamrick@…> (05/12/10 22:47:15)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (06/24/10 01:48:08)
- Location:
- debian
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
debian/control
r53e9374 re20354c 10 10 Pre-Depends: debconf 11 11 Depends: ${shlibs:Depends}, ${misc:Depends}, mplayer, libimage-exiftool-perl, lprng | debathena-lprng, sysv-rc, adduser, debathena-zephyr-config, libzephyr3-krb, alsa-base 12 Conflicts: pulseaudio13 Provides: pulseaudio14 12 Description: Server for playing music files from a remote machine 15 13 Allows remote machines to play music files on this machine -
debian/gutenbach.postinst
r53e9374 re20354c 41 41 42 42 43 inaudio=$(groups daemon| grep audio || true)43 inaudio=$(groups lp | grep audio || true) 44 44 if [ -z "$inaudio" ]; then 45 adduser daemonaudio45 adduser lp audio 46 46 fi 47 47 -
debian/inst/create-filter-config
r53e9374 re20354c 25 25 mixer="PCM" 26 26 channel="Front Left" 27 config_file="/usr/lib/gutenbach/config/gutenbach-filter-config.pl" 27 28 28 29 if [ -z "$failed" ]; then 29 echo "\$zephyr_class = \""$zephyrclass"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl 30 echo "\$host = \""$hostname"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl 31 echo "\$queue = \""$printername"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl 32 echo "\$mixer = \""$mixer"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl 33 echo "\$channel = \""$channel"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl 30 echo "\$zephyr_class = \""$zephyrclass"\";" >> "$config_file" 31 echo "\$host = \""$hostname"\";" >> "$config_file" 32 echo "\$queue = \""$printername"\";" >> "$config_file" 33 echo "\$mixer = \""$mixer"\";" >> "$config_file" 34 echo "\$channel = \""$channel"\";" >> "$config_file" 35 echo "1;" >> "$config_file" 34 36 else 35 37 echo "Error: One of /usr/lib/gutenbach/config/{printername,hostname,zephyrclass} does not exist!" >&2 -
debian/lib/gutenbach
r53e9374 re20354c 25 25 use IPC::Open2; 26 26 use English; 27 28 use vars qw/$zephyr_class $host $queue $mixer $channel/; 27 29 28 30 require "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" or die "Unable to load configuration"; … … 65 67 66 68 my %arguments = ( 67 job-id=> $ARGV[0],69 "job-id" => $ARGV[0], 68 70 user => $ARGV[1], 69 job-title=> $ARGV[2],71 "job-title" => $ARGV[2], 70 72 copies => $ARGV[3], 71 73 options => {split(/[= ]/, $ARGV[4])}, … … 83 85 } 84 86 close($fh); 87 $arguments{"file"} = $file; 85 88 } 86 89 … … 93 96 open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!"; 94 97 95 print(ZEPHYR "$arguments{user}\@$arguments{options}{job-originating-host-name}is playing:\n");96 my $status = "User: $arguments{user}\@$arguments{options}{job-originating-host-name}.");98 print(ZEPHYR $arguments{"user"},"\@",$arguments{"options"}{"job-originating-host-name"}," is playing:\n"); 99 my $status = "User: ".$arguments{"user"}."\@".$arguments{"options"}{"job-originating-host-name"}; 97 100 98 101 # SIGHUP handler, in case we were aborted … … 107 110 108 111 # Read the metadata information from the file. 109 my ($filepath) = $ options{"file"};112 my ($filepath) = $arguments{"file"}; 110 113 my ($fileinfo) = ImageInfo($filepath); 111 114 my ($magic) = $fileinfo->{FileType}; 115 my ($tempdir); 116 my ($newpath); 112 117 113 118 if ($magic) { … … 128 133 } 129 134 130 my$tempdir = tempdir();135 $tempdir = tempdir(); 131 136 #awful hack -- geofft 132 137 #== -- quentin … … 135 140 # filename. I think this is because mplayer sometimes uses the file 136 141 # extension to identify a filetype. 137 my$newpath = $tempdir . '/' . basename($arguments{"job-title"});142 $newpath = $tempdir . '/' . basename($arguments{"job-title"}); 138 143 symlink($filepath, $newpath); 139 144 $filepath = $newpath; … … 184 189 my ($filepath, $arguments) = @_; 185 190 186 my $format, $uri, $userpass;191 my ($format, $uri, $userpass); 187 192 188 193 open(FILE, "<", $filepath) or die "Couldn't open spool file"; … … 250 255 251 256 my $response = $ua->get($uri); 257 my (@titles, @uris); 252 258 253 259 foreach (split("\n", $response->content())) { … … 261 267 262 268 # choose a random server 263 $server = int(rand scalar(@uris));269 my $server = int(rand scalar(@uris)); 264 270 # print the name of the stream if available 265 271 print ZEPHYR "$titles[$server]\n";
Note: See TracChangeset
for help on using the changeset viewer.