1 # Maintainer: Custom Processing Unlimited (CPUnltd) <CPUnltd 'at' gmail 'dot' com>
2 # Original Contributor: Fortunato Ventre (voRia) <vorione@gmail.com>
3 pkgname=cnijfilter-mg5200
7 pkgdesc="Canon IJ Printer Driver (for MG5200 series)"
8 url="http://support-au.canon.com.au/contents/AU/EN/0100302002.html"
11 depends=('libcups' 'cups' 'popt' 'ghostscript' 'gsfonts' 'atk>=1.9.0' 'gtk2>=2.8.0'
12 'pango>=1.12.3' 'libpng>=1.2.8' 'libtiff' 'cairo>=1.0.2' 'libxml2>=2.6.24'
13 'fontconfig>=2.3.0' 'libxinerama')
14 makedepends=('autoconf>=2.13' 'automake>=1.6' 'tar' 'make' 'gcc')
15 conflicts=('cnijfilter-common')
16 install=cnijfilter-mg5200.install
17 source=(http://gdlp01.c-wss.com/gds/0/0100003020/01/cnijfilter-source-${_pkgver}.tar.gz)
18 md5sums=('609975a05d6050fcca88f312d3f35c6a')
21 if [ "$CARCH" == "x86_64" ]; then
27 ## Compile and install mg5200 stuff
29 cd ${srcdir}/cnijfilter-source-${_pkgver}/ppd
30 ./autogen.sh --prefix=/usr --enable-ppdpath=/usr/share/cups/model --program-suffix=mg5200
31 make clean || return 1
33 make install DESTDIR=${pkgdir} || return 1
35 cd ${srcdir}/cnijfilter-source-${_pkgver}/cnijfilter
36 ./autogen.sh --prefix=/usr --enable-libpath=/usr/lib/bjlib --enable-binpath=/usr/bin --program-suffix=mg5200
37 make clean || return 1
39 make install DESTDIR=${pkgdir} || return 1
41 cd ${srcdir}/cnijfilter-source-${_pkgver}/printui
42 ./autogen.sh --prefix=/usr --datadir=/usr/share --program-suffix=mg5200
43 make || true # Needed to avoid errors while building locales
44 make clean || return 1
46 make install DESTDIR=${pkgdir} || return 1
48 cd ${srcdir}/cnijfilter-source-${_pkgver}/lgmon
49 ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --program-suffix=mg5200
50 make clean || return 1
52 make install DESTDIR=${pkgdir} || return 1
54 cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon
55 ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --datadir=/usr/share --program-suffix=mg5200
56 make clean || return 1
58 make install DESTDIR=${pkgdir} || return 1
60 ## Compile and install common stuff
62 cd ${srcdir}/cnijfilter-source-${_pkgver}/libs
63 ./autogen.sh --prefix=/usr
64 make clean || return 1
66 make install DESTDIR=${pkgdir} || return 1
68 cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpij
69 ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
70 make clean || return 1
72 make install DESTDIR=${pkgdir} || return 1
74 cd ${srcdir}/cnijfilter-source-${_pkgver}/pstocanonij
75 ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
76 make clean || return 1
78 make install DESTDIR=${pkgdir} || return 1
80 cd ${srcdir}/cnijfilter-source-${_pkgver}/backend
81 ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin
82 make clean || return 1
84 make install DESTDIR=${pkgdir} || return 1
86 cd ${srcdir}/cnijfilter-source-${_pkgver}/backendnet
87 ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin LDFLAGS="-L../../com/${libdir}"
88 make clean || return 1
90 make install DESTDIR=${pkgdir} || return 1
92 cd ${srcdir}/cnijfilter-source-${_pkgver}/cngpijmon/cnijnpr
93 ./autogen.sh --prefix=/usr
94 make clean || return 1
96 make install DESTDIR=${pkgdir} || return 1
98 # Install mg5200 libraries
99 install -d ${pkgdir}/usr/lib/
100 install -m 755 ${srcdir}/cnijfilter-source-${_pkgver}/374/${libdir}/*so.* ${pkgdir}/usr/lib/
101 install -d ${pkgdir}/usr/lib/bjlib/
102 install -m 644 ${srcdir}/cnijfilter-source-${_pkgver}/374/database/* ${pkgdir}/usr/lib/bjlib/
103 # Install common libraries
104 install -m 755 ${srcdir}/cnijfilter-source-${_pkgver}/com/${libdir}/*so.* ${pkgdir}/usr/lib/
105 install -m 666 ${srcdir}/cnijfilter-source-${_pkgver}/com/ini/* ${pkgdir}/usr/lib/bjlib/
106 # Make symbolic links for libraries
107 cd ${pkgdir}/usr/lib/
108 ln -s libcnnet.so.1.2.0 libcnnet.so
109 ln -s libcnbpcmcm374.so.8.0.1 libcnbpcmcm374.so
110 ln -s libcnbpcnclapi374.so.3.5.0 libcnbpcnclapi374.so
111 ln -s libcnbpcnclbjcmd374.so.3.3.0 libcnbpcnclbjcmd374.so
112 ln -s libcnbpcnclui374.so.3.6.0 libcnbpcnclui374.so
113 ln -s libcnbpess374.so.3.3.3 libcnbpess374.so
114 ln -s libcnbpess374.so.3.3.3 libcnbpo374.so
116 # Install license file
117 cd ${srcdir}/cnijfilter-source-${_pkgver}
118 install -D LICENSE-cnijfilter-${pkgver}EN.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-cnijfilter-${pkgver}EN.txt