Check-in initial packaging work.
Chris Boot
9 years ago
0 | squeezelite (1.3.1-1) unstable; urgency=low | |
1 | ||
2 | * Initial release (Closes: #729885) | |
3 | ||
4 | -- Chris Boot <debian@bootc.net> Mon, 18 Nov 2013 15:44:55 +0000 |
0 | 9 |
0 | Source: squeezelite | |
1 | Section: sound | |
2 | Priority: extra | |
3 | Maintainer: Chris Boot <debian@bootc.net> | |
4 | Build-Depends: debhelper (>= 9~), libasound2-dev, libflac-dev, libmad0-dev, | |
5 | libvorbis-dev, libfaad-dev, libmpg123-dev, libsoxr-dev, libavformat-dev | |
6 | Standards-Version: 3.9.5 | |
7 | Homepage: https://code.google.com/p/squeezelite/ | |
8 | Vcs-Git: git://anonscm.debian.org/collab-maint/squeezelite.git | |
9 | Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/squeezelite.git;a=summary | |
10 | ||
11 | Package: squeezelite | |
12 | Architecture: any | |
13 | Depends: ${shlibs:Depends}, ${misc:Depends} | |
14 | Description: Lightweight headless Squeezebox emulator | |
15 | Squeezelite is a small headless Squeezebox emulator. It is aimed at | |
16 | supporting high quality audio including USB DAC based output at multiple | |
17 | sample rates. | |
18 | . | |
19 | It supports decoding PCM (WAV/AIFF), FLAC, MP3, Ogg, AAC, WMA and ALAC | |
20 | audio formats. It can also resample audio, which allows squeezelite to | |
21 | upsample the output to the highest sample rate supported by the output | |
22 | device. | |
23 | . | |
24 | This package is built with the resampling, ffmpeg and visualisation export | |
25 | options. It uses ALSA for audio output. |
0 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | |
1 | Upstream-Name: squeezelite | |
2 | Upstream-Contact: Adrian Smith <triode1@btinternet.com> | |
3 | Source: https://code.google.com/p/squeezelite/ | |
4 | ||
5 | Files: * | |
6 | Copyright: 2012-2013 Adrian Smith <triode1@btinternet.com> | |
7 | License: GPL-3 | |
8 | This program is free software: you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation, either version 3 of the License, or | |
11 | (at your option) any later version. | |
12 | . | |
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | . | |
18 | You should have received a copy of the GNU General Public License | |
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | . | |
21 | On Debian systems, the complete text of the GNU General | |
22 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". | |
23 | ||
24 | Files: debian/* | |
25 | Copyright: 2013 Chris Boot <debian@bootc.net> | |
26 | License: GPL-2+ | |
27 | This package is free software; you can redistribute it and/or modify | |
28 | it under the terms of the GNU General Public License as published by | |
29 | the Free Software Foundation; either version 2 of the License, or | |
30 | (at your option) any later version. | |
31 | . | |
32 | This package is distributed in the hope that it will be useful, | |
33 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
34 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
35 | GNU General Public License for more details. | |
36 | . | |
37 | You should have received a copy of the GNU General Public License | |
38 | along with this program. If not, see <http://www.gnu.org/licenses/> | |
39 | . | |
40 | On Debian systems, the complete text of the GNU General | |
41 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". |
0 | .\" Hey, EMACS: -*- nroff -*- | |
1 | .\" (C) Copyright 2013 Chris Boot <debian@bootc.net> | |
2 | .\" | |
3 | .\" First parameter, NAME, should be all caps | |
4 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection | |
5 | .\" other parameters are allowed: see man(7), man(1) | |
6 | .TH SQUEEZELITE 1 "November 24, 2013" "Debian Project" | |
7 | .\" Please adjust this date whenever revising the manpage. | |
8 | .\" | |
9 | .\" Some roff macros, for reference: | |
10 | .\" .nh disable hyphenation | |
11 | .\" .hy enable hyphenation | |
12 | .\" .ad l left justify | |
13 | .\" .ad b justify to both left and right margins | |
14 | .\" .nf disable filling | |
15 | .\" .fi enable filling | |
16 | .\" .br insert line break | |
17 | .\" .sp <n> insert n+1 empty lines | |
18 | .\" for manpage-specific macros, see man(7) | |
19 | .SH NAME | |
20 | squeezelite \- Lightweight headless Squeezebox emulator | |
21 | .SH SYNOPSIS | |
22 | .B squeezelite | |
23 | .RI [ options ] | |
24 | .SH DESCRIPTION | |
25 | .B Squeezelite | |
26 | is a small headless Logitech Squeezebox emulator. It is aimed at supporting high | |
27 | quality audio including USB DAC based output at multiple sample rates. | |
28 | .PP | |
29 | The player is controlled using, and media is streamed from, a Logitech Media | |
30 | Server instance running somewhere on the local network. | |
31 | .SH OPTIONS | |
32 | This program supports the following options: | |
33 | .TP | |
34 | .B \-h | |
35 | Show a summary of the available command-line options. | |
36 | .TP | |
37 | .B \-s <server>[:<port>] | |
38 | Connect to the specified Logitech Media Server, otherwise uses automatic | |
39 | discovery to find server on the local network. This option should only be needed | |
40 | if automatic discovery does not work, or the server is not on the local network | |
41 | segment (e.g. behind a router). | |
42 | .TP | |
43 | .B \-o <output device> | |
44 | Specify the audio output device; the default value is | |
45 | .IR default . | |
46 | Use the | |
47 | .B \-l | |
48 | option to list available output devices. | |
49 | .TP | |
50 | .B \-l | |
51 | List available audio output devices to stdout and exit. These device names can | |
52 | be passed to the | |
53 | .B \-o | |
54 | option in order to select a particular device or configuration to use for audio | |
55 | playback. | |
56 | .TP | |
57 | .B \-a <b>:<p>:<f>:<m> | |
58 | Specify ALSA parameters used when opening an audio output device. | |
59 | .B <b> | |
60 | is the buffer time in milliseconds (values less than 500) or size in bytes (default | |
61 | .IR 40 ms); | |
62 | .B <p> | |
63 | is the period count (values less than 50) or size in bytes (default | |
64 | .IR 4 " periods);" | |
65 | .B <f> | |
66 | is the sample format (possible values: | |
67 | .IR 16 ", " 24 ", " 24_3 " or " 32 ); | |
68 | .B <m> | |
69 | is whether to use mmap (possible values: | |
70 | .IR 0 " or " 1 ). | |
71 | .TP | |
72 | .B \-b <stream>:<output> | |
73 | Specify internal stream and output buffer sizes in kilobytes. | |
74 | .TP | |
75 | .B \-c <codec1>,... | |
76 | Restrict codecs to those specified, otherwise load all available codecs; known codecs: | |
77 | .IR flac ", " pcm ", " mp3 ", " ogg ", " aac ", " wma ", " alac . | |
78 | .IR mad " or " mpg | |
79 | can be supplied instead of | |
80 | .I mp3 | |
81 | to use a specific decoder library. | |
82 | .TP | |
83 | .B \-d <category>=<level> | |
84 | Set logging level. Categories are: | |
85 | .IR all ", " slimproto ", " stream ", " decode " or " output . | |
86 | Levels can be: | |
87 | .IR info ", " debug " or " sdebug . | |
88 | The option can be repeated to set different log levels for different categories. | |
89 | .TP | |
90 | .B \-f <logfile> | |
91 | Send logging output to a log file instead of standard output or standard error. | |
92 | .TP | |
93 | .B \-m <mac addr> | |
94 | Override the player's MAC address. The format must be colon-delimited | |
95 | hexadecimal, for example: ab:cd:ef:12:34:56. This is usually automatically | |
96 | detected, and should not need to be provided in most circumstances. | |
97 | .TP | |
98 | .B \-n <name> | |
99 | Set the player name. This name is used by the Logitech Media Server to refer to | |
100 | the player by name. | |
101 | .TP | |
102 | .B \-p <priority> | |
103 | Set real time priority of output thread (1-99; default | |
104 | .IR 45 ). | |
105 | .TP | |
106 | .B \-r <rate> | |
107 | Maximum sample rate for the output device; this is required if the ALSA output | |
108 | device is switched off when squeezelite is started. | |
109 | .TP | |
110 | .B \-u [params] | |
111 | Enable upsampling of played audio. The argument is optional; see | |
112 | .B RESAMPLING | |
113 | (below) for more information. | |
114 | .TP | |
115 | .B \-v | |
116 | Enable visualiser support. This creates a shared memory segment that contains | |
117 | some of the audio being played, so that an external visualiser can read and | |
118 | process this to create visualisations. | |
119 | .TP | |
120 | .B \-z | |
121 | Cause \fBsqueezelite\fR to run as a daemon. That is, it detaches itself from the | |
122 | terminal and runs in the background. | |
123 | .TP | |
124 | .B \-t | |
125 | Display version and license information. | |
126 | .SH RESAMPLING | |
127 | Audio can be resampled or upsampled before being sent to the output device. This | |
128 | can be enabled simply by passing the \fB\-u\fR option to \fBsqueezelite\fR, but | |
129 | further configuration can be given as an argument to the option. | |
130 | .PP | |
131 | Resampling is performed using the SoX Resampler library; the documentation for | |
132 | that library and the SoX \fIrate\fR effect many be helpful when configuring | |
133 | upsampling for \fBsqueezelite\fR. | |
134 | .PP | |
135 | The format of the argument is | |
136 | .B <recipe>:<flags>:<attenuation>:<precision>:<passband_end>:<stopband_start>:<phase_response> | |
137 | .SS recipe | |
138 | This part of the argument string is made up of a number of single-character | |
139 | flags: \fB[v|h|m|l|q][L|I|M][s][X]\fR. The default value is \fBhL\fR. | |
140 | .TP | |
141 | .IR v ", " h ", " m ", " l " or " q | |
142 | are mutually exclusive and correspond to very high, high, medium, low or quick | |
143 | quality. | |
144 | .TP | |
145 | .IR L ", " I " or " M | |
146 | correspond to linear, intermediate or minimum phase. | |
147 | .TP | |
148 | .IR s | |
149 | changes resampling bandwidth from the default 95% (based on the 3dB point) to | |
150 | 99%. | |
151 | .TP | |
152 | .IR X | |
153 | resamples to the maximum sample rate for the output device ("asynchronous" | |
154 | resampling). | |
155 | .TP | |
156 | .B Examples | |
157 | .B \-u vLs | |
158 | would use very high quality setting, linear phase filter and steep cut-off. | |
159 | .br | |
160 | .B \-u hM | |
161 | would specify high quality, with the minimum phase filter. | |
162 | .br | |
163 | .B \-u hMX | |
164 | would specify high quality, with the minimum phase filter and async upsampling | |
165 | to max device rate. | |
166 | .SS flags | |
167 | The second optional argument to \fB\-u\fR allows the user to specify the | |
168 | following arguments (taken from the \fIsoxr.h\fR header file), in hex: | |
169 | .sp | |
170 | #define SOXR_ROLLOFF_SMALL 0u /* <= 0.01 dB */ | |
171 | .br | |
172 | #define SOXR_ROLLOFF_MEDIUM 1u /* <= 0.35 dB */ | |
173 | .br | |
174 | #define SOXR_ROLLOFF_NONE 2u /* For Chebyshev bandwidth. */ | |
175 | .sp | |
176 | #define SOXR_MAINTAIN_3DB_PT 4u /* Reserved for internal use. */ | |
177 | .br | |
178 | #define SOXR_HI_PREC_CLOCK 8u /* Increase 'irrational' ratio accuracy. */ | |
179 | .br | |
180 | #define SOXR_DOUBLE_PRECISION 16u /* Use D.P. calcs even if precision <= 20. */ | |
181 | .br | |
182 | #define SOXR_VR 32u /* Experimental, variable-rate resampling. */ | |
183 | .TP | |
184 | .B Examples | |
185 | .B \-u :2 | |
186 | would specify \fBSOXR_ROLLOFF_NONE\fR. | |
187 | .sp | |
188 | \fBNB:\fR In the example above the first option, \fB<quality>\fR, has not been | |
189 | specified so would default to \fBhL\fR. Therefore, specifying \fB\-u :2\fR is | |
190 | equivalent to having specified \fB\-u hL:2\fR. | |
191 | .SS attenuation | |
192 | Internally, data is passed to the SoX resample process as 32 bit integers and | |
193 | output from the SoX resample process as 32 bit integers. Why does this matter? | |
194 | There is the possibility that integer samples, once resampled may be clipped | |
195 | (i.e. exceed the maximum value). By default, if you do not specify an | |
196 | \fBattenuation\fR value, it will default to \-1db. A value of \fI0\fR on the | |
197 | command line, i.e. \fB-u ::0\fR will disable the default \-1db attenuation being | |
198 | applied. | |
199 | .sp | |
200 | \fBNB:\fR Clipped samples will be logged. Keep an eye on the log file. | |
201 | .TP | |
202 | .B Examples | |
203 | .B \-u ::6 | |
204 | specifies to apply \-6db (ie. halve the volume) prior to the resampling process. | |
205 | .SS precision | |
206 | The internal 'bit' precision used in the re-sampling calculations (ie. quality). | |
207 | .sp | |
208 | \fBNB:\fR HQ = 20, VHQ = 28. | |
209 | .TP | |
210 | .B Examples | |
211 | .B \-u :::28 | |
212 | specifies 28-bit precision. | |
213 | .SS passband_end | |
214 | A percentage value between 0 and 100, where 100 is the Nyquist frequency. The | |
215 | default if not explicitly set is \fI91.3\fR. | |
216 | .TP | |
217 | .B Examples | |
218 | .B \-u ::::98 | |
219 | specifies passband ends at 98 percent of the Nyquist frequency. | |
220 | .SS stopband_start | |
221 | A percentage value between 0 and 100, where 100 is the Nyquist frequency. The | |
222 | default if not explicitly set is \fI100\fR. | |
223 | .TP | |
224 | .B Examples | |
225 | .B \-u :::::100 | |
226 | specifies that the stopband starts at the Nyquist frequency. | |
227 | .SS phase_response | |
228 | A value between 0-100, where \fI0\fR is equivalent to the recipe \fIM\fR flag | |
229 | for minimum phase, \fI25\fR is equivalent to the recipe \fII\fR flag for | |
230 | intermediate phase and \fI50\fR is equivalent to the recipe \fIL\fR flag for | |
231 | linear phase. | |
232 | .TP | |
233 | .B Examples | |
234 | .B \-u ::::::50 | |
235 | specifies linear phase. | |
236 | .SH SEE ALSO | |
237 | https://code.google.com/p/squeezelite/ | |
238 | .br | |
239 | http://www.communitysqueeze.org/squeezelite_about.jsp | |
240 | .br | |
241 | http://www.communitysqueeze.org/squeezelite_upsample.jsp | |
242 | .br | |
243 | .BR sox (1) | |
244 | \- for further information about resampling |
0 | Description: Makefile tweaks for hardening build options | |
1 | This patch changes the Makefile to add options to CFLAGS and LDFLAGS instead of | |
2 | overriding the values from the environment, and ensures that CPPFLAGS is also | |
3 | used when building C source. | |
4 | Author: Chris Boot <debian@bootc.net> | |
5 | Forwarded: not-needed | |
6 | Last-Update: 2013-11-24 | |
7 | ||
8 | --- a/Makefile | |
9 | +++ b/Makefile | |
10 | @@ -1,6 +1,6 @@ | |
11 | # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile... | |
12 | -CFLAGS ?= -Wall -fPIC -O2 $(OPTS) | |
13 | -LDFLAGS ?= -lasound -lpthread -lm -lrt | |
14 | +CFLAGS += -Wall -fPIC $(OPTS) | |
15 | +LDFLAGS += -lasound -lpthread -lm -lrt | |
16 | EXECUTABLE ?= squeezelite | |
17 | ||
18 | SOURCES = main.c slimproto.c utils.c output.c buffer.c stream.c decode.c process.c resample.c flac.c pcm.c mad.c vorbis.c faad.c mpg.c ffmpeg.c | |
19 | @@ -33,7 +33,7 @@ | |
20 | $(OBJECTS): $(DEPS) | |
21 | ||
22 | .c.o: | |
23 | - $(CC) $(CFLAGS) $< -c -o $@ | |
24 | + $(CC) $(CFLAGS) $(CPPFLAGS) $< -c -o $@ | |
25 | ||
26 | clean: | |
27 | rm -f $(OBJECTS) $(EXECUTABLE) |
0 | Makefile-tweaks.patch |
0 | #!/usr/bin/make -f | |
1 | # -*- makefile -*- | |
2 | ||
3 | # Uncomment this to turn on verbose mode. | |
4 | #export DH_VERBOSE=1 | |
5 | ||
6 | # Enable ffmpeg, soxr resampling, visualisation export and disable dlopening | |
7 | # libraries | |
8 | export OPTS=-DFFMPEG -DRESAMPLE -DVISEXPORT -DLINKALL | |
9 | ||
10 | %: | |
11 | dh $@ |
0 | 3.0 (quilt) |
0 | # Defaults for squeezelite initscript | |
1 | # sourced by /etc/init.d/squeezelite | |
2 | # installed at /etc/default/squeezelite by the maintainer scripts | |
3 | ||
4 | # The name for the squeezelite player: | |
5 | SL_NAME="$(hostname -s)" | |
6 | ||
7 | # ALSA output device: | |
8 | #SL_SOUNDCARD="default:CARD=Set" | |
9 | ||
10 | # Squeezebox server (Logitech Media Server): | |
11 | # Uncomment the next line if you want to point squeezelite at the IP address of | |
12 | # your squeezebox server. This is usually unnecessary as the server is | |
13 | # automatically discovered. | |
14 | #SB_SERVER_IP="192.168.x.y" | |
15 | ||
16 | # Additional options to pass to squeezelite: | |
17 | # Please do not include -z to make squeezelite daemonise itself. | |
18 | #SB_EXTRA_ARGS="" |
0 | #!/bin/sh | |
1 | ### BEGIN INIT INFO | |
2 | # Provides: squeezelite | |
3 | # Required-Start: $network $remote_fs | |
4 | # Required-Stop: $remote_fs | |
5 | # Default-Start: 2 3 4 5 | |
6 | # Default-Stop: 0 1 6 | |
7 | # Short-Description: Lightweight headless Squeezebox emulator | |
8 | # Description: Lightweight headless streaming audio player for Logitech's | |
9 | # Squeezebox audio server | |
10 | ### END INIT INFO | |
11 | ||
12 | # Author: Chris Boot <debian@bootc.net> | |
13 | ||
14 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
15 | DESC="Squeezebox client" | |
16 | NAME=squeezelite | |
17 | DAEMON=/usr/bin/$NAME | |
18 | PIDFILE=/run/$NAME.pid | |
19 | SCRIPTNAME=/etc/init.d/$NAME | |
20 | ||
21 | # Exit if the package is not installed | |
22 | [ -x "$DAEMON" ] || exit 0 | |
23 | ||
24 | # Read configuration variable file if it is present | |
25 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME | |
26 | ||
27 | # Load the VERBOSE setting and other rcS variables | |
28 | . /lib/init/vars.sh | |
29 | ||
30 | # Define LSB log_* functions. | |
31 | . /lib/lsb/init-functions | |
32 | ||
33 | # | |
34 | # Function that starts the daemon/service | |
35 | # | |
36 | do_start() | |
37 | { | |
38 | DAEMON_ARGS="" | |
39 | ||
40 | # add squeezelite name if set | |
41 | if [ -n "$SL_NAME" ]; then | |
42 | DAEMON_ARGS="${DAEMON_ARGS} -n ${SL_NAME}" | |
43 | fi | |
44 | ||
45 | # add souncard setting if set | |
46 | if [ -n "$SL_SOUNDCARD" ]; then | |
47 | DAEMON_ARGS="${DAEMON_ARGS} -o ${SL_SOUNDCARD}" | |
48 | fi | |
49 | ||
50 | # add squeezebox server ip address if set | |
51 | if [ -n "$SB_SERVER_IP" ]; then | |
52 | DAEMON_ARGS="${DAEMON_ARGS} -s ${SB_SERVER_IP}" | |
53 | fi | |
54 | ||
55 | # add any other options given by the user | |
56 | if [ -n "$SB_EXTRA_ARGS" ]; then | |
57 | DAEMON_ARGS="${DAEMON_ARGS} ${SB_EXTRA_ARGS}" | |
58 | fi | |
59 | ||
60 | # Return | |
61 | # 0 if daemon has been started | |
62 | # 1 if daemon was already running | |
63 | # 2 if daemon could not be started | |
64 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \ | |
65 | --test > /dev/null || return 1 | |
66 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \ | |
67 | --background --make-pidfile -- $DAEMON_ARGS || return 2 | |
68 | } | |
69 | ||
70 | # | |
71 | # Function that stops the daemon/service | |
72 | # | |
73 | do_stop() | |
74 | { | |
75 | # Return | |
76 | # 0 if daemon has been stopped | |
77 | # 1 if daemon was already stopped | |
78 | # 2 if daemon could not be stopped | |
79 | # other if a failure occurred | |
80 | start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \ | |
81 | --pidfile $PIDFILE --name $NAME | |
82 | } | |
83 | ||
84 | case "$1" in | |
85 | start) | |
86 | [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" | |
87 | do_start; RET=$? | |
88 | case $RET in | |
89 | 0|1) [ "$VERBOSE" != no ] && log_end_msg 0; exit 0 ;; | |
90 | *) [ "$VERBOSE" != no ] && log_end_msg 1; exit 1 ;; | |
91 | esac | |
92 | ;; | |
93 | stop) | |
94 | [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" | |
95 | do_stop; RET=$? | |
96 | case $RET in | |
97 | 0|1) [ "$VERBOSE" != no ] && log_end_msg 0; exit 0 ;; | |
98 | *) [ "$VERBOSE" != no ] && log_end_msg 1; exit 1 ;; | |
99 | esac | |
100 | ;; | |
101 | status) | |
102 | status_of_proc "$DAEMON" "$NAME" | |
103 | ;; | |
104 | restart|force-reload) | |
105 | log_daemon_msg "Restarting $DESC" "$NAME" | |
106 | do_stop; RET=$? | |
107 | case $RET in | |
108 | 0|1) | |
109 | do_start; RET=$? | |
110 | case $RET in | |
111 | 0) log_end_msg 0; exit 0 ;; | |
112 | 1) log_end_msg 1; exit 1 ;; # Old process is still running | |
113 | *) log_end_msg 1; exit 1 ;; # Failed to start | |
114 | esac | |
115 | ;; | |
116 | *) | |
117 | # Failed to stop | |
118 | log_end_msg 1; exit 1 | |
119 | ;; | |
120 | esac | |
121 | ;; | |
122 | *) | |
123 | echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 | |
124 | exit 3 | |
125 | ;; | |
126 | esac | |
127 |
0 | squeezelite /usr/bin |
0 | ||
1 | # There is no upstream changelog shipped with the package | |
2 | squeezelite binary: no-upstream-changelog | |
3 |
0 | debian/man/squeezelite.1 |