Browse Source

desktop/naps2: Added (OCR Scanner).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
pull/310/head
Yanes Checcacci Balod 3 months ago
committed by Willy Sudiarto Raharjo
parent
commit
162312d7c1
  1. 13
      desktop/naps2/README
  2. 21
      desktop/naps2/doinst.sh
  3. 92
      desktop/naps2/naps2.SlackBuild
  4. 10
      desktop/naps2/naps2.info
  5. 19
      desktop/naps2/slack-desc

13
desktop/naps2/README

@ -0,0 +1,13 @@
NAPS2 is free and open source scanning software for Windows, Mac and
Linux.
Easily scan with devices from Canon, Brother, HP, Epson, Fujitsu, and
more. Then save to PDF, TIFF, JPEG, or PNG with a single click.
Use the best drivers for your scanner.
Use SANE and ESCL drivers to connect to USB and network scanners. Also
choose settings like DPI, page size, and bit depth.
Scan from a flatbed or automatic document feeder (ADF), including
duplex support.

21
desktop/naps2/doinst.sh

@ -0,0 +1,21 @@
# Update desktop-database, mime-database, icon-cache
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi
# doinst.sh for naps2 package
( cd usr/bin ; rm -rf naps2 )
( cd usr/bin ; ln -sf /opt/naps2/naps2 naps2 )
( cd usr/doc/naps2-8.2.0 ; rm -rf LICENSE.txt )
( cd usr/doc/naps2-8.2.0 ; ln -sf /opt/naps2/LICENSE.txt LICENSE.txt )

92
desktop/naps2/naps2.SlackBuild

@ -0,0 +1,92 @@
#!/bin/bash
#
# Slackware build script for naps2.
#
# Copyright 2015-2017 Yanes Checcacci Balod, Rio de Janeiro, Brazil.
# 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=naps2
VERSION=${VERSION:-8.2.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG $TMP/$PRGNAM
mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
cd $TMP/$PRGNAM
# open .deb package
ar p $CWD/${PRGNAM}-${VERSION}-linux-*.deb data.tar.xz | tar -xJ ./usr
# Remove LINK to binary (will be re-created later with "doinst.sh")
rm ./usr/bin/naps2
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
### final set !
# Move ALL (./usr) to package DIR
mv usr $PKG/
# Go to root DIR
cd $PKG
mkdir ./opt
mkdir -p ./usr/doc/naps2-${VERSION}
# Change LIB to OPT
mv ./usr/lib/naps2 ./opt/
rmdir ./usr/lib
# Pickup misc files and put in doc directory
cp $CWD/README $CWD/naps2.SlackBuild ./usr/doc/naps2-${VERSION}
###
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Create package
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

10
desktop/naps2/naps2.info

@ -0,0 +1,10 @@
PRGNAM="naps2"
VERSION="8.2.0"
HOMEPAGE="https://www.naps2.com"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
DOWNLOAD_x86_64="https://github.com/cyanfish/naps2/releases/download/v8.2.0/naps2-8.2.0-linux-x64.deb"
MD5SUM_x86_64="db2c506ca9d506dd241d45633a61758a"
REQUIRES=""
MAINTAINER="Yanes Checcacci Balod"
EMAIL="yanes@infolink.com.br"

19
desktop/naps2/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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
naps2: naps2 (Not Another PDF Scanner)
naps2:
naps2: Scan documents to PDF and more, as simply as possible.
naps2:
naps2: NAPS2 is free and open source scanning software for Windows,
naps2: Mac and Linux.
naps2:
naps2: Easily scan with devices from Canon, Brother, HP, Epson, Fujitsu,
naps2: and more. Then save to PDF, TIFF, JPEG, or PNG with a single click.
naps2:
naps2:
Loading…
Cancel
Save