1 # Contributor: Eric Le Bras <eric.lebras@gmail.com>
3 pkgname=cnijfilter-mp510
6 pkgdesc="Canon IJ Printer Driver for Pixma MP510 multifunction"
8 url="http://support-au.canon.com.au/contents/AU/EN/0100084103.html"
9 license=('GPL2' 'LGPL2.1' 'custom')
10 depends=('cnijfilter-common270' 'gtk' 'libxml' 'libglade' 'libpng')
11 makedepends=('rpmextract autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
12 install=cnijfilter-mp510.install
13 source=("http://gdlp01.c-wss.com/gds/5/0900007185/02/cnijfilter-common-${pkgver}-2.src.rpm"
14 cngpijmonmp510.desktop
17 cnijfilter-mp510.patch)
18 md5sums=('478aa71f6f4c81ef788d2136152af4c3'
19 '0531790082c6e0dda3f9eaf8263ba402'
20 '69be069048ce3e9013b6197114dd370f'
21 '32c0372cd453da2f68a91c03c3c25bf0'
22 '8bcb33744c79555d54b871d5c795c616')
26 rpmextract.sh cnijfilter-common-${pkgver}-2.src.rpm
27 tar xzf cnijfilter-common-${pkgver}-2.tar.gz
29 cd ${srcdir}/cnijfilter-common-${pkgver}
30 patch -p1 -i ../cnijfilter-mp510.patch
32 cd ${srcdir}/cnijfilter-common-${pkgver}/ppd
33 ./autogen.sh --prefix=/usr || return 1
34 make install DESTDIR=${pkgdir} || return 1
36 cd ${srcdir}/cnijfilter-common-${pkgver}/cnijfilter
37 ./autogen.sh --prefix=/usr --program-suffix=mp510 --enable-libpath=/usr/lib/bjlib --enable-binpath=/usr/bin || return 1
40 make install DESTDIR=${pkgdir} || return 1
42 cd ${srcdir}/cnijfilter-common-${pkgver}/printui
43 ./autogen.sh --prefix=/usr --program-suffix=mp510 --datadir=/usr/share || return 1
46 make install DESTDIR=${pkgdir} || return 1
48 cd ${srcdir}/cnijfilter-common-${pkgver}/lgmon
49 ./autogen.sh --prefix=/usr --program-suffix=mp510 --enable-progpath=/usr/bin || return 1
52 make install DESTDIR=${pkgdir} || return 1
54 cd ${srcdir}/cnijfilter-common-${pkgver}/cngpijmon
55 ./autogen.sh --prefix=/usr --program-suffix=mp510 || return 1
58 make install DESTDIR=${pkgdir} || return 1
60 cd ${srcdir}/cnijfilter-common-${pkgver}
61 install -d ${pkgdir}/usr/lib/bjlib
62 install -m 755 293/database/* ${pkgdir}/usr/lib/bjlib
63 install -s -m 755 293/libs_bin/*.so.* ${pkgdir}/usr/lib
64 install -D LICENSE-cnijfilter-${pkgver}E.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}E.txt
66 install -Dm644 "$srcdir/cngpijmonmp510.desktop" "$pkgdir/usr/share/applications/cngpijmonmp510.desktop"
67 install -Dm644 "$srcdir/printuimp510.desktop" "$pkgdir/usr/share/applications/printuimp510.desktop"
69 rm -rf ${pkgdir}/usr/lib/cups/
70 rm ${pkgdir}/usr/share/cups/model/canonip*
71 rm ${pkgdir}/usr/share/cups/model/canonmp{160,600}.ppd
73 install -Dm644 "$srcdir/98-usbprinter.rules" "$pkgdir/etc/udev/rules.d/98-usbprinter.rules"