1 #Maintainer: Custom Processing Unlimited (CPUnltd) <CPUnltd 'at' gmail 'dot' com>
2 # Contributor: Fortunato Ventre (voRia) <vorione@gmail.com>
3 # Contributor: LaMorte <lamorte 'at' gmail 'dot' com>
4 pkgname=scangearmp-mg5100
8 pkgdesc="Canon Scanner Driver (for MG5100 series)"
9 url="http://support-my.canon-asia.com/contents/MY/EN/0100303302.html"
10 arch=('i686' 'x86_64')
13 source=(http://gdlp01.c-wss.com/gds/3/0100003033/01/scangearmp-source-${_pkgver}.tar.gz)
14 md5sums=('15782d670f9d5c5904e00610508114f3')
17 if [ "$CARCH" == "x86_64" ]; then
23 cd ${srcdir}/scangearmp-source-${_pkgver}/scangearmp
24 ./autogen.sh --prefix=/usr LDFLAGS="-L`pwd`/../com/${libdir}"
25 # Force the use of system's libtool
27 ln -s `which libtool` .
29 make clean || return 1
32 make install DESTDIR=${pkgdir} || return 1
34 #Install common libraries
35 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpcmcm.so.8.0.1 ${pkgdir}/usr/lib/
36 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpmsimg.so.1.0.2 ${pkgdir}/usr/lib/
37 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpmslld.so.1.0.1 ${pkgdir}/usr/lib/
38 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpmsui.so.1.6.0 ${pkgdir}/usr/lib/
39 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/com/${libdir}/libcncpnet.so.1.2.0 ${pkgdir}/usr/lib/
40 # Install mg5200 series specific libraries
41 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/373/${libdir}/libcncpmsimg373.so.1.6.0 ${pkgdir}/usr/lib/
42 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/373/${libdir}/libcncpmslld373c.so.1.04.1 ${pkgdir}/usr/lib/
43 install -m 755 ${srcdir}/scangearmp-source-${_pkgver}/373/${libdir}/libcncpmslld373.so.1.6.0 ${pkgdir}/usr/lib/
44 # Create symbolic links
46 ln -s libcncpcmcm.so.8.0.1 libcncpcmcm.so
47 ln -s libcncpmsimg.so.1.0.2 libcncpmsimg.so
48 ln -s libcncpmslld.so.1.0.1 libcncpmslld.so
49 ln -s libcncpmsui.so.1.6.0 libcncpmsui.so
50 ln -s libcncpnet.so.1.2.0 libcncpnet.so
51 ln -s libcncpmsimg373.so.1.6.0 libcncpmsimg373.so
52 ln -s libcncpmslld373c.so.1.04.1 libcncpmslld373c.so
53 ln -s libcncpmslld373.so.1.6.0 libcncpmslld373.so
55 # Make scangearmp usable from gimp
56 install -d -m 755 ${pkgdir}/usr/lib/gimp/2.0/plug-ins/
57 ln -s /usr/bin/scangearmp ${pkgdir}/usr/lib/gimp/2.0/plug-ins/
59 # Install .tbl and .dat files for mg5200 series
60 install -D -m 755 ${srcdir}/scangearmp-source-${_pkgver}/373/cnc1748d.tbl ${pkgdir}/usr/lib/bjlib/
61 install -D -m 755 ${srcdir}/scangearmp-source-${_pkgver}/373/cnc_3730.tbl ${pkgdir}/usr/lib/bjlib/
62 install -D -m 755 ${srcdir}/scangearmp-source-${_pkgver}/373/CNC5100.DAT ${pkgdir}/usr/lib/bjlib/
63 install -D -m 755 ${srcdir}/scangearmp-source-${_pkgver}/373/CNC5100P.DAT ${pkgdir}/usr/lib/bjlib/
66 install -D -m 644 ${srcdir}/scangearmp-source-${_pkgver}/scangearmp/etc/80-canon_mfp.rules ${pkgdir}/etc/udev/rules.d/80-canon_mfp.rules
69 install -D -m 666 ${srcdir}/scangearmp-source-${_pkgver}/com/ini/canon_mfp_net.ini ${pkgdir}/usr/lib/bjlib/
71 # Install license file
72 cd ${srcdir}/scangearmp-source-${_pkgver}
73 install -D LICENSE-scangearmp-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-scangearmp-${pkgver}EN.txt
75 # Remove unneeded files
76 rm ${pkgdir}/usr/lib/libsane-canon_mfp.a
77 rm ${pkgdir}/usr/lib/libsane-canon_mfp.la