summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsourcesmith2017-06-30 13:54:26 +0100
committersourcesmith2017-06-30 13:54:26 +0100
commit800f22d52b0574d6dd18a2acfd162e2800bf7125 (patch)
treedb8f4ce8407b2a5aad2049ea1e58b858f51b386c
downloadaur-scangearmp-mg8100series.tar.gz
Vendor version 1.60
-rw-r--r--.SRCINFO30
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD96
-rw-r--r--build-fixes.patch28
-rw-r--r--rules.patch100
-rw-r--r--scanfile.patch20
-rw-r--r--scangearmp-mg8100series.install15
7 files changed, 290 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f1b57c5e423
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = scangearmp-mg8100series
+ pkgdesc = Canon IJ Scanner Driver (for mg8100 series)
+ pkgver = 1.60
+ pkgrel = 1
+ url = http://www.canon.co.uk/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mg_series/pixma_mg8150.aspx?type=drivers'&'os=LINUX
+ install = scangearmp-mg8100series.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = autoconf>=2.13
+ makedepends = automake>=1.6
+ makedepends = findutils
+ makedepends = gawk
+ makedepends = gimp>=2.0
+ depends = sane
+ depends = gtk2
+ depends = libpng
+ optdepends = xsane
+ conflicts = scangearmp-common
+ source = http://files.canon-europe.com/files/soft40247/Software/scangearmp-source-1.60-1.tar.gz
+ source = build-fixes.patch
+ source = scanfile.patch
+ source = rules.patch
+ sha256sums = fab6b764409f17a674ba31e45a515353cdf027562b2daee96c316bb86d6d6340
+ sha256sums = eeec0bbba93e054842bf1375502192c368cf92e86b6bcee2d114adeb14bbf8b3
+ sha256sums = d1b16bab6ac1f235fb42b14fff9e78a1bd395ddda56d21a8f13aabb0c4e8e83c
+ sha256sums = 55a40593e79e85edc2365440097971f7b61748a3aa3d12a8365cea093da6af23
+
+pkgname = scangearmp-mg8100series
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..72e8ffc0db8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2ddbef0cc00
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,96 @@
+# Maintainer: sourcesmith <sourcesmith 'at' homeport 'dot' org.uk>
+# Original Contributors: Pavol Hluchy (Lopo) <lopo at losys dot eu>
+# Sonic-Y3k <sonic.y3k@googlemail.com>
+# Giancarlo Bianchi <giancarlobianchi76@gmail.com>
+# Fortunato Ventre (voRia) <vorione@gmail.com>
+# Custom Processing Unlimited (CPUnltd) <CPUnltd 'at' gmail 'dot' com>
+_model=mg8100
+pkgname=scangearmp-${_model}series
+pkgver=1.60
+pkgrel=1
+_pkgver=1.60-1
+pkgdesc="Canon IJ Scanner Driver (for ${_model} series)"
+url="http://www.canon.co.uk/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mg_series/pixma_mg8150.aspx?type=drivers'&'os=LINUX"
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('sane' 'gtk2' 'libpng')
+makedepends=('autoconf>=2.13' 'automake>=1.6' 'findutils' 'gawk' 'gimp>=2.0')
+optdepends=('xsane')
+conflicts=('scangearmp-common')
+install=scangearmp-mg8100series.install
+source=("http://files.canon-europe.com/files/soft40247/Software/scangearmp-source-${_pkgver}.tar.gz"
+ 'build-fixes.patch'
+ 'scanfile.patch'
+ 'rules.patch')
+sha256sums=('fab6b764409f17a674ba31e45a515353cdf027562b2daee96c316bb86d6d6340'
+ 'eeec0bbba93e054842bf1375502192c368cf92e86b6bcee2d114adeb14bbf8b3'
+ 'd1b16bab6ac1f235fb42b14fff9e78a1bd395ddda56d21a8f13aabb0c4e8e83c'
+ '55a40593e79e85edc2365440097971f7b61748a3aa3d12a8365cea093da6af23')
+
+if [ "$CARCH" == "x86_64" ]; then
+ _libdir=libs_bin64
+else
+ _libdir=libs_bin32
+fi
+
+prepare() {
+ ## Patches
+ msg "Applying patches"
+ patch -p0 < build-fixes.patch
+ patch -p0 < scanfile.patch
+ patch -p0 < rules.patch
+}
+
+build() {
+ CPPFLAGS="${CPPFLAGS} -O2"
+
+ ## Compile ${_model} stuff
+ cd ${srcdir}/scangearmp-source-${_pkgver}/scangearmp
+ ./autogen.sh --prefix=/usr LDFLAGS="-L`pwd`/../com/${_libdir}" LIBS=-lm
+ # Force the use of system's libtool
+ rm libtool
+ ln -s `which libtool` .
+ make
+}
+
+package() {
+ # get id of printer model
+ _cmd=$(grep ^PRINTER_DEPEND_PKG=scangearmp-${_model}- ${srcdir}/scangearmp-source-${_pkgver}/debian/scangearmp-${_model}series.postrm \
+ | gawk -F- '{print $3}')
+ _id=${_cmd}
+ echo ${pkgdir}
+
+
+ cd ${srcdir}/scangearmp-source-${_pkgver}/scangearmp
+ make install DESTDIR="${pkgdir}"
+
+ # Install SANE configuration file
+ install -d -m 0755 ${pkgdir}/etc/sane.d/
+ install -m 0644 ${srcdir}/scangearmp-source-${_pkgver}/scangearmp/backend/canon_mfp.conf ${pkgdir}/etc/sane.d/canon_mfp.conf
+
+ # Install ${_model} series specific libraries
+ cp -P ${srcdir}/scangearmp-source-${_pkgver}/${_id}/${_libdir}/*so* ${pkgdir}/usr/lib/
+
+ # Install common libraries
+ cp -P ${srcdir}/scangearmp-source-${_pkgver}/com/${_libdir}/*so* ${pkgdir}/usr/lib/
+
+ # Make scangearmp usable from gimp
+ install -d -m 0755 ${pkgdir}/usr/lib/gimp/2.0/plug-ins/
+ ln -s /usr/bin/scangearmp ${pkgdir}/usr/lib/gimp/2.0/plug-ins/
+
+ # Install .tbl and .dat files for ${_model} series
+ install -d -m 0755 ${pkgdir}/usr/lib/bjlib
+ install -D -m 0644 ${srcdir}/scangearmp-source-${_pkgver}/${_id}/cnc*.tbl ${pkgdir}/usr/lib/bjlib/
+ install -D -m 0644 ${srcdir}/scangearmp-source-${_pkgver}/${_id}/CNC*.DAT ${pkgdir}/usr/lib/bjlib/
+
+ # Install udev rules
+ install -D -m 0644 ${srcdir}/scangearmp-source-${_pkgver}/scangearmp/etc/80-canon_mfp.rules ${pkgdir}/etc/udev/rules.d/80-canon_mfp.rules
+
+ # Install .ini file
+ install -D -m 0644 ${srcdir}/scangearmp-source-${_pkgver}/com/ini/canon_mfp_net.ini ${pkgdir}/usr/lib/bjlib/
+
+ # Install license file
+ cd ${srcdir}/scangearmp-source-${_pkgver}
+ install -d -m 0755 ${pkgdir}/usr/share/licenses/${pkgname}/
+ install -m 0644 LICENSE-* ${pkgdir}/usr/share/licenses/${pkgname}/
+}
diff --git a/build-fixes.patch b/build-fixes.patch
new file mode 100644
index 00000000000..12ef57c1ff9
--- /dev/null
+++ b/build-fixes.patch
@@ -0,0 +1,28 @@
+--- scangearmp-source-1.60-1/scangearmp/autogen.sh 2010-02-17 02:22:34.000000000 +0000
++++ scangearmp-source-1.60-1.new/scangearmp/autogen.sh 2017-03-31 22:27:27.366847243 +0100
+@@ -136,7 +136,7 @@
+ fi
+ echo "Running aclocal $aclocalinclude ..."
+ aclocal $aclocalinclude
+- if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
++ if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
+ echo "Running autoheader..."
+ autoheader
+ fi
+--- scangearmp-source-1.60-1/scangearmp/configure.in 2010-02-17 02:22:34.000000000 +0000
++++ scangearmp-source-1.60-1.new/scangearmp/configure.in 2017-03-31 22:38:28.210219752 +0100
+@@ -13,13 +13,12 @@
+ AC_SUBST(enable_libpath)
+
+ AM_INIT_AUTOMAKE(scangearmp, 1.60-1)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+ AC_PROG_LIBTOOL
+ AM_MAINTAINER_MODE
+
+ AC_ISC_POSIX
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+ AC_HEADER_STDC
+ AC_PROG_RANLIB
+
diff --git a/rules.patch b/rules.patch
new file mode 100644
index 00000000000..f150a78ffe2
--- /dev/null
+++ b/rules.patch
@@ -0,0 +1,100 @@
+--- scangearmp-source-1.60-1/scangearmp/etc/80-canon_mfp.rules 2010-02-17 02:22:35.000000000 +0000
++++ scangearmp-source-1.60-1.new/scangearmp/etc/80-canon_mfp.rules 2017-04-19 21:23:36.502478965 +0100
+@@ -7,68 +7,68 @@
+
+ LABEL="canon_mfp_start"
+ # Canon MP160
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1714", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1714", MODE="666"
+ # Canon MP510
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1717", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1717", MODE="666"
+ # Canon MP600
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1718", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1718", MODE="666"
+
+ # Canon MP140 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="172b", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="172b", MODE="666"
+ # Canon MP210 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1721", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1721", MODE="666"
+ # Canon MP520 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1724", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1724", MODE="666"
+ # Canon MP610 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1725", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1725", MODE="666"
+
+ #MP190 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1734", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1734", MODE="666"
+ #MP240 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1732", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1732", MODE="666"
+ #MP540 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1730", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1730", MODE="666"
+ #MP630 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="172e", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="172e", MODE="666"
+
+ #MX320 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1736", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1736", MODE="666"
+ #MX330 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1737", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1737", MODE="666"
+ #MX860 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1735", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1735", MODE="666"
+
+ #MP250 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173a", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="173a", MODE="666"
+ #MP270 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173b", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="173b", MODE="666"
+ #MP490 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173c", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="173c", MODE="666"
+ #MP550 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173d", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="173d", MODE="666"
+ #MP560 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173e", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="173e", MODE="666"
+ #MP640 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173f", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="173f", MODE="666"
+
+ #MX340 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1741", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1741", MODE="666"
+ #MX350 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1742", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1742", MODE="666"
+ #MX870 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1743", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1743", MODE="666"
+
+ #MP280 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1746", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1746", MODE="666"
+ #MP495 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1747", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1747", MODE="666"
+ #MG5100 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1748", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1748", MODE="666"
+ #MG5200 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1749", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="1749", MODE="666"
+ #MG6100 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="174a", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="174a", MODE="666"
+ #MG8100 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="174b", MODE="666"
++ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="174b", MODE="666"
+
+ LABEL="canon_mfp_end"
diff --git a/scanfile.patch b/scanfile.patch
new file mode 100644
index 00000000000..b2add2f03c8
--- /dev/null
+++ b/scanfile.patch
@@ -0,0 +1,20 @@
+--- scangearmp-source-1.60-1/scangearmp/src/scanfile.c 2010-02-17 02:22:35.000000000 +0000
++++ scangearmp-source-1.60-1.new/scangearmp/src/scanfile.c 2017-04-01 22:36:34.766555076 +0100
+@@ -44,6 +44,7 @@
+ #include "progress_bar.h"
+ #include "raw2pdf.h"
+ #include "scanmsg.h"
++#include "zlib.h"
+
+ #define GRAY2MONO_BK (0)
+ #define GRAY2MONO_GRAY (1)
+@@ -386,7 +387,8 @@
+
+ void write_data_for_png( png_structp png_ptr, png_bytep data, png_size_t length )
+ {
+- FileControlWriteFile( *( (int *)png_ptr->io_ptr ), (CNMSLPSTR)data, length );
++ voidp write_io_ptr = png_get_io_ptr(png_ptr);
++ FileControlWriteFile( write_io_ptr, (CNMSLPSTR)data, length );
+
+ return;
+ }
diff --git a/scangearmp-mg8100series.install b/scangearmp-mg8100series.install
new file mode 100644
index 00000000000..6b123c09e35
--- /dev/null
+++ b/scangearmp-mg8100series.install
@@ -0,0 +1,15 @@
+post_install() {
+ if [ -x /usr/bin/ldconfig ]; then
+ /usr/bin/ldconfig
+ fi
+}
+post_upgrade() {
+ if [ -x /usr/bin/ldconfig ]; then
+ /usr/bin/ldconfig
+ fi
+}
+post_remove() {
+ if [ -x /usr/bin/ldconfig ]; then
+ /usr/bin/ldconfig
+ fi
+}