[Lunar-commits] <moonbase-other> sane-backends: Readding to moonbase and making it systemd compatible.

Dennis Veatch stumbles at lunar-linux.org
Wed Jul 18 15:48:56 CEST 2012


commit 9ac8895293b28c58ccd10c0ed555f3b8863195af
Author: Dennis Veatch <stumbles at lunar-linux.org>
Date: Wed, 18 Jul 2012 06:48:56 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/9ac8895293b28c58ccd10c0ed555f3b8863195af

sane-backends: Readding to moonbase and making it systemd compatible.
---
  graphics/sane-backends/BUILD                                 +9/-0     
  graphics/sane-backends/CONFIGURE                             +2/-0     
  graphics/sane-backends/DEPENDS                               +9/-0     
  graphics/sane-backends/DETAILS                               +23/-0    
  graphics/sane-backends/init.d/sane                           +31/-0    
  graphics/sane-backends/systemd.d/saned.socket                +10/-0    
  graphics/sane-backends/systemd.d/saned at .service              +6/-0     
  7 files changed, 90 insertions (+), 0 deletions (-)

--- /dev/null
+++ b/graphics/sane-backends/BUILD
@@ -0,0 +1,9 @@
+(
+
+  patch_it $SOURCE2 1 &&
+
+  OPTS+=" --with-lockdir=/run/lock/sane --with-group=usb" &&
+
+  default_build
+
+) > $C_FIFO 2>&1
--- /dev/null
+++ b/graphics/sane-backends/CONFIGURE
@@ -0,0 +1,2 @@
+mquery USE_THRDS "Enable pthreads? " y "--enable-pthread" "--disable-pthread"
+
--- /dev/null
+++ b/graphics/sane-backends/DEPENDS
@@ -0,0 +1,9 @@
+depends %JPEG
+depends %UDEV
+
+optional_depends avahi    "--enable-avahi" "--disable-avahi"   "for service discovery support"
+optional_depends gphoto2  "--with-gphoto2" "--without-gphoto2" "for gphoto2 support"
+
+optional_depends libusb-compat  "--enable-libusb_1_0" "--disable-libusb" "for usb scanners"
+optional_depends libieee1284    "" "" "for parallel port support"
+optional_depends net-snmp       "--with-snmp" "--without-snmp" "for snmp support"
--- /dev/null
+++ b/graphics/sane-backends/DETAILS
@@ -0,0 +1,23 @@
+          MODULE=sane-backends
+         VERSION=1.0.22
+          SOURCE=$MODULE-$VERSION.tar.gz
+         SOURCE2=sane-backends-v4l-header-deconflict.patch
+   SOURCE_URL[0]=ftp://ftp2.sane-project.org/pub/sane/$MODULE-$VERSION
+   SOURCE_URL[1]=ftp://ftp.sane-project.org/pub/sane/$MODULE-$VERSION
+   SOURCE_URL[2]=ftp://ftp3.sane-project.org/pub/sane/$MODULE-$VERSION
+     SOURCE2_URL=$PATCH_URL
+      SOURCE_VFY=sha1:dc04d6e6fd18791d8002c3fdb23e89fef3327135
+     SOURCE2_VFY=sha1:722b9f46fc6dde8708e9dfca1c75cebfa26dcd01
+        WEB_SITE=http://www.sane-project.org
+         ENTERED=20020412
+         UPDATED=20110902
+      MAINTAINER=kc8apf at kc8apf.net
+           SHORT="Universal scanner interface"
+
+cat << EOF
+SANE stands for "Scanner Access Now Easy" and is an application
+programming interface (API) that provides standardized access to any
+raster image scanner hardware (flatbed scanner, hand-held scanner,
+video and still-cameras, frame-grabbers, etc.).
+sane-backends is the collection of scanner interface libraries.
+EOF
--- /dev/null
+++ b/graphics/sane-backends/init.d/sane
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# Startup script for sane
+#
+# chkconfig: 345 50 50
+# description: This script creates the lockdir for sane-backends
+
+SANE_LOCKDIR="/var/lock/sane"
+
+start () {
+  echo -n "Creating SANE lock directory: "
+  mkdir -m 775 -p $SANE_LOCKDIR && chgrp usb $SANE_LOCKDIR
+  if [ $? == 0 ]; then
+    echo -e $RESULT_OK
+  else
+    echo -e $RESULT_FAIL
+  fi
+}  
+
+stop () {
+   echo -n "Removing SANE lock directory: "
+   rm -rf $SANE_LOCKDIR
+   echo -e $RESULT_OK
+}
+
+restart () {
+  stop
+  start
+}
+
+. /lib/lsb/init-functions
--- /dev/null
+++ b/graphics/sane-backends/systemd.d/saned.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=saned incoming socket
+
+[Socket]
+Accept=yes
+ListenStream=6566
+SocketMode=0775
+
+[Install]
+WantedBy=sockets.target
--- /dev/null
+++ b/graphics/sane-backends/systemd.d/saned at .service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Scanner Service
+
+[Service]
+ExecStart=/usr/sbin/saned -a usb
+StandardInput=socket




More information about the Lunar-commits mailing list