updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / cnijfilter-mp550 / PKGBUILD
blob6b580f4fe5255716259957ce7d9e673d53a400bc
1 # Maintainer: Stefan Hackl <stef.hackl@gmail.com>
3 pkgbase=('cnijfilter-mp550')
4 pkgname=('cnijfilter-mp550')
5 true && pkgname=('cnijfilter-common' 'cnijfilter-mp550')
6 _pkgname=cnijfilter
7 pkgver=3.20
8 pkgrel=4
9 url="http://software.canon-europe.com/products/0010757.asp"
10 arch=('i686' 'x86_64')
11 license=('custom')
12 makedepends=('rpmextract')
13 source=("http://files.canon-europe.com/files/soft37275/software/MP550_rpm_driver_pack.tar")
14 md5sums=('5d806a0b626cc6aff6f172b95e11e105')
16 build() {
17   mkdir ${srcdir}/${_pkgname}-common
18   mkdir ${srcdir}/${_pkgname}-mp550
19   cd ${srcdir}
20   tar -xf MP550_rpm_driver_pack.tar
21   tar -xf ${_pkgname}-mp550series-${pkgver}-1-i386-rpm.tar.gz
22   mv ${srcdir}/${_pkgname}-mp550series-${pkgver}-1-i386-rpm/packages/${_pkgname}-mp550series-${pkgver}-1.i386.rpm  ${srcdir}/${_pkgname}-mp550
23   mv ${srcdir}/${_pkgname}-mp550series-${pkgver}-1-i386-rpm/packages/${_pkgname}-common-${pkgver}-1.i386.rpm ${srcdir}/${_pkgname}-common
24   cd ${srcdir}/${_pkgname}-common
25   rpmextract.sh ${_pkgname}-common-${pkgver}-1.i386.rpm
26   cd ${srcdir}/cnijfilter-mp550
27   rpmextract.sh ${_pkgname}-mp550series-${pkgver}-1.i386.rpm
30 package_cnijfilter-common() {
31   pkgdesc="Canon IJ Printer Driver (Common package)"
32   if [ "${CARCH}" = 'x86_64' ]; then
33     depends=('lib32-libcups' 'lib32-popt')
34   elif [ "${CARCH}" = 'i686' ]; then
35     depends=('libcups' 'popt')
36   fi
37   install -d ${pkgdir}/usr/lib/cups/backend
38   install -d ${pkgdir}/usr/local/bin
39   install -d ${pkgdir}/usr/share/licenses/${_pkgname}
40   install -Dm 755 ${srcdir}/${pkgname}/usr/lib/libcnnet.so.1.1.0 ${pkgdir}/usr/lib/libcnnet.so.1.1.0
41   install -Dm 644 ${srcdir}/${pkgname}/usr/lib/bjlib/cnnet.ini ${pkgdir}/usr/lib/bjlib/cnnet.ini
42   install -Dm 755 -t ${pkgdir}/usr/lib/cups/backend ${srcdir}/${pkgname}/usr/lib/cups/backend/*
43   install -Dm 755 ${srcdir}/${pkgname}/usr/lib/cups/filter/pstocanonij ${pkgdir}/usr/lib/cups/filter/pstocanonij
44   install -Dm 755 -t ${pkgdir}/usr/local/bin ${srcdir}/${pkgname}/usr/local/bin/*
45   install -Dm 644 -t ${pkgdir}/usr/share/licenses/${_pkgname} ${srcdir}/${pkgname}/usr/share/doc/${_pkgname}-common-3.20/*
48 package_cnijfilter-mp550() {
49   pkgdesc="Canon Printer Driver (For Multifunction MP550 series)"
50   if [ "${CARCH}" = 'x86_64' ]; then
51     depends=('lib32-libxml2' 'lib32-gtk2' 'lib32-popt' 'lib32-libpng12' 'cnijfilter-common=3.20')
52   elif [ "${CARCH}" = 'i686' ]; then
53     depends=('libxml2' 'gtk2' 'libpng12' 'popt' 'cnijfilter-common=3.20')
54   fi
55   install -d ${pkgdir}/usr/lib/bjlib
56   install -d ${pkgdir}/usr/local/bin
57   install -d ${pkgdir}/usr/local/share/cngpijmonmp550/pixmaps
58   install -d ${pkgdir}/usr/local/share/printuimp550
59   install -Dm 755 -t ${pkgdir}/usr/lib/ ${srcdir}/${pkgname}/usr/lib/*.*
60   install -Dm 755 -t ${pkgdir}/usr/lib//bjlib ${srcdir}/${pkgname}/usr/lib/bjlib/*
61   install -Dm 755 -t ${pkgdir}/usr/local/bin ${srcdir}/${pkgname}/usr/local/bin/*
62   install -Dm 644 -t ${pkgdir}/usr/local/share/cngpijmonmp550/pixmaps/ ${srcdir}/${pkgname}/usr/local/share/cngpijmonmp550/pixmaps/*
63   for locale in $(ls ${srcdir}/${pkgname}/usr/local/share/locale); do
64     install -d ${pkgdir}/usr/local/share/locale/${locale}/LC_MESSAGES
65     install -Dm 644 -t ${pkgdir}/usr/local/share/locale/${locale}/LC_MESSAGES ${srcdir}/${pkgname}/usr/local/share/locale/${locale}/LC_MESSAGES/*
66   done
67   install -Dm 644 -t ${pkgdir}/usr/local/share/printuimp550 ${srcdir}/${pkgname}/usr/local/share/printuimp550/*
68   install -Dm 644 ${srcdir}/${pkgname}/usr/share/cups/model/canonmp550.ppd ${pkgdir}/usr/share/cups/model/canonmp550.ppd
71 pkgdesc="Canon Printer Driver (For Multifunction MP550 series)"
72 if [ "${CARCH}" = 'x86_64' ]; then
73   depends=('lib32-libxml2' 'lib32-gtk2' 'lib32-popt' 'lib32-libpng12')
74 elif [ "${CARCH}" = 'i686' ]; then
75    depends=('libxml2' 'gtk2' 'libpng12' 'popt')