aboutsummaryrefslogtreecommitdiff
path: root/system/sane-airscan
diff options
context:
space:
mode:
authormarav <marav8@free.fr>2022-04-07 00:22:54 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-09 15:45:50 +0700
commit62bb40ffda7cc6ca48dc0f4727c9d92a16f7b739 (patch)
tree24f879d9c1a78817630a16ad0fb27f6ade3a9ef5 /system/sane-airscan
parent84cef2909f7bc9f9478dcafee63d3ecdb0d68361 (diff)
system/sane-airscan: Added (Scanner Access Now Easy).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/sane-airscan')
-rw-r--r--system/sane-airscan/README26
-rw-r--r--system/sane-airscan/doinst.sh8
-rw-r--r--system/sane-airscan/sane-airscan.SlackBuild98
-rw-r--r--system/sane-airscan/sane-airscan.info10
-rw-r--r--system/sane-airscan/slack-desc19
5 files changed, 161 insertions, 0 deletions
diff --git a/system/sane-airscan/README b/system/sane-airscan/README
new file mode 100644
index 000000000000..6053c805cb07
--- /dev/null
+++ b/system/sane-airscan/README
@@ -0,0 +1,26 @@
+sane-airscan -- SANE backend for AirScan (eSCL) and WSD document
+scanners.
+
+Similar to how most modern network printers support "driverless"
+printing,
+using the universal vendor-neutral printing protocol, many modern
+network scanners and MFPs support "driverless" scanning.
+
+Driverless scanning comes in two flavors:
+
+- Apple AirScan or AirPrint scanning (official protocol name is eSCL)
+- Microsoft WSD, or WS-Scan (term WSD means "Web Services for Devices)
+
+This backend implements both protocols, choosing automatically between
+them.
+It was successfully tested with many devices from Brother, Canon, Dell,
+Kyocera, Lexmark, Epson, HP, OKI, Panasonic, Pantum, Ricoh, Samsung
+and Xerox both in WSD and eSCL modes.
+
+For eSCL devices, Apple maintains a comprehensive list of compatible
+devices, but please note, this list contains not only scanners and MFP,
+but pure printers as well.
+
+This backend doesn't require to install and doesn't conflict with
+vendor-provided proprietary software like ScanGear from Canon, HPLIP
+from HP and so on.
diff --git a/system/sane-airscan/doinst.sh b/system/sane-airscan/doinst.sh
new file mode 100644
index 000000000000..1b543f257704
--- /dev/null
+++ b/system/sane-airscan/doinst.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+if [ -d /usr/lib64/sane ]; then
+ cd /usr/lib64/sane
+ ln -vsf libsane-airscan.so.1 libsane-airscan.so
+else
+ cd /usr/lib/sane
+ ln -vsf libsane-airscan.so.1 libsane-airscan.so
+fi
diff --git a/system/sane-airscan/sane-airscan.SlackBuild b/system/sane-airscan/sane-airscan.SlackBuild
new file mode 100644
index 000000000000..c8a2b70dadeb
--- /dev/null
+++ b/system/sane-airscan/sane-airscan.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+# Copyright 2022 marav, Paris, FR
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=sane-airscan
+VERSION=${VERSION:-0.99.27}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+set -e
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/usr/share/man $PKG/usr/
+rm -rf $PKG/usr/share
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+rm -f /usr/lib${LIBDIRSUFFIX}/libsane.la
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ COPYING FUZZER.md LICENSE README.md \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/sane-airscan/sane-airscan.info b/system/sane-airscan/sane-airscan.info
new file mode 100644
index 000000000000..5fc8e9e84b45
--- /dev/null
+++ b/system/sane-airscan/sane-airscan.info
@@ -0,0 +1,10 @@
+PRGNAM="sane-airscan"
+VERSION="0.99.27"
+HOMEPAGE="https://github.com/alexpevzner/sane-airscan/"
+DOWNLOAD="https://github.com/alexpevzner/sane-airscan/archive/refs/tags/0.99.27/sane-airscan-0.99.27.tar.gz"
+MD5SUM="6ea5710fafd10c8b4c89db37a4173294"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="avahi"
+MAINTAINER="marav"
+EMAIL="marav8@free.fr"
diff --git a/system/sane-airscan/slack-desc b/system/sane-airscan/slack-desc
new file mode 100644
index 000000000000..745e79524499
--- /dev/null
+++ b/system/sane-airscan/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+sane-airscan: sane-airscan (Scanner Access Now Easy)
+sane-airscan:
+sane-airscan: Scanner Access Now Easy - universal driver for
+sane-airscan: eSCL (Apple AirScan) and WSD
+sane-airscan:
+sane-airscan:
+sane-airscan:
+sane-airscan: Homepage: https://github.com/alexpevzner/sane-airscan
+sane-airscan:
+sane-airscan:
+sane-airscan: