Skip to content

Commit

Permalink
added files to build debian packages
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Dec 28, 2015
1 parent ae5ebf0 commit dabf281
Show file tree
Hide file tree
Showing 16 changed files with 338 additions and 10 deletions.
38 changes: 32 additions & 6 deletions client/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand All @@ -32,18 +59,17 @@ 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); \
systemctl start $(BIN); \

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; \
Expand Down
67 changes: 67 additions & 0 deletions client/debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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<proi>. 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 <[email protected]> Sun, 16 Aug 2015 19:25:51 +0100

snapclient (0.2.1) unstable; urgency=low

* Features
Arch Linux compatibility

-- Johannes Pohl <[email protected]> Fri, 24 Jul 2015 15:47:00 +0100

1 change: 1 addition & 0 deletions client/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
20 changes: 20 additions & 0 deletions client/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Source: snapclient
Section: utils
Priority: extra
Maintainer: Johannes Pohl <[email protected]>
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.
34 changes: 34 additions & 0 deletions client/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This work was written and packaged by Johannes Pohl <[email protected]>

It was downloaded from: <https://github.com/badaix/snapcast>

Upstream Author: Johannes Pohl <[email protected]>

Copyright:

<Copyright (C) 2014-2016 Johannes Pohl>

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 <http://www.gnu.org/licenses/>.

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 <[email protected]>

and is licensed under the GPL version 3, see above.

1 change: 1 addition & 0 deletions client/debian/docs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../README.md
13 changes: 13 additions & 0 deletions client/debian/rules
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions client/debian/snapclient.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# defaults file for snapclient
# currently not used
34 changes: 30 additions & 4 deletions server/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand All @@ -32,18 +59,17 @@ 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); \
systemctl start $(BIN); \

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; \
Expand Down
67 changes: 67 additions & 0 deletions server/debian/changelog
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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<proi>. 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 <[email protected]> Sun, 16 Aug 2015 19:25:51 +0100

snapserver (0.2.1) unstable; urgency=low

* Features
Arch Linux compatibility

-- Johannes Pohl <[email protected]> Fri, 24 Jul 2015 15:47:00 +0100

1 change: 1 addition & 0 deletions server/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
20 changes: 20 additions & 0 deletions server/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Source: snapserver
Section: utils
Priority: extra
Maintainer: Johannes Pohl <[email protected]>
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.
Loading

0 comments on commit dabf281

Please sign in to comment.