From dabf28100070b76a99ea4da21eefefb474fcf061 Mon Sep 17 00:00:00 2001 From: badaix Date: Mon, 28 Dec 2015 13:48:20 +0100 Subject: [PATCH] added files to build debian packages --- client/Makefile | 38 +++++++++++++++--- client/debian/changelog | 67 ++++++++++++++++++++++++++++++++ client/debian/compat | 1 + client/debian/control | 20 ++++++++++ client/debian/copyright | 34 ++++++++++++++++ client/debian/docs | 1 + client/debian/rules | 13 +++++++ client/debian/snapclient.default | 2 + server/Makefile | 34 ++++++++++++++-- server/debian/changelog | 67 ++++++++++++++++++++++++++++++++ server/debian/compat | 1 + server/debian/control | 20 ++++++++++ server/debian/copyright | 34 ++++++++++++++++ server/debian/docs | 1 + server/debian/rules | 13 +++++++ server/debian/snapserver.default | 2 + 16 files changed, 338 insertions(+), 10 deletions(-) create mode 100644 client/debian/changelog create mode 100644 client/debian/compat create mode 100644 client/debian/control create mode 100644 client/debian/copyright create mode 100644 client/debian/docs create mode 100755 client/debian/rules create mode 100644 client/debian/snapclient.default create mode 100644 server/debian/changelog create mode 100644 server/debian/compat create mode 100644 server/debian/control create mode 100644 server/debian/copyright create mode 100644 server/debian/docs create mode 100755 server/debian/rules create mode 100644 server/debian/snapserver.default diff --git a/client/Makefile b/client/Makefile index a1aad65e..81678d64 100644 --- a/client/Makefile +++ b/client/Makefile @@ -1,10 +1,17 @@ -VERSION = 0.3.4 +VERSION = 0.4.0 TARGET = snapclient SHELL = /bin/bash +ifdef DESTDIR +# dh_auto_install (Debian) sets this variable + TARGET_DIR = $(DESTDIR)/usr +else + TARGET_DIR ?= /usr +endif + CXX = /usr/bin/g++ -CFLAGS = -std=c++0x -Wall -Wno-unused-function -O3 -pthread -DVERSION=\"$(VERSION)\" -I.. # -static-libgcc -static-libstdc++ -LDFLAGS = -lrt -lboost_system -lboost_program_options -lasound -logg -lvorbis -lvorbisenc -lFLAC -lavahi-client -lavahi-common +CFLAGS = -std=c++0x -Wall -Wno-unused-function -O3 -pthread -DVERSION=\"$(VERSION)\" -I.. #-static -static-libgcc -static-libstdc++ +LDFLAGS = -lrt -lboost_system -lboost_program_options -lasound -logg -lvorbis -lFLAC -lavahi-client -lavahi-common OBJ = snapClient.o stream.o alsaPlayer.o clientConnection.o timeProvider.o decoder/oggDecoder.o decoder/pcmDecoder.o decoder/flacDecoder.o controller.o browseAvahi.o ../message/pcmChunk.o ../common/log.o ../message/sampleFormat.o BIN = snapclient @@ -21,7 +28,27 @@ $(TARGET): $(OBJ) clean: rm -rf $(BIN) $(OBJ) *~ -install: $(TARGET) uninstall +.PHONY: dpkg +#sudo apt-get install build-essential debhelper dh-make dh-systemd quilt fakeroot lintian +dpkg: + cp ../init.scripts/sysv/$(BIN) debian/$(BIN).init + cp ../init.scripts/systemd/$(BIN).service debian/$(BIN).service + dpkg-buildpackage -rfakeroot -b + dh_clean + rm -f debian/$(BIN).service + rm -f debian/$(BIN).init + +ifdef DESTDIR + +install: + install -D -g root -o root $(BIN) $(TARGET_DIR)/sbin/$(BIN) + install -D -g root -o root $(BIN).1 $(TARGET_DIR)/share/man/man1/$(BIN).1 + +else + +install: + install -D -g root -o root $(BIN) $(TARGET_DIR)/sbin/$(BIN) + install -D -g root -o root $(BIN).1 $(TARGET_DIR)/share/man/man1/$(BIN).1 @if [[ `systemctl` =~ -\.mount ]]; then \ $(MAKE) installsystemd; \ elif [[ `/sbin/init --version` =~ upstart ]]; then \ @@ -32,10 +59,10 @@ install: $(TARGET) uninstall echo cannot tell; \ fi; \ +endif installsystemd: @echo using systemd; \ - cp ./$(BIN) /usr/sbin/$(BIN); \ cp ../init.scripts/systemd/$(BIN).service /lib/systemd/system/$(BIN).service; \ systemctl daemon-reload; \ systemctl enable $(BIN); \ @@ -43,7 +70,6 @@ installsystemd: installsysv: @echo using sysv; \ - cp ./$(BIN) /usr/sbin/$(BIN); \ cp ../init.scripts/sysv/$(BIN) /etc/init.d/$(BIN); \ update-rc.d $(BIN) defaults; \ /etc/init.d/$(BIN) start; \ diff --git a/client/debian/changelog b/client/debian/changelog new file mode 100644 index 00000000..197054eb --- /dev/null +++ b/client/debian/changelog @@ -0,0 +1,67 @@ +snapclient (0.4.0) unstable; urgency=low + + * Features + Debian packages (.deb) for amd64 and armhf + Added man pages + * Bugfixes + Snapserver and Snapclient are started as daemon on systemd systems (e.g. ARCH, Debian Jessie) + * General + Snapserver is started with normal process priority (changed nice from -3 to 0) + + -- Johannes Pohl Mon, 28 Dec 2015 12:00:00 +0200 + +snapclient (0.3.4) unstable; urgency=low + + * Bugfixes + Fix synchronization bug in FLAC decoder that could cause audible dropouts + + -- Johannes Pohl Wed, 23 Dec 2015 12:00:00 +0200 + +snapclient (0.3.3) unstable; urgency=low + + * Bugfixes + Fix Segfault when ALSA device has no description + + -- Johannes Pohl Sun, 15 Nov 2015 12:00:00 +0200 + +snapclient (0.3.2) unstable; urgency=low + + * General + Makefile uses CXX instead of CC to invoke the c++ compiler + * Bugfixes + Time calculation for PCM chunk play-out was wrong on some gcc versions + + -- Johannes Pohl Wed, 30 Sep 2015 12:00:00 +0200 + +snapclient (0.3.1) unstable; urgency=low + + * General + Improved stability over WiFi by avoiding simultaneous reads/writes on the socket connection + * Bugfixes + Fixed a bug in avahi browser + + -- Johannes Pohl Wed, 26 Aug 2015 12:00:00 +0200 + +snapclient (0.3.0) unstable; urgency=low + + * Features + Configurable codec options. Run snapserver -c [flac|ogg|pcm]:? to get supported options for the codec + Configurable buffer size for the pipe reader (default 20ms, was 50ms before) + Process priority can be changed as argument to the daemon option -d. Default priority is -3 + * Bugfixes + Fixed deadlock in logger + Fixed occasional timeouts for client to server requests (e.g. time sync commands) + Client didn't connect to a local server if the loopback device is the only device with an address + * General + Code clean up + Refactored encoding for lower latency + + -- Johannes Pohl Sun, 16 Aug 2015 19:25:51 +0100 + +snapclient (0.2.1) unstable; urgency=low + + * Features + Arch Linux compatibility + + -- Johannes Pohl Fri, 24 Jul 2015 15:47:00 +0100 + diff --git a/client/debian/compat b/client/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/client/debian/compat @@ -0,0 +1 @@ +9 diff --git a/client/debian/control b/client/debian/control new file mode 100644 index 00000000..960deaf0 --- /dev/null +++ b/client/debian/control @@ -0,0 +1,20 @@ +Source: snapclient +Section: utils +Priority: extra +Maintainer: Johannes Pohl +Build-Depends: debhelper (>= 9.0.0), libc6-dev, dh-systemd, libavahi-client3 (>= 0.6.16), libboost-program-options-dev (>= 1.50.0), libboost-system-dev (>= 1.50.0), libflac8 (>= 1.3.0), libogg0 (>= 1.0rc3), libvorbis0a (>= 1.1.2) +Standards-Version: 3.8.4 +Homepage: https://github.com/badaix/snapcast + +Package: snapclient +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Snapcast client + SnapCast is a multi-room client-server audio player, where all clients are + time synchronized with the server to play perfectly synced audio. It's not a + standalone player, but an extension that turns your existing audio player into + a Sonos-like multi-room solution. + The server's audio input is a named pipe `/tmp/snapfifo`. All data that is fed + into this file will be send to the connected clients. One of the most generic + ways to use SnapCast is in conjunction with the music player daemon or Mopidy, + which can be configured to use a named pipe as audio output. diff --git a/client/debian/copyright b/client/debian/copyright new file mode 100644 index 00000000..6d7b0ed8 --- /dev/null +++ b/client/debian/copyright @@ -0,0 +1,34 @@ +This work was written and packaged by Johannes Pohl + +It was downloaded from: + +Upstream Author: Johannes Pohl + +Copyright: + + + +License: + + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +On Debian systems, the complete text of the GNU General +Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +The Debian packaging is: + + Copyright (C) 2015 Johannes Pohl + +and is licensed under the GPL version 3, see above. + diff --git a/client/debian/docs b/client/debian/docs new file mode 100644 index 00000000..94389aee --- /dev/null +++ b/client/debian/docs @@ -0,0 +1 @@ +../README.md diff --git a/client/debian/rules b/client/debian/rules new file mode 100755 index 00000000..e060afd3 --- /dev/null +++ b/client/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +%: + dh $@ --with=systemd diff --git a/client/debian/snapclient.default b/client/debian/snapclient.default new file mode 100644 index 00000000..48d363b5 --- /dev/null +++ b/client/debian/snapclient.default @@ -0,0 +1,2 @@ +# defaults file for snapclient +# currently not used diff --git a/server/Makefile b/server/Makefile index 41b9f427..2119a212 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,7 +1,14 @@ -VERSION = 0.3.4 +VERSION = 0.4.0 TARGET = snapserver SHELL = /bin/bash +ifdef DESTDIR +# dh_auto_install (Debian) sets this variable + TARGET_DIR = $(DESTDIR)/usr +else + TARGET_DIR ?= /usr +endif + CXX = /usr/bin/g++ CFLAGS = -std=c++0x -Wall -Wno-unused-function -O3 -pthread -DVERSION=\"$(VERSION)\" -I.. LDFLAGS = -lrt -lboost_system -lboost_program_options -lvorbis -lvorbisenc -logg -lFLAC -lavahi-client -lavahi-common @@ -21,7 +28,27 @@ $(TARGET): $(OBJ) clean: rm -rf $(BIN) $(OBJ) *~ -install: $(TARGET) uninstall +.PHONY: dpkg +#sudo apt-get install build-essential debhelper dh-make dh-systemd quilt fakeroot lintian +dpkg: + cp ../init.scripts/sysv/$(BIN) debian/$(BIN).init + cp ../init.scripts/systemd/$(BIN).service debian/$(BIN).service + dpkg-buildpackage -rfakeroot -b + dh_clean + rm -f debian/$(BIN).service + rm -f debian/$(BIN).init + +ifdef DESTDIR + +install: + install -D -g root -o root $(BIN) $(TARGET_DIR)/sbin/$(BIN) + install -D -g root -o root $(BIN).1 $(TARGET_DIR)/share/man/man1/$(BIN).1 + +else + +install: + install -D -g root -o root $(BIN) $(TARGET_DIR)/sbin/$(BIN) + install -D -g root -o root $(BIN).1 $(TARGET_DIR)/share/man/man1/$(BIN).1 @if [[ `systemctl` =~ -\.mount ]]; then \ $(MAKE) installsystemd; \ elif [[ `/sbin/init --version` =~ upstart ]]; then \ @@ -32,10 +59,10 @@ install: $(TARGET) uninstall echo cannot tell; \ fi; \ +endif installsystemd: @echo using systemd; \ - cp ./$(BIN) /usr/sbin/$(BIN); \ cp ../init.scripts/systemd/$(BIN).service /lib/systemd/system/$(BIN).service; \ systemctl daemon-reload; \ systemctl enable $(BIN); \ @@ -43,7 +70,6 @@ installsystemd: installsysv: @echo using sysv; \ - cp ./$(BIN) /usr/sbin/$(BIN); \ cp ../init.scripts/sysv/$(BIN) /etc/init.d/$(BIN); \ update-rc.d $(BIN) defaults; \ /etc/init.d/$(BIN) start; \ diff --git a/server/debian/changelog b/server/debian/changelog new file mode 100644 index 00000000..026c7285 --- /dev/null +++ b/server/debian/changelog @@ -0,0 +1,67 @@ +snapserver (0.4.0) unstable; urgency=low + + * Features + Debian packages (.deb) for amd64 and armhf + Added man pages + * Bugfixes + Snapserver and Snapclient are started as daemon on systemd systems (e.g. ARCH, Debian Jessie) + * General + Snapserver is started with normal process priority (changed nice from -3 to 0) + + -- Johannes Pohl Mon, 28 Dec 2015 12:00:00 +0200 + +snapserver (0.3.4) unstable; urgency=low + + * Bugfixes + Fix synchronization bug in FLAC decoder that could cause audible dropouts + + -- Johannes Pohl Wed, 23 Dec 2015 12:00:00 +0200 + +snapserver (0.3.3) unstable; urgency=low + + * Bugfixes + Fix Segfault when ALSA device has no description + + -- Johannes Pohl Sun, 15 Nov 2015 12:00:00 +0200 + +snapserver (0.3.2) unstable; urgency=low + + * General + Makefile uses CXX instead of CC to invoke the c++ compiler + * Bugfixes + Time calculation for PCM chunk play-out was wrong on some gcc versions + + -- Johannes Pohl Wed, 30 Sep 2015 12:00:00 +0200 + +snapserver (0.3.1) unstable; urgency=low + + * General + Improved stability over WiFi by avoiding simultaneous reads/writes on the socket connection + * Bugfixes + Fixed a bug in avahi browser + + -- Johannes Pohl Wed, 26 Aug 2015 12:00:00 +0200 + +snapserver (0.3.0) unstable; urgency=low + + * Features + Configurable codec options. Run snapserver -c [flac|ogg|pcm]:? to get supported options for the codec + Configurable buffer size for the pipe reader (default 20ms, was 50ms before) + Process priority can be changed as argument to the daemon option -d. Default priority is -3 + * Bugfixes + Fixed deadlock in logger + Fixed occasional timeouts for client to server requests (e.g. time sync commands) + Client didn't connect to a local server if the loopback device is the only device with an address + * General + Code clean up + Refactored encoding for lower latency + + -- Johannes Pohl Sun, 16 Aug 2015 19:25:51 +0100 + +snapserver (0.2.1) unstable; urgency=low + + * Features + Arch Linux compatibility + + -- Johannes Pohl Fri, 24 Jul 2015 15:47:00 +0100 + diff --git a/server/debian/compat b/server/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/server/debian/compat @@ -0,0 +1 @@ +9 diff --git a/server/debian/control b/server/debian/control new file mode 100644 index 00000000..bf7be47e --- /dev/null +++ b/server/debian/control @@ -0,0 +1,20 @@ +Source: snapserver +Section: utils +Priority: extra +Maintainer: Johannes Pohl +Build-Depends: debhelper (>= 9.0.0), libc6-dev, dh-systemd, libavahi-client3 (>= 0.6.16), libboost-program-options-dev (>= 1.50.0), libboost-system-dev (>= 1.50.0), libflac8 (>= 1.3.0), libogg0 (>= 1.0rc3), libvorbis0a (>= 1.1.2), libvorbisenc2 (>= 1.1.2) +Standards-Version: 3.8.4 +Homepage: https://github.com/badaix/snapcast + +Package: snapserver +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Snapcast server + SnapCast is a multi-room client-server audio player, where all clients are + time synchronized with the server to play perfectly synced audio. It's not a + standalone player, but an extension that turns your existing audio player into + a Sonos-like multi-room solution. + The server's audio input is a named pipe `/tmp/snapfifo`. All data that is fed + into this file will be send to the connected clients. One of the most generic + ways to use SnapCast is in conjunction with the music player daemon or Mopidy, + which can be configured to use a named pipe as audio output. diff --git a/server/debian/copyright b/server/debian/copyright new file mode 100644 index 00000000..6d7b0ed8 --- /dev/null +++ b/server/debian/copyright @@ -0,0 +1,34 @@ +This work was written and packaged by Johannes Pohl + +It was downloaded from: + +Upstream Author: Johannes Pohl + +Copyright: + + + +License: + + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +On Debian systems, the complete text of the GNU General +Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +The Debian packaging is: + + Copyright (C) 2015 Johannes Pohl + +and is licensed under the GPL version 3, see above. + diff --git a/server/debian/docs b/server/debian/docs new file mode 100644 index 00000000..94389aee --- /dev/null +++ b/server/debian/docs @@ -0,0 +1 @@ +../README.md diff --git a/server/debian/rules b/server/debian/rules new file mode 100755 index 00000000..e060afd3 --- /dev/null +++ b/server/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +%: + dh $@ --with=systemd diff --git a/server/debian/snapserver.default b/server/debian/snapserver.default new file mode 100644 index 00000000..66432047 --- /dev/null +++ b/server/debian/snapserver.default @@ -0,0 +1,2 @@ +# defaults file for snapserver +# currently not used