Package: thinkfan
Version: 0.8.1-1
Severity: normal
Tags: patch

The attached patch makes thinkfan use dh-systemd. While there are no
resulting changes in the maintscripts in this case, it is still
worthwhile to do this:

1) It confirms that the maintainer is aware of dh-systemd and uses it.
2) It documents the intention of not enabling the thinkfan.service file
   by default (see the comment in debian/rules).
3) Future fixes can be rolled out through dh-systemd.

Please apply the patch for your next upload.

Thanks.
>From c614e1a23f5e16f8726b3acab98dc17a9e608e5b Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <[email protected]>
Date: Sun, 23 Jun 2013 15:16:14 +0200
Subject: [PATCH 2/2] use dh-systemd for proper systemd-related maintscripts

---
 debian/control |    2 +-
 debian/rules   |    8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 62471bd..bac91c1 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: thinkfan
 Section: misc
 Priority: extra
 Maintainer: Evgeni Golov <[email protected]>
-Build-Depends: debhelper (>= 9)
+Build-Depends: debhelper (>= 9), dh-systemd (>= 1.3)
 Standards-Version: 3.9.3
 Homepage: http://sourceforge.net/projects/thinkfan/
 Vcs-Git: git://git.debian.org/users/evgeni/thinkfan.git
diff --git a/debian/rules b/debian/rules
index 0cdda83..343c2b8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 %:
-	dh $@
+	dh $@ --with=systemd
 
 override_dh_auto_install:
 	install -D -m0755 thinkfan $(CURDIR)/debian/thinkfan/usr/sbin/thinkfan
@@ -11,3 +11,9 @@ override_dh_auto_install:
 
 override_dh_installinit:
 	dh_installinit --onlyscripts
+
+override_dh_systemd_enable:
+	# Do not enable the file by default on purpose.
+	# The user should enable it only after making sure the configuration is
+	# appropriate for his/her computer.
+	# This corresponds to START=no in /etc/default/thinkfan
-- 
1.7.10.4

Reply via email to