1 pkgname=brother-dcp7060d-cupswrapper
4 pkgdesc='CUPS driver for Brother laser printer DCP-7060D'
6 url='http://www.kde.org'
8 depends=('brother-dcp7060d-lpr' 'cups')
9 makedepends=('rpmextract' 'findutils' 'sed')
10 source=("http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperDCP7060D-${pkgver/_/-}.i386.rpm")
14 rpmextract.sh "cupswrapperDCP7060D-${pkgver/_/-}.i386.rpm"
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/DCP7060D.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/brlpdwrapperDCP7060D"
25 chmod +x "${pkgdir}/usr/lib/cups/filter/brlpdwrapperDCP7060D"
28 find . -type f | while read file
30 install -DT "$file" "${pkgdir}/${file}"
33 md5sums=('eda57513b79e42be5a232073495767cf')