From: Andrew Ruthven Date: Wed, 26 Jul 2023 12:35:40 +0000 (+1200) Subject: Potentially install our molly-guard and update-motd hooks. X-Git-Tag: 1.2.0~20 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8e5d7a61b778004b9e6a2332f8e063ca6ee496f;p=mythtv-status.git Potentially install our molly-guard and update-motd hooks. --- diff --git a/ChangeLog b/ChangeLog index 1dd53de..6445eff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ Install the systemd files into the UsrMerge location so we'll work with more distributions, thanks to Göran Uddeborgfor pointing this out. + If molly-guard or the Ubuntu/Debian style update-motd is present, install + our hooks for those. + 2023-07-27 Göran Uddebor Install update-update-motd diff --git a/Makefile b/Makefile index 463f1a7..d76c722 100755 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ #!/usr/bin/make -f BINDIR=$(DESTDIR)/usr/bin -SBINDIR=$(DESTDIR)/usr/sbin LIBEXECDIR=$(DESTDIR)/usr/libexec/mythtv-status MANDIR=$(DESTDIR)/usr/man +MOLLY_GUARDDIR=$(DESTDIR)/etc/molly-guard/run.d +SBINDIR=$(DESTDIR)/usr/sbin SYSTEMDDIR=$(DESTDIR)/usr/lib/systemd/system +UPDATE_MOTDDIR=$(DESTDIR)/etc/update-motd.d package=mythtv-status releases=sid @@ -88,6 +90,12 @@ install: install -m 644 man/mythtv_recording_soon.1 $(MANDIR)/man1 install -m 644 systemd/* $(SYSTEMDDIR) + # Only install these files if the directories already exist. + [ -d $(MOLLY_GUARDDIR) ] && \ + install -m 775 molly-guard/* $(MOLLY_GUARDDIR) + [ -d $(UPDATE_MOTDDIR) ] && \ + install -m 775 update-motd.d/* $(UPDATE_MOTDDIR) + test: PERL_DL_NONLAZY=1 perl "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES) diff --git a/debian/dirs b/debian/dirs index 6892884..ef744dd 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1 +1,3 @@ var/lib/mythtv-status +etc/molly-guard/run.d +etc/update-motd.d diff --git a/debian/install b/debian/install index abf89cf..1d53121 100644 --- a/debian/install +++ b/debian/install @@ -1,3 +1 @@ debian/lintian/overrides/mythtv-status usr/share/lintian/overrides -molly-guard/40-mythtv-recording-soon etc/molly-guard/run.d -update-motd.d/50-mythtv-status etc/update-motd.d diff --git a/debian/patches/makefile-debian-paths.patch b/debian/patches/makefile-debian-paths.patch index 2f5d2bf..e34ce02 100644 --- a/debian/patches/makefile-debian-paths.patch +++ b/debian/patches/makefile-debian-paths.patch @@ -6,14 +6,16 @@ Last-Update: 2023-07-16 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/Makefile +++ b/Makefile -@@ -3,8 +3,8 @@ +@@ -2,10 +2,10 @@ + BINDIR=$(DESTDIR)/usr/bin - SBINDIR=$(DESTDIR)/usr/sbin LIBEXECDIR=$(DESTDIR)/usr/libexec/mythtv-status -MANDIR=$(DESTDIR)/usr/man --SYSTEMDDIR=$(DESTDIR)/usr/lib/systemd/system +MANDIR=$(DESTDIR)/usr/share/man + MOLLY_GUARDDIR=$(DESTDIR)/etc/molly-guard/run.d + SBINDIR=$(DESTDIR)/usr/sbin +-SYSTEMDDIR=$(DESTDIR)/usr/lib/systemd/system +SYSTEMDDIR=$(DESTDIR)/lib/systemd/system + UPDATE_MOTDDIR=$(DESTDIR)/etc/update-motd.d package=mythtv-status - releases=sid