Skip to content
Browse files

sane-backends: Readding to moonbase and making it systemd compatible.

  • Loading branch information...
1 parent 7797720 commit 9ac8895293b28c58ccd10c0ed555f3b8863195af Dennis Veatch committed Jul 18, 2012
View
9 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
View
2 graphics/sane-backends/CONFIGURE
@@ -0,0 +1,2 @@
+mquery USE_THRDS "Enable pthreads? " y "--enable-pthread" "--disable-pthread"
+
View
9 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"
View
23 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@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
View
31 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
View
10 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
View
6 graphics/sane-backends/systemd.d/saned@.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Scanner Service
+
+[Service]
+ExecStart=/usr/sbin/saned -a usb
+StandardInput=socket

0 comments on commit 9ac8895

Please sign in to comment.
Something went wrong with that request. Please try again.