1 # Maintainer: (Doktor Schliemann) <doktor.schliemann@gmail.com>
2 # Original Contributors: Fortunato Ventre (voRia) <vorione@gmail.com>
3 # Custom Processing Unlimited (CPUnltd) <CPUnltd@gmail.com>
4 # Giancarlo Bianchi <giancarlobianchi76@gmail.com>
5 pkgname=scangearmp-mg3100
9 pkgdesc="Canon Scanner Driver (for MG3100 series)"
10 url="http://support-my.canon-asia.com/contents/MY/EN/0100393102.html"
11 arch=('i686' 'x86_64')
14 install=scangearmp-mg3100.install
15 source=(http://gdlp01.c-wss.com/gds/1/0100003931/01/scangearmp-source-${_pkgver}.tar.gz)
18 if [ "$CARCH" == "x86_64" ]; then
24 cd ${srcdir}/scangearmp-source-${_pkgver}/scangearmp
25 ./autogen.sh --prefix=/usr --enable-libpath=/usr/lib LDFLAGS="-lm -L`pwd`/../com/${libdir}"
26 # Force the use of system's libtool
28 ln -s `which libtool` .
30 make clean || return 1
33 install -d -m 0755 $pkgdir/usr/lib/bjlib
34 make DESTDIR=${pkgdir} install || return 1
36 # Install SANE configuration file
37 install -d -m 0755 $pkgdir/etc/sane.d/
38 install -m 0644 ${srcdir}/scangearmp-source-${_pkgver}/scangearmp/backend/canon_mfp.conf $pkgdir/etc/sane.d/canon_mfp.conf
40 # Install common libraries
41 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpcmcm.so.8.0.1 ${pkgdir}/usr/lib/
42 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpmsimg.so.1.0.2 ${pkgdir}/usr/lib/
43 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpmslld.so.1.0.1 ${pkgdir}/usr/lib/
44 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpmsui.so.1.8.0 ${pkgdir}/usr/lib/
45 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpnet.so.1.2.2 ${pkgdir}/usr/lib/
47 # Install mg3100 series specific libraries
48 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/387/${libdir}/libcncpmsimg387.so.1.8.0 ${pkgdir}/usr/lib/
49 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/387/${libdir}/libcncpmslld387c.so.1.04.1 ${pkgdir}/usr/lib/
50 install -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/387/${libdir}/libcncpmslld387.so.1.8.0 ${pkgdir}/usr/lib/
51 # Create symbolic links
53 ln -s libcncpcmcm.so.8.0.1 libcncpcmcm.so
54 ln -s libcncpmsimg.so.1.0.2 libcncpmsimg.so
55 ln -s libcncpmslld.so.1.0.1 libcncpmslld.so
56 ln -s libcncpmsui.so.1.8.0 libcncpmsui.so
57 ln -s libcncpnet.so.1.2.2 libcncpnet.so
59 ln -s libcncpmsimg387.so.1.8.0 libcncpmsimg387.so
60 ln -s libcncpmslld387c.so.1.04.1 libcncpmslld387c.so
61 ln -s libcncpmslld387.so.1.8.0 libcncpmslld387.so
63 # Make scangearmp usable from gimp
64 install -d -m 0755 ${pkgdir}/usr/lib/gimp/2.0/plug-ins/
65 ln -s /usr/bin/scangearmp ${pkgdir}/usr/lib/gimp/2.0/plug-ins/
67 # Install .tbl and .dat files for mg3100 series
68 install -D -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/387/cnc1752d.tbl ${pkgdir}/usr/lib/bjlib/
69 install -D -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/387/cnc_3870.tbl ${pkgdir}/usr/lib/bjlib/
70 install -D -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/387/CNC_387H.DAT ${pkgdir}/usr/lib/bjlib/
71 install -D -m 0755 ${srcdir}/scangearmp-source-${_pkgver}/387/CNC_387P.DAT ${pkgdir}/usr/lib/bjlib/
74 install -D -m 0644 ${srcdir}/scangearmp-source-${_pkgver}/scangearmp/etc/80-canon_mfp.rules ${pkgdir}/etc/udev/rules.d/80-canon_mfp.rules
77 install -D -m 0666 ${srcdir}/scangearmp-source-${_pkgver}/com/ini/canon_mfp_net.ini ${pkgdir}/usr/lib/bjlib/
79 # Install license file
80 cd ${srcdir}/scangearmp-source-${_pkgver}
81 install -D LICENSE-scangearmp-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-scangearmp-${pkgver}EN.txt
83 # Remove unneeded files
84 rm ${pkgdir}/usr/lib/libsane-canon_mfp.a
85 rm ${pkgdir}/usr/lib/libsane-canon_mfp.la
87 md5sums=('88e3891918357304a9f527d043b435d2')