1 pkgname=brother-dcp7065dn-cupswrapper
4 pkgdesc='CUPS driver for Brother laser printer DCP-7065DN'
6 url='http://www.kde.org'
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")
14 rpmextract.sh "cupswrapperDCP7065DN-${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/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"
28 find . -type f | while read file
30 install -DT "$file" "${pkgdir}/${file}"
34 md5sums=('2c7b96d7f23cc2f0d793e1e4e79fc1ab')