From 3cb4b947ac96ef5ec2a887bb130257fe69f629c5 Mon Sep 17 00:00:00 2001
From: Andrew Ruthven <andrew@etc.gen.nz>
Date: Sun, 14 Feb 2021 13:38:49 +1300
Subject: [PATCH] Convert to use dh sequencer

---
 Makefile         | 13 +++++------
 debian/changelog |  1 +
 debian/rules     | 56 +++---------------------------------------------
 3 files changed, 11 insertions(+), 59 deletions(-)

diff --git a/Makefile b/Makefile
index de57b70..d4dbda6 100755
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,8 @@ RELEASE_FILES=$(orig_tarball) build/tarball/mythtv-status-${version}.tar.gz $(DE
 TEST_VERBOSE=0
 TEST_FILES=t/*.t
 
-all: test release
+all: test
+dist: test release
 
 release: $(RELEASE_FILES)
 
@@ -74,13 +75,13 @@ install:
 	pod2man bin/mythtv-status > $(MANDIR)/man1/mythtv-status.1
 	install -m 644 man/mythtv_recording_now.1 $(MANDIR)/man1
 	install -m 644 man/mythtv_recording_soon.1 $(MANDIR)/man1
+	install -m 644 man/mythtv-update-motd.1 $(MANDIR)/man1
 
 test:
 	PERL_DL_NONLAZY=1 perl "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE))" $(TEST_FILES)
 
+clean_pkg:
+	rm -rf build
+	rm -f ../$(package)*.changes ../$(package)*.dsc ../$(package)*.tar.gz ../$(package)*.deb
 
-clean:
-	@rm -rf build
-	@rm -f ../$(package)*.changes ../$(package)*.dsc ../$(package)*.tar.gz ../$(package)*.deb
-
-.PHONY: release clean sponsor install test
+.PHONY: release clean_pkg sponsor install test clean_pkg dist
diff --git a/debian/changelog b/debian/changelog
index 15090ba..a8dd006 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ mythtv-status (1.0.2-1) unstable; urgency=medium
   * Add a Pre-Depends so init-system-helpers is available.
   * Add the copyright information for debian/po/* files where contributors
     have stated their own (or shared) copyright.
+  * Convert debian/rules to use dh sequencer.
 
  -- Andrew Ruthven <andrew@etc.gen.nz>  Sun, 06 Dec 2020 22:51:12 +1300
 
diff --git a/debian/rules b/debian/rules
index 51ce17a..5fa6f8b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,59 +1,9 @@
 #!/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
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp configure-stamp
-	dh_clean 
-	debconf-updatepo
+%:
+	dh $@
 
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
-build-stamp: 
-	pod2man bin/mythtv-status > debian/mythtv-status.1
-	@touch build-stamp
-
-install: build-stamp
-	dh_testdir
-	dh_testroot
-	dh_prep 
-	dh_installdirs
-
-# Build architecture-independent files here.
-binary-indep: install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs ChangeLog
-	dh_installdocs
-	dh_installexamples
-	dh_install
-	dh_installdebconf	
-# Make sure we start after mythtv-backend
-	dh_installinit -- defaults 51
-	dh_installcron
-	dh_installman debian/mythtv-status.1 man/*
-	dh_compress
-	dh_fixperms
-	dh_perl
-	dh_installdeb
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-
-# Build architecture-dependent files here.
-binary-arch: install
-# We have nothing to do by default.
-
-binary: binary-indep binary-arch
-.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure
+override_dh_auto_build:
-- 
2.30.2