summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rwxr-xr-xdebian/rules5
-rw-r--r--debian/sane-utils.install2
-rw-r--r--debian/sane-utils.saned.socket10
-rw-r--r--debian/sane-utils.saned@.service16
5 files changed, 32 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index a880751..e3c5c72 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,10 @@ sane-backends (1.0.27-1~experimental6) experimental; urgency=medium
* Rewrite debian/watch for gitlab (Thanks to
Sebastiaan Couwenberg <sebastic@xs4all.nl>).
* Declare compliance with Debian Policy 4.1.5 (No changes needed).
+ * Replace manual install of systemd files with install via dh_installsystemd
+ (Closes: #905275).
- -- Jörg Frings-Fürst <debian@jff.email> Sun, 08 Jul 2018 13:43:56 +0200
+ -- Jörg Frings-Fürst <debian@jff.email> Fri, 03 Aug 2018 18:17:11 +0200
sane-backends (1.0.27-1~experimental5) experimental; urgency=medium
diff --git a/debian/rules b/debian/rules
index 69b8f35..a53610d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -129,8 +129,9 @@ endif
override_dh_installinit-arch:
dh_installinit -psane-utils --name=saned
-override_dh_systemd_enable-arch:
- dh_systemd_enable --no-enable debian/saned.socket
+override_dh_installsystemd-arch:
+ dh_installsystemd -psane-utils --no-enable --name=saned
+ dh_installsystemd -psane-utils --no-enable --name=saned@
override_dh_makeshlibs-arch:
dh_makeshlibs -- -v$(DEB_VERSION_UPSTREAM) -Pdebian/libsane1 -plibsane1
diff --git a/debian/sane-utils.install b/debian/sane-utils.install
index ed670e4..0162791 100644
--- a/debian/sane-utils.install
+++ b/debian/sane-utils.install
@@ -4,5 +4,3 @@ usr/bin/sane-find-scanner
usr/bin/scanimage
usr/sbin/saned
tools/umax_pp usr/bin
-debian/saned.socket lib/systemd/system
-debian/saned@.service lib/systemd/system
diff --git a/debian/sane-utils.saned.socket b/debian/sane-utils.saned.socket
new file mode 100644
index 0000000..a14daef
--- /dev/null
+++ b/debian/sane-utils.saned.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=saned incoming socket
+
+[Socket]
+ListenStream=6566
+Accept=yes
+MaxConnections=64
+
+[Install]
+WantedBy=sockets.target
diff --git a/debian/sane-utils.saned@.service b/debian/sane-utils.saned@.service
new file mode 100644
index 0000000..425ee7a
--- /dev/null
+++ b/debian/sane-utils.saned@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Scanner Service
+Requires=saned.socket
+
+[Service]
+ExecStart=/usr/sbin/saned
+User=saned
+Group=saned
+StandardInput=null
+StandardOutput=syslog
+StandardError=syslog
+Environment=SANE_CONFIG_DIR=/etc/sane.d
+# Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255
+
+[Install]
+Also=saned.socket