updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / brother-dcp7065dn-cupswrapper / PKGBUILD
blob71677542bc8c1561c772c1fc8e0d91f120fd8d52
1 pkgname=brother-dcp7065dn-cupswrapper
2 pkgver=2.0.4_2
3 pkgrel=1
4 pkgdesc='CUPS driver for Brother laser printer DCP-7065DN'
5 arch=('i686' 'x86_64')
6 url='http://www.kde.org'
7 license=('LGPL')
8 depends=('brother-dcp7065dn-lpr' 'cups')
9 makedepends=('rpmextract' 'findutils' 'sed')
10 source=("http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperDCP7065DN-${pkgver/_/-}.i386.rpm")
12 build() {
13     cd "$srcdir"
14     rpmextract.sh "cupswrapperDCP7065DN-${pkgver/_/-}.i386.rpm"
17 package() {
18     local exe="$(find usr -name 'cupswrapper*' -type f)"
20     mkdir -p "${pkgdir}/usr/share/cups/model"
21     sed -n '/ENDOFPPDFILE/,/ENDOFPPDFILE/p' "$exe" | sed '1 br; b; :r s/.*/cat <<ENDOFPPDFILE/' | bash > "${pkgdir}/usr/share/cups/model/DCP7065DN.ppd"
23     mkdir -p "${pkgdir}/usr/lib/cups/filter"
24     sed -n '/!ENDOFWFILTER!/,/!ENDOFWFILTER!/p' "$exe" | sed '1 br; b; :r s/.*/cat <<!ENDOFWFILTER!/' | bash > "${pkgdir}/usr/lib/cups/filter/brlpdwrapperDCP7065DN"
25     chmod +x "${pkgdir}/usr/lib/cups/filter/brlpdwrapperDCP7065DN"
27     cd "$srcdir"
28     find . -type f | while read file
29     do
30         install -DT "$file" "${pkgdir}/${file}"
31     done
34 md5sums=('2c7b96d7f23cc2f0d793e1e4e79fc1ab')