summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBehnam Momeni2015-06-25 01:11:38 +0430
committerBehnam Momeni2015-06-25 01:11:38 +0430
commit13e1556258a8d8c03253b33ccbabc67e3d0b70cb (patch)
tree69c0f394c9ffd63fe2f616ec3b0b052edbb5ab7c
downloadaur-13e1556258a8d8c03253b33ccbabc67e3d0b70cb.tar.gz
Migrating scangearmp-mp550 package to AUR4
Adding lib32-gimp dependency. Switching from sha1sums to sha512sums. And using architecture specific vars for indicating dependencies.
-rw-r--r--.SRCINFO42
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD100
-rw-r--r--mychanges.patch131
-rw-r--r--scangearmp-common.install31
-rw-r--r--scangearmp-mp550.install20
6 files changed, 329 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..93656e6fe90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,42 @@
+pkgbase = scangearmp-mp550
+ pkgdesc = Canon Scanner Driver (For Multifunction MP550 series)
+ pkgver = 1.40
+ pkgrel = 5
+ url = http://www.canon-europe.com/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MP_series/PIXMA_MP550.aspx
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = autoconf>=2.59
+ makedepends = automake>=1.10
+ makedepends = tar
+ makedepends = make
+ makedepends = sane
+ conflicts = lib32-cnijfilter320
+ source = http://files.canon-europe.com/files/soft37281/Software/Linux_Scangear_Source_Files.tar
+ source = mychanges.patch
+ sha512sums = 257f6ffece2e43c5db7b4d73ac962ddce9256b652e980b64dead2d38fe15d1b101a4f91c87b7fce1e0154fcb7fd6fc59962d4ca9abd4a20f765845aa938d8b8a
+ sha512sums = dd5bc73edff4f8a3452058e6f635815e6697a996cf0f3bf8a6515594af22ad730333f80a4f1b8113d36549ce8a627b92eb5e36778fc72def6852d01ef5e0930b
+ makedepends_i686 = gcc
+ makedepends_i686 = libtool
+ makedepends_i686 = gimp
+ makedepends_i686 = libusb-compat
+ makedepends_x86_64 = gcc-multilib
+ makedepends_x86_64 = libtool-multilib
+ makedepends_x86_64 = lib32-gimp
+ makedepends_x86_64 = lib32-libusb-compat
+
+pkgname = scangearmp-common
+ pkgdesc = Canon IJ Scanner Driver (Common Package)
+ install = scangearmp-common.install
+ depends = sane
+ depends_i686 = libusb-compat
+ depends_i686 = gimp
+ depends_x86_64 = lib32-libusb-compat
+ depends_x86_64 = lib32-gimp
+
+pkgname = scangearmp-mp550
+ install = scangearmp-mp550.install
+ depends = scangearmp-common=1.40
+ depends_i686 = gtk2>=2.6
+ depends_x86_64 = lib32-gtk2>=2.6
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..57ec0cf1bb9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg/
+src/
+Linux_Scangear_Source_Files.tar
+*.pkg.tar.xz
+*~
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..b9f8a9709ff
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,100 @@
+# Maintainer: Behnam Momeni <sbmomeni [at the] gmail [dot] com>
+# Contributor: Artem A Klevtsov <unikum.pm [at the] gmail [dot] com>
+
+pkgbase='scangearmp-mp550'
+pkgname=('scangearmp-common' 'scangearmp-mp550')
+_pkgname=scangearmp
+
+pkgver=1.40
+pkgrel=5
+_pkgreview=1
+
+pkgdesc="Canon Scanner Driver (For Multifunction MP550 series)"
+url="http://www.canon-europe.com/Support/Consumer_Products/products/Fax__Multifunctionals/InkJet/PIXMA_MP_series/PIXMA_MP550.aspx"
+
+arch=('i686' 'x86_64')
+license=('custom')
+
+conflicts=('lib32-cnijfilter320')
+
+makedepends_x86_64=('gcc-multilib' 'libtool-multilib' 'lib32-gimp' 'lib32-libusb-compat')
+makedepends_i686=('gcc' 'libtool' 'gimp' 'libusb-compat')
+
+makedepends=('autoconf>=2.59' 'automake>=1.10' 'tar' 'make' 'sane')
+
+# File size: 2178560 bytes
+source=("http://files.canon-europe.com/files/soft37281/Software/Linux_Scangear_Source_Files.tar"
+ "mychanges.patch")
+sha512sums=('257f6ffece2e43c5db7b4d73ac962ddce9256b652e980b64dead2d38fe15d1b101a4f91c87b7fce1e0154fcb7fd6fc59962d4ca9abd4a20f765845aa938d8b8a'
+ 'dd5bc73edff4f8a3452058e6f635815e6697a996cf0f3bf8a6515594af22ad730333f80a4f1b8113d36549ce8a627b92eb5e36778fc72def6852d01ef5e0930b')
+
+build() {
+ cd ${srcdir}
+ tar xzf ${_pkgname}-source-${pkgver}-${_pkgreview}.tar.gz
+ cd ${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}
+
+ export CC="gcc -m32"
+
+ patch -p1 -i ../mychanges.patch
+
+ for libname in "libgimp-2.0.so" "libgimpmath-2.0.so" "libgimpconfig-2.0.so" "libgimpcolor-2.0.so" "libgimpbase-2.0.so"; do
+ ln -s /usr/lib32/${libname} com/libs_bin/${libname}
+ done
+
+ cd scangearmp
+ ./autogen.sh --prefix=/usr --libdir=/usr/lib32
+ if [ -x /usr/bin/libtool ]; then
+ rm libtool
+ ln -s /usr/bin/libtool
+ else
+ exit 1;
+ fi
+ make
+}
+
+package_scangearmp-common() {
+ pkgdesc="Canon IJ Scanner Driver (Common Package)"
+ install=scangearmp-common.install
+
+ depends_x86_64=('lib32-libusb-compat' 'lib32-gimp')
+ depends_i686=('libusb-compat' 'gimp')
+ depends=('sane')
+
+ cd ${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}/scangearmp
+
+ make DESTDIR=${pkgdir} install
+ mv ${pkgdir}/usr/lib ${pkgdir}/usr/lib32
+
+ install -D -m 644 etc/80-canon_mfp.rules ${pkgdir}/etc/udev/rules.d/80-canon_mfp.rules
+
+ cd ${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}
+ install -m 666 com/ini/canon_mfp_net.ini ${pkgdir}/usr/lib32/bjlib
+
+ for libname in "libcncpnet.so.1.1.0" "libcncpmsui.so.1.4.0" "libcncpcmcm.so.6.50.1" "libcncpmsimg.so.1.0.1" "libcncpmslld.so.1.0.0"; do
+ install -s -m 755 com/libs_bin/${libname} ${pkgdir}/usr/lib32
+ done
+ chmod 644 ${pkgdir}/usr/lib32/libsane-canon_mfp.a
+
+ install -D LICENSE-scangearmp-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-scangearmp-${pkgver}EN.txt
+}
+
+package_scangearmp-mp550() {
+ install=scangearmp-mp550.install
+
+ depends_x86_64=('lib32-gtk2>=2.6')
+ depends_i686=('gtk2>=2.6')
+ depends=("${_pkgname}-common=${pkgver}")
+
+ cd ${srcdir}/${_pkgname}-source-${pkgver}-${_pkgreview}
+
+ install -d ${pkgdir}/usr/lib32/bjlib
+ for libname in "libcncpmsimg359.so.1.4.0" "libcncpmslld359c.so.1.04.1" "libcncpmslld359.so.1.4.0"; do
+ install -s -m 755 359/libs_bin/${libname} ${pkgdir}/usr/lib32
+ done
+ for auxname in "cnc173dd.tbl" "cnc_3590.tbl" "CNC550.DAT" "CNC550P.DAT"; do
+ install -m 644 359/${auxname} ${pkgdir}/usr/lib32/bjlib
+ done
+
+ install -D LICENSE-scangearmp-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-scangearmp-${pkgver}EN.txt
+}
+
diff --git a/mychanges.patch b/mychanges.patch
new file mode 100644
index 00000000000..eabf376f51f
--- /dev/null
+++ b/mychanges.patch
@@ -0,0 +1,131 @@
+diff -aur scangearmp-source-1.40-1/scangearmp/backend/Makefile.am scangearmp-source-1.40-1.new/scangearmp/backend/Makefile.am
+--- scangearmp-source-1.40-1/scangearmp/backend/Makefile.am 2009-04-28 11:08:03.000000000 +0430
++++ scangearmp-source-1.40-1.new/scangearmp/backend/Makefile.am 2013-07-26 23:58:57.413152731 +0430
+@@ -17,7 +17,7 @@
+ libcnnet.h canon_mfp_debug.h
+
+ libsane_canon_mfp_la_CFLAGS = -DV_MAJOR=$(BACKEND_V_MAJOR) -DV_MINOR=$(BACKEND_V_MINOR)
+-libsane_canon_mfp_la_LIBADD = $(LIBLTDL) -lusb -ldl -lcncpnet -lpthread
++libsane_canon_mfp_la_LIBADD = $(LIBLTDL) -L../../com/libs_bin/ -lusb -ldl -lcncpnet -lpthread
+ libsane_canon_mfp_la_LDFLAGS = -version-info $(BACKEND_V_MAJOR):$(BACKEND_V_MINOR):$(BACKEND_V_REV)
+
+ EXTRA_DIST = \
+diff -aur scangearmp-source-1.40-1/scangearmp/etc/80-canon_mfp.rules scangearmp-source-1.40-1.new/scangearmp/etc/80-canon_mfp.rules
+--- scangearmp-source-1.40-1/scangearmp/etc/80-canon_mfp.rules 2009-04-28 11:08:03.000000000 +0430
++++ scangearmp-source-1.40-1.new/scangearmp/etc/80-canon_mfp.rules 2013-07-27 00:00:25.729820028 +0430
+@@ -7,48 +7,48 @@
+
+ LABEL="canon_mfp_start"
+ # Canon MP160
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1714", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1714", MODE="666"
+ # Canon MP510
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1717", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1717", MODE="666"
+ # Canon MP600
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1718", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1718", MODE="666"
+
+ # Canon MP140 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="172b", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="172b", MODE="666"
+ # Canon MP210 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1721", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1721", MODE="666"
+ # Canon MP520 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1724", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1724", MODE="666"
+ # Canon MP610 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1725", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1725", MODE="666"
+
+ #MP190 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1734", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1734", MODE="666"
+ #MP240 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1732", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1732", MODE="666"
+ #MP540 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1730", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1730", MODE="666"
+ #MP630 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="172e", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="172e", MODE="666"
+
+ #MX320 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1736", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1736", MODE="666"
+ #MX330 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1737", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1737", MODE="666"
+ #MX860 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="1735", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="1735", MODE="666"
+
+ #MP250 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173a", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="173a", MODE="666"
+ #MP270 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173b", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="173b", MODE="666"
+ #MP490 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173c", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="173c", MODE="666"
+ #MP550 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173d", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="173d", MODE="666"
+ #MP560 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173e", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="173e", MODE="666"
+ #MP640 series
+-SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="173f", MODE="666"
++ATTR{idVendor}=="04a9", ATTR{idProduct}=="173f", MODE="666"
+
+ LABEL="canon_mfp_end"
+diff -aur scangearmp-source-1.40-1/scangearmp/src/file_control.c scangearmp-source-1.40-1.new/scangearmp/src/file_control.c
+--- scangearmp-source-1.40-1/scangearmp/src/file_control.c 2009-04-28 11:08:03.000000000 +0430
++++ scangearmp-source-1.40-1.new/scangearmp/src/file_control.c 2013-07-26 23:58:57.413152731 +0430
+@@ -32,6 +32,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+diff -aur scangearmp-source-1.40-1/scangearmp/src/scanfile.c scangearmp-source-1.40-1.new/scangearmp/src/scanfile.c
+--- scangearmp-source-1.40-1/scangearmp/src/scanfile.c 2009-04-28 11:08:03.000000000 +0430
++++ scangearmp-source-1.40-1.new/scangearmp/src/scanfile.c 2013-07-26 23:58:57.413152731 +0430
+@@ -34,9 +34,11 @@
+ //#include <sys/types.h>
+ //#include <unistd.h>
+ #include <limits.h>
++#include <string.h>
++#include <png.h>
++#include <zlib.h>
+
+ #include "cnmsfunc.h"
+-#include "png.h"
+ #include "errors.h"
+ #include "w1.h"
+ #include "file_control.h"
+@@ -382,7 +384,7 @@
+
+ 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 );
++ FileControlWriteFile( *( (int *)png_get_io_ptr (png_ptr) ), (CNMSLPSTR)data, length );
+
+ return;
+ }
+diff -aur scangearmp-source-1.40-1/scangearmp/src/scanflow.c scangearmp-source-1.40-1.new/scangearmp/src/scanflow.c
+--- scangearmp-source-1.40-1/scangearmp/src/scanflow.c 2009-09-18 08:40:52.000000000 +0430
++++ scangearmp-source-1.40-1.new/scangearmp/src/scanflow.c 2013-07-26 23:58:57.416486068 +0430
+@@ -38,6 +38,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <gtk/gtk.h>
+ #include <sane/sane.h>
diff --git a/scangearmp-common.install b/scangearmp-common.install
new file mode 100644
index 00000000000..d957108d433
--- /dev/null
+++ b/scangearmp-common.install
@@ -0,0 +1,31 @@
+post_install() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig /usr/lib32
+ fi
+ _gimp2dir1=/usr/lib/gimp/2.0/plug-ins
+ _gimp2dir2=/opt/gnome/lib/gimp/2.0/plug-ins
+ # make symbolic link for gimp-plug-in
+ if [ -d ${_gimp2dir1} ]; then
+ ln -fs /usr/bin/scangearmp ${_gimp2dir1}/scangearmp
+ elif [ -d ${_gimp2dir2} ]; then
+ ln -fs /usr/bin/scangearmp ${_gimp2dir2}/scangearmp
+ fi
+}
+post_upgrade() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig /usr/lib32
+ fi
+}
+post_remove() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig /usr/lib32
+ fi
+ _gimp2dir1=/usr/lib/gimp/2.0/plug-ins
+ _gimp2dir2=/opt/gnome/lib/gimp/2.0/plug-ins
+
+ # remove symbolic link for gimp-plug-in
+ rm -f ${_gimp2dir1}/scangearmp
+ rm -f ${_gimp2dir2}/scangearmp
+ # remove sgmp_setting files
+ rm -f /tmp/canon_sgmp_setting*.*
+}
diff --git a/scangearmp-mp550.install b/scangearmp-mp550.install
new file mode 100644
index 00000000000..a822a7eada8
--- /dev/null
+++ b/scangearmp-mp550.install
@@ -0,0 +1,20 @@
+post_install() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig /usr/lib32
+ fi
+}
+post_upgrade() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig /usr/lib32
+ fi
+}
+post_remove() {
+ if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig /usr/lib32
+ fi
+ for LIBS in "libcncpmsimg359.so" "libcncpmslld359c.so" "libcncpmslld359.so"; do
+ if [ -h /usr/lib32/${LIBS} ]; then
+ rm -f /usr/lib32/${LIBS}
+ fi
+ done
+}