tags 787243 + patch
User pkg-systemd-maintain...@lists.alioth.debian.org
Usertags 787243 + systemd-units
thanks

Hi,

Please find a patch that add a .service file for tcsd.

Note that I choose to follow the fedora/sles name for compatibility.
I'm creating a symlink so the LSB initscript is properly masked

Cheers,

Laurent Bigonville
diff -Nru trousers-0.3.13/debian/control trousers-0.3.13/debian/control
--- trousers-0.3.13/debian/control	2014-06-29 17:40:42.000000000 +0200
+++ trousers-0.3.13/debian/control	2015-05-30 11:44:35.000000000 +0200
@@ -5,6 +5,7 @@
 Build-Depends: debhelper (>= 9),
     dh-autoreconf,
     autotools-dev (>= 20100122.1),
+    dh-systemd (>= 1.5),
     libssl-dev,
     libtool,
     pkg-config
diff -Nru trousers-0.3.13/debian/rules trousers-0.3.13/debian/rules
--- trousers-0.3.13/debian/rules	2013-08-20 17:50:30.000000000 +0200
+++ trousers-0.3.13/debian/rules	2015-05-30 12:01:57.000000000 +0200
@@ -3,7 +3,7 @@
 export DH_VERBOSE = 1
 
 %:
-	dh ${@} --with autoreconf
+	dh ${@} --with autoreconf,systemd
 
 override_dh_auto_configure:
 	dh_auto_configure -- --with-gui=none
@@ -12,6 +12,9 @@
 	dh_auto_install
 
 override_dh_install:
+	install -D -o root -g root -m 0644 debian/trousers.tcsd.service \
+		debian/trousers/lib/systemd/system/tcsd.service
+	dh_link -ptrousers lib/systemd/system/tcsd.service lib/systemd/system/trousers.service
 	dh_install -X.la --fail-missing --sourcedir=debian/tmp
 
 override_dh_strip:
diff -Nru trousers-0.3.13/debian/trousers.tcsd.service trousers-0.3.13/debian/trousers.tcsd.service
--- trousers-0.3.13/debian/trousers.tcsd.service	1970-01-01 01:00:00.000000000 +0100
+++ trousers-0.3.13/debian/trousers.tcsd.service	2015-05-30 11:35:24.000000000 +0200
@@ -0,0 +1,9 @@
+[Unit]
+Description=TCG Core Services Daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/tcsd
+
+[Install]
+WantedBy=multi-user.target

Reply via email to