diff --git a/graphics/sane-backends/BUILD b/graphics/sane-backends/BUILD new file mode 100644 index 00000000000..806cc7a2a44 --- /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 diff --git a/graphics/sane-backends/CONFIGURE b/graphics/sane-backends/CONFIGURE new file mode 100644 index 00000000000..187eac923c0 --- /dev/null +++ b/graphics/sane-backends/CONFIGURE @@ -0,0 +1,2 @@ +mquery USE_THRDS "Enable pthreads? " y "--enable-pthread" "--disable-pthread" + diff --git a/graphics/sane-backends/DEPENDS b/graphics/sane-backends/DEPENDS new file mode 100644 index 00000000000..f661a37a37d --- /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" diff --git a/graphics/sane-backends/DETAILS b/graphics/sane-backends/DETAILS new file mode 100644 index 00000000000..c8aeed2d8dd --- /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@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 diff --git a/graphics/sane-backends/init.d/sane b/graphics/sane-backends/init.d/sane new file mode 100755 index 00000000000..62a020ddb73 --- /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 diff --git a/graphics/sane-backends/systemd.d/saned.socket b/graphics/sane-backends/systemd.d/saned.socket new file mode 100644 index 00000000000..40caabab139 --- /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 diff --git a/graphics/sane-backends/systemd.d/saned@.service b/graphics/sane-backends/systemd.d/saned@.service new file mode 100644 index 00000000000..b48ec9eb1c1 --- /dev/null +++ b/graphics/sane-backends/systemd.d/saned@.service @@ -0,0 +1,6 @@ +[Unit] +Description=Scanner Service + +[Service] +ExecStart=/usr/sbin/saned -a usb +StandardInput=socket