From bb8122dd5933e0761caebfb9fe5f6bc40469cbb5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 18 May 2012 11:15:44 +0200 Subject: [PATCH] sane: add systemd service from systemd-arch-units. --- srcpkgs/sane/files/saned.socket | 9 +++++++++ srcpkgs/sane/files/saned@.service | 8 ++++++++ srcpkgs/sane/template | 5 ++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/sane/files/saned.socket create mode 100644 srcpkgs/sane/files/saned@.service diff --git a/srcpkgs/sane/files/saned.socket b/srcpkgs/sane/files/saned.socket new file mode 100644 index 00000000000..66ef9c9c800 --- /dev/null +++ b/srcpkgs/sane/files/saned.socket @@ -0,0 +1,9 @@ +[Unit] +Description=saned incoming socket + +[Socket] +ListenStream=6566 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/srcpkgs/sane/files/saned@.service b/srcpkgs/sane/files/saned@.service new file mode 100644 index 00000000000..69e833e7eb0 --- /dev/null +++ b/srcpkgs/sane/files/saned@.service @@ -0,0 +1,8 @@ +[Unit] +Description=Scanner Service + +[Service] +Group=scanner +ExecStart=/usr/sbin/saned +StandardInput=socket +StandardError=syslog diff --git a/srcpkgs/sane/template b/srcpkgs/sane/template index 39d9b7cd7ea..252cd305c10 100644 --- a/srcpkgs/sane/template +++ b/srcpkgs/sane/template @@ -1,7 +1,7 @@ # Template build file for 'sane'. pkgname=sane version=1.0.22 -revision=1 +revision=2 patch_args="-Np1" wrksrc="sane-backends-${version}" distfiles="ftp://ftp2.sane-project.org/pub/sane/sane-backends-${version}/sane-backends-${version}.tar.gz" @@ -116,4 +116,7 @@ post_install() { vinstall tools/udev/libsane.rules 644 /lib/udev/rules.d 53-sane.rules # fix udev rules sed -i 's|NAME="%k", ||g' ${DESTDIR}/lib/udev/rules.d/53-sane.rules + # Install systemd service. + vinstall ${FILESDIR}/saned@.service 644 lib/systemd/system + vinstall ${FILESDIR}/saned.socket 644 lib/systemd/system }