summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO40
-rw-r--r--10-usbprinter-canon-mp6x0.rules7
-rw-r--r--PKGBUILD119
-rw-r--r--autoconf.patch77
-rw-r--r--libpng15.patch23
-rw-r--r--missing-include.patch20
-rw-r--r--mp610.patch10
-rw-r--r--mp620.install26
-rw-r--r--ppd.patch11
-rw-r--r--v3.00.patch40
10 files changed, 373 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3245399fc0d3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,40 @@
+pkgbase = cnijfilter-mp620
+ pkgdesc = Canon drivers for the MP610/MP620/MP630 printer/scanner with improved PPD files
+ pkgver = 3.00
+ pkgrel = 4
+ url = http://support-asia.canon-asia.com
+ install = mp620.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ depends = cups
+ depends = popt
+ depends = ghostscript
+ optdepends = cups-bjnp: network printing support
+ conflicts = ppd-mp620-630
+ conflicts = cnijfilter-common
+ source = http://gdlp01.c-wss.com/gds/6/0100001606/01/cnijfilter-common-3.00-1.tar.gz
+ source = http://gdlp01.c-wss.com/gds/1/0100000841/01/cnijfilter-common-2.80-1.tar.gz
+ source = http://downloads.sourceforge.net/mp610linux/ppdMP620-630en-1.5.tar.gz
+ source = http://downloads.sourceforge.net/mp610linux/ppdMP610en-1.3.tar.gz
+ source = missing-include.patch
+ source = libpng15.patch
+ source = mp610.patch
+ source = v3.00.patch
+ source = ppd.patch
+ source = autoconf.patch
+ source = 10-usbprinter-canon-mp6x0.rules
+ md5sums = b4c3dab3c491fbe3f9dc830dae401a45
+ md5sums = 1319f320f9f6651b43e43c0b09af5b73
+ md5sums = 4635702d2bade156030ebf45fec2de18
+ md5sums = 98de653a2a2f81533ce8eef1f57b9987
+ md5sums = 59572dbb7f445620d1b3ba57f9fe0760
+ md5sums = e75b117cd7a399c0861c4e8e10c30294
+ md5sums = 8991363b2699d55cd6378f6206f43f20
+ md5sums = e280bec37a0a2ddc45b33854c36fb8c3
+ md5sums = 9faad9f56b3a4482af40aca783e9d4fe
+ md5sums = b26ed3654ff141a0b4a34fd037fd1c57
+ md5sums = ee8957e16e9c146fcfce28837e9c542d
+
+pkgname = cnijfilter-mp620
+
diff --git a/10-usbprinter-canon-mp6x0.rules b/10-usbprinter-canon-mp6x0.rules
new file mode 100644
index 000000000000..b705031548c4
--- /dev/null
+++ b/10-usbprinter-canon-mp6x0.rules
@@ -0,0 +1,7 @@
+
+#mp610
+ATTR{idVendor}=="04a9", ATTR{idProduct}=="1725", MODE:="0660", GROUP:="lp", ENV{libsane_matched}:="yes"
+
+#mp620
+ATTR{idVendor}=="04a9", ATTR{idProduct}=="172f", MODE:="0660", GROUP:="lp", ENV{libsane_matched}:="yes"
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2aea5707cc2d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,119 @@
+# Maintainer: Tom Billiet <mouse256@gmail.com>
+# Contributor: Olivier Duclos <olivier.duclos@gmail.com>
+
+pkgname=cnijfilter-mp620
+pkgver=3.00
+pkgrel=4
+pkgdesc="Canon drivers for the MP610/MP620/MP630 printer/scanner with improved PPD files"
+arch=('i686' 'x86_64')
+url="http://support-asia.canon-asia.com"
+license=('custom')
+if [ "${CARCH}" = 'x86_64' ]; then
+ depends=('lib32-libcups' 'cups' 'lib32-popt' 'ghostscript' 'lib32-libtiff' 'lib32-libpng')
+ makedepends=('gcc-multilib')
+else
+ depends=('cups' 'popt' 'ghostscript')
+fi
+conflicts=('ppd-mp620-630' 'cnijfilter-common')
+optdepends=("cups-bjnp: network printing support")
+install=mp620.install
+source=(http://gdlp01.c-wss.com/gds/6/0100001606/01/cnijfilter-common-$pkgver-1.tar.gz \
+ http://gdlp01.c-wss.com/gds/1/0100000841/01/cnijfilter-common-2.80-1.tar.gz \
+ http://downloads.sourceforge.net/mp610linux/ppdMP620-630en-1.5.tar.gz \
+ http://downloads.sourceforge.net/mp610linux/ppdMP610en-1.3.tar.gz \
+ missing-include.patch
+ libpng15.patch
+ mp610.patch
+ v3.00.patch
+ ppd.patch
+ autoconf.patch
+ 10-usbprinter-canon-mp6x0.rules)
+md5sums=('b4c3dab3c491fbe3f9dc830dae401a45'
+ '1319f320f9f6651b43e43c0b09af5b73'
+ '4635702d2bade156030ebf45fec2de18'
+ '98de653a2a2f81533ce8eef1f57b9987'
+ '59572dbb7f445620d1b3ba57f9fe0760'
+ 'e75b117cd7a399c0861c4e8e10c30294'
+ '8991363b2699d55cd6378f6206f43f20'
+ 'e280bec37a0a2ddc45b33854c36fb8c3'
+ '9faad9f56b3a4482af40aca783e9d4fe'
+ 'b26ed3654ff141a0b4a34fd037fd1c57'
+ 'ee8957e16e9c146fcfce28837e9c542d')
+
+build() {
+ if [ "${CARCH}" = 'x86_64' ]; then
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+ LIBDIR="--libdir=/usr/lib32"
+ fi
+
+ #patching
+ cd $srcdir/cnijfilter-common-$pkgver
+ rm -f 327
+ ln -s ../cnijfilter-common-2.80/327 327
+ patch -Np2 -i ../missing-include.patch
+ patch -Np2 -i ../mp610.patch
+ patch -Np1 -i ../libpng15.patch
+ patch -Np2 -i ../v3.00.patch
+ patch -Np0 -i ../autoconf.patch
+
+ cd $srcdir/ppdMP620-630en-1.5
+ patch -Np2 -i ../ppd.patch
+
+ #buildingĀ²
+ cd $srcdir/cnijfilter-common-$pkgver/libs
+ ./autogen.sh --prefix=/usr $LIBDIR || return 1
+
+ cd $srcdir/cnijfilter-common-$pkgver/cngpij
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin $LIBDIR || return 1
+
+ cd $srcdir/cnijfilter-common-$pkgver/pstocanonij
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin $LIBDIR || return 1
+
+ cd $srcdir/cnijfilter-common-$pkgver/backend
+ ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin $LIBDIR || return 1
+
+ cd $srcdir/cnijfilter-common-$pkgver
+ make || return 1
+
+ cd $srcdir/cnijfilter-common-$pkgver/cnijfilter
+ ./autogen.sh --prefix=/usr --program-suffix=mp610 $LIBDIR --enable-libpath=/usr/lib/bjlib --enable-binpath=/usr/bin || return 1
+ make || return 1
+}
+
+package() {
+ cd $srcdir/cnijfilter-common-$pkgver
+ make install DESTDIR=$pkgdir || return 1
+
+ if [ "${CARCH}" = 'x86_64' ]; then
+ #hack
+ mkdir -p $pkgdir/usr/lib/cups/filter
+ mv $pkgdir/usr/lib32/cups/filter/pstocanonij $pkgdir/usr/lib/cups/filter/pstocanonij
+ rmdir $pkgdir/usr/lib32/cups/filter
+ rmdir $pkgdir/usr/lib32/cups/
+ rmdir $pkgdir/usr/lib32
+ fi
+
+ install -d $pkgdir/usr/lib/bjlib
+ install 327/database/*.tbl $pkgdir/usr/lib/bjlib
+ install 327/libs_bin/*.so.* $pkgdir/usr/lib
+ install -D LICENSE-cnijfilter-3.00EN.txt $pkgdir/usr/share/licenses/${pkgname}/license.txt
+
+ cd $srcdir/cnijfilter-common-$pkgver/cnijfilter
+ make install DESTDIR=$pkgdir || return 1
+
+ # Now we install the updated PPDs from http://mp610.blogspot.com
+ cd $srcdir/ppdMP620-630en-1.5
+ install -d $pkgdir/usr/share/cups/model
+ install canonmp620-630en.ppd $pkgdir/usr/share/cups/model/
+ install cifmp610.conf $pkgdir/usr/lib/bjlib/
+
+ # install mp610 ppd, patch the version number
+ cat $srcdir/canonmp610en.ppd | sed "s/Canon MP610 series Ver.2.80en/Canon MP610 series Ver.3.00/" > $pkgdir/usr/share/cups/model/canonmp610.ppd
+
+ # install udev rules for USB users
+ install -d $pkgdir/etc/udev/rules.d/
+ install $srcdir/10-usbprinter-canon-mp6x0.rules $pkgdir/etc/udev/rules.d/
+}
+
diff --git a/autoconf.patch b/autoconf.patch
new file mode 100644
index 000000000000..d104e756f05c
--- /dev/null
+++ b/autoconf.patch
@@ -0,0 +1,77 @@
+--- cngpij/cngpij/bjcups.c 2012-07-31 05:22:51.613991808 -0400
++++ bjcups.c 2012-07-31 05:23:14.780658321 -0400
+@@ -21,6 +21,7 @@
+ #include <config.h>
+ #endif // HAVE_CONFIG_H
+
++#define _IPP_PRIVATE_STRUCTURES 1
+ #include <cups/cups.h>
+ #include <cups/language.h>
+ #include <cups/ppd.h>
+
+ --- backend/configure.in 2010-02-23 07:57:49.000000000 +0400
++++ configure.in 2013-01-12 17:57:23.186495527 +0400
+@@ -1,7 +1,7 @@
+ AC_INIT(src/cnij_backend_common.c)
+ AM_INIT_AUTOMAKE(backend, 3.40-1)
+
+-AM_CONFIG_HEADER(config.h)
++#AC_CONFIG_HEADERS(config.h)
+
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+
+--- cngpij/configure.in 2010-02-23 07:57:49.000000000 +0400
++++ configure.in 2013-01-12 17:55:19.960473398 +0400
+@@ -1,7 +1,7 @@
+ AC_INIT(cngpij/bjcups.c)
+ AM_INIT_AUTOMAKE(cngpij, 3.40-1)
+
+-AM_CONFIG_HEADER(config.h)
++#AC_CONFIG_HEADERS(config.h)
+
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
+
+--- cnijfilter/configure.in 2010-03-09 14:51:24.000000000 +0400
++++ configure.in 2013-01-12 17:55:42.657021362 +0400
+@@ -25,7 +25,7 @@
+
+
+ AM_INIT_AUTOMAKE(cif${program_suffix}, 3.00-1)
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(src/config.h)
+
+ dnl Checks for programs.
+ AC_ISC_POSIX
+@@ -47,7 +47,6 @@
+ AC_SUBST(ARC)
+
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+
+ dnl Checks for libraries.
+
+--- libs/configure.in 2010-02-23 07:57:49.000000000 +0400
++++ configure.in 2013-01-12 17:54:56.233930669 +0400
+@@ -1,7 +1,7 @@
+ AC_INIT(paramlist/paramlist.h)
+ AM_INIT_AUTOMAKE(buftool, 1.0.0)
+
+-AM_CONFIG_HEADER(config.h)
++#AC_CONFIG_HEADERS(config.h)
+
+ # Checks for programs.
+ AC_PROG_CXX
+
+--- pstocanonij/configure.in 2010-02-23 07:57:49.000000000 +0400
++++ configure.in 2013-01-12 17:56:03.480245771 +0400
+@@ -1,7 +1,7 @@
+ AC_INIT(filter/pstocanonij.c)
+ AM_INIT_AUTOMAKE(pstocanonij, 1.0.0)
+
+-AM_CONFIG_HEADER(config.h)
++#AC_CONFIG_HEADERS(config.h)
+
+ AC_ARG_ENABLE(progpath)
+ if test "${enable_progpath}" = "" ; then
diff --git a/libpng15.patch b/libpng15.patch
new file mode 100644
index 000000000000..f5b3a1b13db5
--- /dev/null
+++ b/libpng15.patch
@@ -0,0 +1,23 @@
+diff -aur cnijfilter-source-3.20-1/cnijfilter/src/bjfimage.c cnijfilter-source-3.20-1.new/cnijfilter/src/bjfimage.c
+--- cnijfilter-source-3.20-1/cnijfilter/src/bjfimage.c 2009-03-26 06:11:05.000000000 +0100
++++ cnijfilter-source-3.20-1.new/cnijfilter/src/bjfimage.c 2012-02-10 09:33:52.512334139 +0100
+@@ -1520,8 +1520,8 @@
+ short tmpformat;
+ short retbyte = 0;
+ short bpp = 3;
+- long width = 0;
+- long length = 0;
++ png_uint_32 width = 0;
++ png_uint_32 length = 0;
+ long rstep = 0;
+ long RasterLength = 0;
+ long i;
+@@ -1574,7 +1574,7 @@
+ goto onErr;
+ }
+
+- if (setjmp (png_p->jmpbuf))
++ if (setjmp (png_jmpbuf(png_p)))
+ {
+ png_destroy_read_struct(&png_p, &info_p, (png_infopp)NULL);
+ goto onErr;
diff --git a/missing-include.patch b/missing-include.patch
new file mode 100644
index 000000000000..159c79a1161b
--- /dev/null
+++ b/missing-include.patch
@@ -0,0 +1,20 @@
+--- src/cnijfilter-common-3.00/backend/src/cnij_backend_common.c 2008-09-01 10:05:44.000000000 +0200
++++ src-patched/cnijfilter-common-3.00/backend/src/cnij_backend_common.c 2012-05-06 17:38:40.000000000 +0200
+@@ -39,6 +39,7 @@
+ // CUPS Header
+ #include <cups/cups.h>
+ #include <cups/ipp.h>
++#include <cups/ppd.h>
+
+ // Header file for CANON
+ #include "cnij_backend_common.h"
+--- src/cnijfilter-common-3.00/cngpijmon/src/bjcupsmon_cups.c 2008-09-02 12:28:24.000000000 +0200
++++ src-patched/cnijfilter-common-3.00/cngpijmon/src/bjcupsmon_cups.c 2012-05-06 17:39:20.000000000 +0200
+@@ -21,6 +21,7 @@
+ /*** Includes ***/
+ #include <cups/cups.h>
+ #include <cups/language.h>
++#include <cups/ppd.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <pwd.h>
diff --git a/mp610.patch b/mp610.patch
new file mode 100644
index 000000000000..29100f30f512
--- /dev/null
+++ b/mp610.patch
@@ -0,0 +1,10 @@
+--- src/cnijfilter-common-3.00/cnijfilter/configure.in 2008-03-18 10:51:07.000000000 +0100
++++ src-patched/cnijfilter-common-3.00/cnijfilter/configure.in 2012-06-04 13:32:03.000000000 +0200
+@@ -33,6 +33,7 @@
+ case "${program_suffix}" in
+ ip3600) CNCL_LIB_ID=333;;
+ ip4600) CNCL_LIB_ID=334;;
++ mp610) CNCL_LIB_ID=327;;
+ mp630) CNCL_LIB_ID=336;;
+ mp540) CNCL_LIB_ID=338;;
+ mp240) CNCL_LIB_ID=341;;
diff --git a/mp620.install b/mp620.install
new file mode 100644
index 000000000000..643bfacb6d45
--- /dev/null
+++ b/mp620.install
@@ -0,0 +1,26 @@
+# arg 1: the new package version
+post_install() {
+ echo -n "Restarting the CUPS daemon... "
+ systemctl restart cups.service > /dev/null && echo "done"
+ echo "Please select the following driver during CUPS configuration :
+ Canon MP620-630 series Ver.3.00"
+}
+
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ echo -n "Restarting the CUPS daemon... "
+ systemctl restart cups.service > /dev/null && echo "done"
+}
+
+
+# arg 1: the old package version
+post_remove() {
+ echo -n "Restarting the CUPS daemon... "
+ systemctl restart cups.service > /dev/null && echo "done"
+}
+
+op=$1
+shift
+$op $*
diff --git a/ppd.patch b/ppd.patch
new file mode 100644
index 000000000000..862375049404
--- /dev/null
+++ b/ppd.patch
@@ -0,0 +1,11 @@
+--- src/ppdMP620-630en-1.5/canonmp620-630en.ppd.orig 2012-06-19 21:42:06.000000000 +0200
++++ src/ppdMP620-630en-1.5/canonmp620-630en.ppd 2012-06-19 21:42:28.000000000 +0200
+@@ -29,7 +29,7 @@
+ *LanguageVersion: English
+ *Manufacturer: "Canon"
+ *ModelName: "Canon MP620-630 series"
+-*NickName: "Canon MP620-630 series Ver.2.80en"
++*NickName: "Canon MP620-630 series Ver.3.00"
+ *PCFileName: "CNMP620.PPD"
+ *Product: "(mp610)"
+ *PSVersion: "(3010.000) 550"
diff --git a/v3.00.patch b/v3.00.patch
new file mode 100644
index 000000000000..045df7a4b9e5
--- /dev/null
+++ b/v3.00.patch
@@ -0,0 +1,40 @@
+--- src/cnijfilter-common-3.00/cnijfilter/src/bjfoption.c 2012-06-19 21:10:21.000000000 +0200
++++ src-patched/cnijfilter-common-3.00/cnijfilter/src/bjfoption.c 2012-06-19 21:11:17.000000000 +0200
+@@ -1332,37 +1332,6 @@
+ }
+ }
+
+- /* Ver.3.00 */
+- if (formattype >= CND_FORMATTYPE_8){
+- /* Confirm combination of MediaSupply and PaperSize */
+- if ((confirm_return_code = CNCL_ConfirmSupplySize( &uidb.nominfo, (void *)bjlibdir, uidb.lpdbTop, uidb.dbsize)) == 1){
+- /* SupplySize returned OK with these parameters */
+- } else if (confirm_return_code == 0){
+- /* SupplySize returned NG with these parameters */
+- fprintf(stderr, "Error: inappropriate papersize selection\n");
+- goto onError;
+- } else {
+- /* Internal error */
+- fprintf(stderr, "Error: INTERNAL ERROR\n");
+- goto onError;
+- }
+-
+- /* Confirm combination of PaperSize and Duplex */
+- if( duplex_support ){
+- if ((confirm_return_code = CNCL_ConfirmSizeDuplex( &uidb.nominfo, (void *)bjlibdir, uidb.lpdbTop, uidb.dbsize)) == 1){
+- /* SizeDuplex returned OK with these parameters */
+- } else if (confirm_return_code == 0){
+- /* SizeDuplex returned NG with these parameters */
+- fprintf(stderr, "Error: inappropriate duplex selection\n");
+- goto onError;
+- } else {
+- /* Internal error */
+- fprintf(stderr, "Error: INTERNAL ERROR\n");
+- goto onError;
+- }
+- }
+- }
+-
+ /* Prepare bjdevice structure, to handover main routine */
+ bjdevice->bjfltModelID = uidb.ModelID;
+ bjdevice->bjfltMediaType = GetCurrentnValue(uidb.lpdbTop, uidb.dbsize, CNCL_MEDIATYPE);