-default: alsa-dispatcher.8
+# Local building
+default: alsa-dispatcher.8 alsa-dispatcher
-%8: %8.adoc
+ALSACONF = $(DESTDIR)/etc/alsa/conf.d/51-dispatcher.conf
+
+%.8: %.8.adoc
asciidoctor -b manpage $<
+
+$(HOME)/.asoundrc: example.alsa.conf
+ grep -q ^pcm.dispatch $@ || cat $< >> $@
+
+clean::
+ rm -f alsa-dispatcher alsa-dispatcher.8
+
+# Installation building
+BIN = $(DESTDIR)/usr/bin/alsa-dispatcher
+CFG = $(DESTDIR)/etc/alsa/conf.d/51-alsa-dispatcher.conf
+MAN = $(DESTDIR)/usr/share/man/man8/alsa-dispatcher.8.gz
+
+$(BIN): alsa-dispatcher.lsp
+ mkdir -p $$(dirname $@)
+ newlisp -x $< $@
+ chmod a+x $@
+
+$(MAN): alsa-dispatcher.8.adoc
+ mkdir -p $$(dirname $@)
+ asciidoctor -b manpage $< -o - | gzip > $@
+
+$(CFG): example.alsa.conf
+ mkdir -p $$(dirname $@)
+ cp $< $@
+
+install: $(BIN) $(CFG) $(MAN)
+
+clean::
+ rm -rf debian/alsa-dispatcher debian/alsa-dispatcher.substvars
+ rm -f debian/files debian/debhelper-build-stamp
--- /dev/null
+The Debian Package alsa-dispatcher
+----------------------------
+
+Comments regarding the Package
+
+ -- Ralph Ronnquist <ralph@localhost> Sat, 29 Apr 2023 13:18:58 +1000
--- /dev/null
+alsa-dispatcher for Debian
+-------------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Ralph Ronnquist <ralph@localhost> Sat, 29 Apr 2023 13:18:58 +1000
--- /dev/null
+alsa-dispatcher for Debian
+-------------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+ -- Ralph Ronnquist <ralph@localhost> Sat, 29 Apr 2023 13:18:58 +1000
+
--- /dev/null
+alsa-dispatcher (0.1) unstable; urgency=medium
+
+ * Initial Release.
+
+ -- Ralph Ronnquist <ralph.ronnquit@gmail.com> Sat, 29 Apr 2023 13:18:58 +1000
--- /dev/null
+Source: alsa-dispatcher
+Section: unknown
+Priority: optional
+Maintainer: Ralph Ronnquist <ralph.ronnquist@gmail.com>
+Build-Depends: debhelper-compat (= 13)
+Standards-Version: 4.5.1
+Homepage: https://git.rrq.au/?p=ralph/alsa-dispatcher.git
+Vcs-Browser: https://git.rrq.au/?p=ralph/alsa-dispatcher.git
+Vcs-Git: https://git.rrq.au/git/ralph/alsa-dispatcher.git
+Rules-Requires-Root: no
+
+Package: alsa-dispatcher
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: ALSA priority dispatcher for occasional playback endpoints.
+ This is an ALSA utility that handles dispatch of audio playback via a
+ priority list of possible endpoints. The dispatch logic works through
+ the list trying to open each ALSA PCM device in order until one
+ succeeds, and thereafter alsa-dispatcher.lsp simply channels the
+ playback audio stream from its standard input to the successfully
+ opened PCM playback device.
--- /dev/null
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: alsa-dispatcher
+Upstream-Contact: Ralph Ronnquist <ralph.ronnquist@gmail.com>
+Source: https://git.rrq.au/?p=ralph/alsa-dispatcher.git
+
+Files: *
+Copyright: 2023 Ralph Ronnquist <ralph@localhost>
+License: GPL-3.0+
+
+License: GPL-3.0+
+ 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 <https://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".
--- /dev/null
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+%:
+ dh $@
+
+
+# dh_make generated override targets
+# This is example for Cmake (See https://bugs.debian.org/641051 )
+#override_dh_auto_configure:
+# dh_auto_configure -- \
+# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
--- /dev/null
+3.0 (native)