From 6ae03e28eb75607ef87994ec9823031b66a24390 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Sat, 29 Apr 2023 17:00:36 +1000 Subject: [PATCH] debuild cleanup --- Makefile | 45 +++++++++++++++++++++--------------- debian/README.Debian | 4 ++-- debian/README.source | 7 ++---- debian/alsa-dispatcher.links | 1 + debian/changelog | 4 ++-- debian/control | 4 ++-- debian/rules | 11 ++++----- 7 files changed, 41 insertions(+), 35 deletions(-) create mode 100644 debian/alsa-dispatcher.links diff --git a/Makefile b/Makefile index 6649bf9..658b7c7 100644 --- a/Makefile +++ b/Makefile @@ -1,37 +1,46 @@ # Local building -default: alsa-dispatcher.8 alsa-dispatcher +default: alsa-dispatcher.8.gz alsa-dispatcher ALSACONF = $(DESTDIR)/etc/alsa/conf.d/51-dispatcher.conf -%.8: %.8.adoc - asciidoctor -b manpage $< +%: %.lsp + newlisp -x $< $@ + chmod a+x $@ + +%.8.gz: %.8.adoc + asciidoctor -b manpage $< -o - | gzip > $@ $(HOME)/.asoundrc: example.alsa.conf grep -q ^pcm.dispatch $@ || cat $< >> $@ clean:: - rm -f alsa-dispatcher alsa-dispatcher.8 + rm -f alsa-dispatcher alsa-dispatcher.8.gz # 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 +BINS = alsa-dispatcher alsa-dispatcher.lsp +MANS = alsa-dispatcher.8.gz +CFG = 51-alsa-dispatcher.conf -$(BIN): alsa-dispatcher.lsp - mkdir -p $$(dirname $@) - newlisp -x $< $@ - chmod a+x $@ +BINDIR = ${DESTDIR}/usr/bin +MANDIR = ${DESTDIR}/usr/share/man/man8 +CFGDIR = ${DESTDIR}/etc/alsa/conf.d + +INSTALLFILES = $(addprefix ${BINDIR}/,${BINS}) +INSTALLFILES += $(addprefix ${MANDIR}/,${MANS}) +INSTALLFILES += $(addprefix ${CFGDIR}/,${CFG}) -$(MAN): alsa-dispatcher.8.adoc +${BINDIR}/% ${MANDIR}/%: % mkdir -p $$(dirname $@) - asciidoctor -b manpage $< -o - | gzip > $@ + install $< $@ -$(CFG): example.alsa.conf +${CFGDIR}/51-alsa-dispatcher.conf: example.alsa.conf mkdir -p $$(dirname $@) - cp $< $@ + install -m 644 $< $@ + +install: ${INSTALLFILES} -install: $(BIN) $(CFG) $(MAN) +GENERATED = debian/alsa-dispatcher debian/.debhelper debian/files +GENERATED += debian/alsa-dispatcher.substvars debian/debhelper-build-stamp clean:: - rm -rf debian/alsa-dispatcher debian/alsa-dispatcher.substvars - rm -f debian/files debian/debhelper-build-stamp + rm -rf ${GENERATED} diff --git a/debian/README.Debian b/debian/README.Debian index 3540506..abc0015 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,6 +1,6 @@ alsa-dispatcher for Debian ------------------------- - +Written in newlisp for easy modification. - -- Ralph Ronnquist Sat, 29 Apr 2023 13:18:58 +1000 + -- Ralph Ronnquist Sat, 29 Apr 2023 13:18:58 +1000 diff --git a/debian/README.source b/debian/README.source index 3fe60a8..d73ced1 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,10 +1,7 @@ alsa-dispatcher for Debian ------------------------- - +Written in newlisp for easy modification. - - - -- Ralph Ronnquist Sat, 29 Apr 2023 13:18:58 +1000 + -- Ralph Ronnquist Sat, 29 Apr 2023 13:18:58 +1000 diff --git a/debian/alsa-dispatcher.links b/debian/alsa-dispatcher.links new file mode 100644 index 0000000..38846c4 --- /dev/null +++ b/debian/alsa-dispatcher.links @@ -0,0 +1 @@ + alsa-dispatcher.8.gz usr/share/man/man8/alsa-dispatcher.lsp.8.gz diff --git a/debian/changelog b/debian/changelog index f3d52bf..9d37b88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -alsa-dispatcher (0.1) unstable; urgency=medium +alsa-dispatcher (0.1) unreleased; urgency=medium * Initial Release. - -- Ralph Ronnquist Sat, 29 Apr 2023 13:18:58 +1000 + -- Ralph Ronnquist Sat, 29 Apr 2023 13:18:58 +1000 diff --git a/debian/control b/debian/control index dadd371..0fbb558 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: alsa-dispatcher -Section: unknown +Section: sound Priority: optional Maintainer: Ralph Ronnquist Build-Depends: debhelper-compat (= 13) @@ -11,7 +11,7 @@ Rules-Requires-Root: no Package: alsa-dispatcher Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, newlisp 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 diff --git a/debian/rules b/debian/rules index 9e711eb..4642dd6 100755 --- a/debian/rules +++ b/debian/rules @@ -12,13 +12,12 @@ # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed - %: dh $@ +#-# The following is some useful documentation that I want to keep +#-# exampe for override targets generated by dh_make +#-# override_dh_auto_configure: +#-# dh_auto_configure -- \ +#-# -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) -# 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) -- 2.39.2