Commit 45b9c264 authored by Иван Мажукин's avatar Иван Мажукин Committed by Vitaly Lipatov

epm play: add sane-katusham247 (eterbug #17332)

parent 052120ee
#!/bin/sh
TAR="$1"
RETURNTARNAME="$2"
. $(dirname $0)/common.sh
untar_payload()
{
match=$(grep --text --line-number '^PAYLOAD:$' $1 | cut -d ':' -f 1)
payload_start=$((match + 1))
tail -n +$payload_start $1 | tar -zxvf -
}
ROOTDIR=$(pwd)
# Linux-драйвер-сканирования-Катюша-M247.zip
erc unpack $TAR || fatal
cd * # Linux драйвер сканирования Катюша M247
# Katusha_Scanner_M247_ubuntu64_V110.tar.gz
erc unpack Katusha_Scanner_M247_ubuntu64_*.tar.gz || fatal
rm Katusha_Scanner_M247_ubuntu64_*.tar.gz
cd * # Katusha_Scanner_M247_ubuntu64_V110
# needed to extract deb package
untar_payload LinuxInstaller_x86_64.sh
# sane-1.0-27.x86-64
cd sane*
# check if sane-1.0-27.x86-64.deb exist
DEBNAME="$(echo sane*.deb)"
[ -s "$DEBNAME" ] || fatal
BASENAME=$(basename $DEBNAME deb)
VERSION=$(echo $BASENAME | sed -e 's|sane-||'| sed -e 's|.x86-64.||')
PKGNAME=${PRODUCT}-${VERSION}
# needed because the path contains spaces
mv $DEBNAME $ROOTDIR/$PKGNAME.deb
cd $ROOTDIR
# needed because the control file have issues
erc unpack $PKGNAME.deb || fatal
# avoid cd to deb
rm katusha*.deb
cd katusha*
mv usr/lib/x86_64-linux-gnu/sane usr/lib/
rm -r usr/lib/x86_64-linux-gnu
pushd usr/lib/sane/
ln -s libsane-katusham247.so.1.0.27 libsane-katusham247.so
ln -s libsane-katusham247.so.1.0.27 libsane-katusham247.so.1
rm libsane-katusham247.la
popd
mkdir -p etc/sane.d/dll.d
echo "katusham247" > etc/sane.d/dll.d/katusham247
chmod a+rw etc/udev/rules.d/65-scanner.rules
erc pack $PKGNAME.tar etc usr || fatal
return_tar $PKGNAME.tar
#!/bin/sh
PKGNAME=katusha-m247-sc
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="Linux Scan Driver for katusha m247 Scanner"
URL="https://katusha-it.ru/downloads"
. $(dirname $0)/common.sh
warn_version_is_not_supported
PKGURL="https://katusha-it.ru/storage/filemanager/downloads/Katusha%20Devices/m247/Linux%20%D0%B4%D1%80%D0%B0%D0%B8%CC%86%D0%B2%D0%B5%D1%80%20%D1%81%D0%BA%D0%B0%D0%BD%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%20%D0%9A%D0%B0%D1%82%D1%8E%D1%88%D0%B0%20M247.zip"
install_pack_pkgurl
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment