# Maintainer: Rene Rasmussen <madeye@paranoidix.dk>
#             PKGBUILD based on my brother dcpj925dw package
#             which in turn was adapted from brother-dcpj315w by jneight

pkgname="brother-mfc-j6920dw"
pkgver="3.0.0"
pkgrel=1
pkgdesc="LPR and CUPS driver for the Brother MFC-J6920DW (Based on the brother-dcp-j925dw package)"
url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
license='custom:Brother Industries'
depends=('cups' 'a2ps')
depends_x86_64=('lib32-gcc-libs')
makedepends=('rpmextract')
install="brother-mfc-j6920dw.install"
arch=('i686' 'x86_64')

md5sums=('6bc2cce4909849fe1f248a3a511421a6'
         '1820c6bbec17476a6c03699eeaf3e85a')

source=("http://www.brother.com/pub/bsc/linux/dlf/mfcj6920dwlpr-${pkgver}-${pkgrel}.i386.rpm"
    "http://www.brother.com/pub/bsc/linux/dlf/mfcj6920dwcupswrapper-${pkgver}-${pkgrel}.i386.rpm")

build() {
    cd "$srcdir"
}

post_install() {
    /opt/brother/Printers/mfcj6920dw/cupswrapper/cupswrappermfcj6920dw
}

package() {
    install -d $pkgdir/usr/bin
      install -d $pkgdir/var/spool/lpd
    install -Dm755 "$srcdir"/usr/bin/brprintconf_mfcj6920dw "$pkgdir"/usr/bin/
      cp -R $srcdir/opt $pkgdir/opt
}

