Hi,
attached you can find a patch against the current git HEAD which makes
smartmontools install the upstream systemd service file and use
dh-systemd for proper maintscripts support.
Please apply this patch before uploading a new version. Thank you!
For more details on dh-systemd packaging, see
http://wiki.debian.org/Systemd/Packaging
In case of any questions, feel free to drop by in #debian-systemd or
send an email to [email protected]
--
Best regards,
Michael
>From 92683defba4f5a68353339053f9a38fe47cf3066 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <[email protected]>
Date: Tue, 9 Jul 2013 21:51:42 +0200
Subject: [PATCH] Install systemd service file, use dh-systemd
---
debian/control | 2 +-
debian/patches/series | 1 +
debian/patches/service-alias.patch | 17 +++++++++++++++++
debian/rules | 3 +++
4 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 debian/patches/service-alias.patch
diff --git a/debian/control b/debian/control
index 626a3ca..0ab5c58 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: utils
Priority: optional
Maintainer: Giuseppe Iuculano <[email protected]>
Uploaders: Florian Maier <[email protected]>
-Build-Depends: debhelper (>= 7), libcam-dev [kfreebsd-i386 kfreebsd-amd64], automake1.10, autoconf, libcap-ng-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386 !sparc !avr32], libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libusb2-dev [kfreebsd-i386 kfreebsd-amd64], hardening-wrapper
+Build-Depends: debhelper (>= 7), libcam-dev [kfreebsd-i386 kfreebsd-amd64], automake1.10, autoconf, libcap-ng-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386 !sparc !avr32], libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libusb2-dev [kfreebsd-i386 kfreebsd-amd64], hardening-wrapper, dh-systemd (>= 1.4)
Standards-Version: 3.9.4
Vcs-Git: git://anonscm.debian.org/collab-maint/smartmontools.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/smartmontools.git
diff --git a/debian/patches/series b/debian/patches/series
index d4ef71d..695fbb2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
61_cciss-doc.patch
63_removable.patch
manpage.diff
+service-alias.patch
diff --git a/debian/patches/service-alias.patch b/debian/patches/service-alias.patch
new file mode 100644
index 0000000..45a702c
--- /dev/null
+++ b/debian/patches/service-alias.patch
@@ -0,0 +1,17 @@
+Author: Michael Stapelberg <[email protected]>
+Forwarded: not-needed
+Last-Update: 2013-07-09
+Description: We ship /etc/init.d/smartmontools, so make systemd recognize
+ smartmontools.service as an alias for smartd.service.
+
+---
+
+Index: smartmontools/smartd.service.in
+===================================================================
+--- smartmontools.orig/smartd.service.in 2013-07-09 21:50:01.299353681 +0200
++++ smartmontools/smartd.service.in 2013-07-09 21:57:58.037278088 +0200
+@@ -10,3 +10,4 @@
+
+ [Install]
+ WantedBy=multi-user.target
++Alias=smartmontools.service
diff --git a/debian/rules b/debian/rules
index fa0dc7f..88000f3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -56,6 +56,7 @@ configure-stamp:
--with-attributelog=/var/lib/smartmontools/attrlog. \
--with-exampledir=/usr/share/doc/smartmontools/examples/ \
--with-drivedbdir=/var/lib/smartmontools/drivedb \
+ --with-systemdsystemunitdir=/lib/systemd/system \
${CONFIGURE_ARGS}
touch configure-stamp
@@ -100,7 +101,9 @@ binary-arch: build install
dh_installmenu
dh_installlogrotate
dh_install
+ dh_systemd_enable
dh_installinit -- start 20 2 3 4 5 . stop 20 1 .
+ dh_systemd_start
dh_installcron
dh_installman debian/update-smart-drivedb.8
dh_installinfo
--
1.7.10.4