diff options
author | Llewelyn Trahaearn | 2017-08-21 12:13:48 -0700 |
---|---|---|
committer | Llewelyn Trahaearn | 2017-08-21 12:13:48 -0700 |
commit | 9924a39d265bcc8b0752d81ba2fadf6027ab610d (patch) | |
tree | a673d363f196924e825f8316ceb97c3852573b11 | |
parent | fdc51c8bb4807d9210645a5f6a48be242e8c06b2 (diff) | |
download | aur-9924a39d265bcc8b0752d81ba2fadf6027ab610d.tar.gz |
Clean up patch and update depends from foomatic-filters to cups-filters as cups-filters no longer provides foomatic-filters.
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | brother-mfc-7860dw.install | 37 | ||||
-rw-r--r-- | brother-mfc-7860dw.patch | 148 |
4 files changed, 117 insertions, 108 deletions
@@ -1,24 +1,23 @@ # Generated by mksrcinfo v8 -# Sun Nov 20 19:02:40 UTC 2016 +# Mon Aug 21 19:08:34 UTC 2017 pkgbase = brother-mfc-7860dw pkgdesc = CUPS driver for Brother MFC-7860DW printer pkgver = 2.1.0 - pkgrel = 3 - url = http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html - install = brother-mfc-7860dw.install + pkgrel = 4 + url = http://support.brother.com/g/b/producttop.aspx?c=us_ot&lang=en&prod=mfc7860dw_all arch = i686 arch = x86_64 license = GPL depends = cups depends = ghostscript depends = gsfonts - depends = foomatic-filters + depends = cups-filters source = http://www.brother.com/pub/bsc/linux/dlf/mfc7860dwlpr-2.1.0-1.i386.rpm source = http://www.brother.com/pub/bsc/linux/dlf/cupswrapperMFC7860DW-2.0.4-2.i386.rpm source = brother-mfc-7860dw.patch sha256sums = 7886fbbaa9aa980d6f6b08f4a584f8614857e6ab1511c2b494d3b8e1dedafd14 sha256sums = 2ab019790bd88b65b592b1a700f9e96018130bcbfc19cde5017f0230e7f77e98 - sha256sums = a20a9c1f537b18593eab3a8274a9a78cf5c00d29faf63c22737dc302d9b7e441 + sha256sums = 1123ca4599d8404fee800d5f439ad862ff4ad49d252fca527c170d9500d8a7f3 pkgname = brother-mfc-7860dw @@ -1,44 +1,38 @@ -# Maintainer: Oleksandr Natalenko <pfactum@gmail.com> -# Author of original PKGBUILD: Igor Mosyagin <c6h10o5@gmail.com> +# Maintainer: Llewelyn Trahaearn <WoefulDerelict [at] GMail [dot] com> +# Contributor: Oleksandr Natalenko <pfactum [at] gmail [dot] com> +# Contributor: Igor Mosyagin <c6h10o5 [at] gmail [dot] com> + pkgname=brother-mfc-7860dw pkgver=2.1.0 -_driver_ver=2.1.0 _wrapper_ver=2.0.4 -pkgrel=3 +pkgrel=4 pkgdesc="CUPS driver for Brother MFC-7860DW printer" arch=('i686' 'x86_64') -url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html" +url="http://support.brother.com/g/b/producttop.aspx?c=us_ot&lang=en&prod=mfc7860dw_all" license=('GPL') depends=() if [ "$CARCH" = "x86_64" ]; then - depends=('cups' 'ghostscript' 'gsfonts' 'foomatic-filters' 'lib32-glibc') + depends=('cups' 'ghostscript' 'gsfonts' 'cups-filters' 'lib32-glibc') else - depends=('cups' 'ghostscript' 'gsfonts' 'foomatic-filters') + depends=('cups' 'ghostscript' 'gsfonts' 'cups-filters') fi -install=brother-mfc-7860dw.install -source=(http://www.brother.com/pub/bsc/linux/dlf/mfc7860dwlpr-${_driver_ver}-1.i386.rpm +source=(http://www.brother.com/pub/bsc/linux/dlf/mfc7860dwlpr-${pkgver}-1.i386.rpm http://www.brother.com/pub/bsc/linux/dlf/cupswrapperMFC7860DW-${_wrapper_ver}-2.i386.rpm brother-mfc-7860dw.patch) sha256sums=('7886fbbaa9aa980d6f6b08f4a584f8614857e6ab1511c2b494d3b8e1dedafd14' '2ab019790bd88b65b592b1a700f9e96018130bcbfc19cde5017f0230e7f77e98' - 'a20a9c1f537b18593eab3a8274a9a78cf5c00d29faf63c22737dc302d9b7e441') + '1123ca4599d8404fee800d5f439ad862ff4ad49d252fca527c170d9500d8a7f3') prepare() { - cd "${srcdir}" - - # patch files to adhere arch packaging standard + # Modify file locations to align with packaging standards for Arch Linux systems and tame the wrapper. patch -p1 < "${srcdir}/brother-mfc-7860dw.patch" || return 1 } build() { - cd "${srcdir}" - - # generate ppd and wrapper file sh "${srcdir}/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC7860DW-${_wrapper_ver}" } package() { - # put files where they belong mkdir -p "${pkgdir}/usr/share/brother" cp -r "${srcdir}/usr/local/Brother/Printer" "${pkgdir}/usr/share/brother/printer" cp -r "${srcdir}/var" "${pkgdir}/" @@ -49,4 +43,3 @@ package() { install -m 644 -D ppd_file "${pkgdir}/usr/share/cups/model/MFC7860DW.ppd" install -m 755 -D wrapper "${pkgdir}/usr/lib/cups/filter/brlpdwrapperMFC7860DW" } - diff --git a/brother-mfc-7860dw.install b/brother-mfc-7860dw.install deleted file mode 100644 index 4129f27b97a0..000000000000 --- a/brother-mfc-7860dw.install +++ /dev/null @@ -1,37 +0,0 @@ -# orig name brother-mfc-8870dw.install -post_install() { - __port2=`lpinfo -v | grep -i 'usb://Brother/MFC-7860DW' | head -1` - if [ "$__port2" = '' ];then - __port2=`lpinfo -v | grep 'usb://' | head -1` - fi - __port=`echo $__port2| sed s/direct//g` - if [ "$__port" = '' ];then - __port="usb:/dev/usb/lp0" - fi - - lpadmin -p MFC7860DW -E -v $__port -P /usr/share/cups/model/MFC7860DW.ppd - echo "If CUPS is not running now, start it after installation" - echo "and type command:" -echo " lpadmin -p MC7860DW -E -v URL -P /usr/share/cups/model/MFC7860DW.ppd" - echo "where URL can be found using command:" - echo " lpinfo -v | grep -i 'Brother'" - echo "in case of a network printer, take URL:" - echo " socket://ipaddress:9100/" - echo "You can also register the new printer using web interface at:" - echo " http://localhost:631/" -} - -post_upgrade() { - /bin/true -} - -pre_remove() { - lpadmin -x HL2030 -} - - -op=$1 -shift - -$op "$@" - diff --git a/brother-mfc-7860dw.patch b/brother-mfc-7860dw.patch index efd01106ed78..4eaf8920f917 100644 --- a/brother-mfc-7860dw.patch +++ b/brother-mfc-7860dw.patch @@ -1,50 +1,89 @@ diff -Naur old/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC7860DW-2.0.4 new/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC7860DW-2.0.4 ---- old/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC7860DW-2.0.4 2010-06-11 10:55:18.000000000 +0300 -+++ new/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC7860DW-2.0.4 2013-01-28 13:15:21.000000000 +0200 -@@ -18,6 +18,7 @@ +--- old/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC7860DW-2.0.4 2010-06-11 00:55:18.000000000 -0700 ++++ new/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC7860DW-2.0.4 2017-08-21 11:45:55.081640259 -0700 +@@ -18,54 +18,7 @@ # Place, Suite 330, Boston, MA 02111-1307 USA # -+if /bin/false; then - if [ "$1" = '-e' ]; then - lpadmin -x MFC7860DW - rm -f /usr/share/cups/model/MFC7860DW.ppd -@@ -65,7 +66,8 @@ - ppd_file_name=/usr/share/ppd/MFC7860DW.ppd - fi - +-if [ "$1" = '-e' ]; then +- lpadmin -x MFC7860DW +- rm -f /usr/share/cups/model/MFC7860DW.ppd +- rm -f /usr/lib/cups/filter/brlpdwrapperMFC7860DW +- rm -f /usr/lib64/cups/filter/brlpdwrapperMFC7860DW +- rm -f /usr/local/Brother/Printer/MFC7860DW/cupswrapper/brcupsconfig4 +- if [ -f /usr/share/ppd/MFC7860DW.ppd ];then +- rm -f /usr/share/ppd/MFC7860DW.ppd +- fi +- if [ -e /etc/init.d/cups ]; then +- /etc/init.d/cups restart +- fi +- if [ -e /etc/init.d/cupsys ]; then +- /etc/init.d/cupsys restart +- fi +- exit 0 +-fi +-if [ "$1" = "-r" ]; then +- lpadmin -x MFC7860DW +- if [ -e /etc/init.d/cups ]; then +- /etc/init.d/cups restart +- fi +- if [ -e /etc/init.d/cupsys ]; then +- /etc/init.d/cupsys restart +- fi +- exit 0 +-fi +-if [ "$1" = "help" ] || [ "$1" = "-h" ]; then +- echo 'option -h : help' +- echo ' -i : install' +- echo ' -e : uninstall' +- echo ' -r : remove printer' +- exit 0 +-fi +-mkdir -p /usr/lib/cups/filter +- +-if [ -e "/usr/local/Brother/Printer/MFC7860DW/lpd/filterMFC7860DW" ]; then +- : +-else +- echo "ERROR : Brother LPD filter is not installed." +-fi +-rm -f /usr/share/cups/model/MFC7860DW.ppd +-ppd_file_name=/usr/share/cups/model/MFC7860DW.ppd +-if [ ! -e /usr/share/cups/model ]; then +- ppd_file_name=/usr/share/ppd/MFC7860DW.ppd +-fi +- -cat <<ENDOFPPDFILE >$ppd_file_name -+fi +cat <<ENDOFPPDFILE > ppd_file *PPD-Adobe: "4.3" *%================================================ *% Copyright Brother Industries,Ltd 2006-2008 -@@ -347,10 +349,11 @@ +@@ -347,24 +300,8 @@ ENDOFPPDFILE -chmod 755 $ppd_file_name -+if /bin/false; then -+chmod 755 ppd_file - if [ -e '/usr/share/ppd' ];then - if [ -e '/usr/share/cups/model' ];then +-if [ -e '/usr/share/ppd' ];then +- if [ -e '/usr/share/cups/model' ];then - cp $ppd_file_name /usr/share/ppd -+ cp ppd_file /usr/share/ppd - fi - fi - -@@ -363,8 +366,8 @@ - fi - fi +- fi +-fi +- +-brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperMFC7860DW +-brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperMFC7860DW +-rm -f $brotherlpdwrapper +-if [ ! -e /usr/lib/cups/filter ];then +- if [ -e /usr/lib64/cups/filter ];then +- brotherlpdwrapper=/usr/lib64/cups/filter/brlpdwrapperMFC7860DW +- fi +-fi - -cat <<!ENDOFWFILTER! >$brotherlpdwrapper -+fi +cat <<!ENDOFWFILTER! > wrapper #! /bin/sh # # Brother Print filter >> $brotherlpdwrapper -@@ -493,25 +496,25 @@ +@@ -493,25 +430,25 @@ fi @@ -76,32 +115,47 @@ diff -Naur old/usr/local/Brother/Printer/MFC7860DW/cupswrapper/cupswrapperMFC786 fi if [ \$DEBUG -ge 2 ]; then -@@ -527,7 +530,7 @@ +@@ -526,40 +463,3 @@ + exit \$errorcode !ENDOFWFILTER! - - -+if /bin/false; then - chmod 755 $brotherlpdwrapper - if [ -e /usr/lib/cups/filter ]; then - if [ -e /usr/lib64/cups/filter ]; then -@@ -535,8 +538,8 @@ - fi - fi - +- +-chmod 755 $brotherlpdwrapper +-if [ -e /usr/lib/cups/filter ]; then +- if [ -e /usr/lib64/cups/filter ]; then +- cp $brotherlpdwrapper $brotherlpdwrapper64 +- fi +-fi +- -chmod a+w /usr/local/Brother/Printer/MFC7860DW/inf/brMFC7860DWrc -chmod a+w /usr/local/Brother/Printer/MFC7860DW/inf -+chmod a+w /usr/share/brother/printer/MFC7860DW/inf/brMFC7860DWrc -+chmod a+w /usr/share/brother/printer/MFC7860DW/inf - if [ -e /etc/init.d/lpd ]; then - /etc/init.d/lpd stop - fi -@@ -563,3 +566,5 @@ - fi - lpadmin -p MFC7860DW -E -v $port -P $ppd_file_name - exit 0 -+fi -+ +-if [ -e /etc/init.d/lpd ]; then +- /etc/init.d/lpd stop +-fi +-if [ -e /etc/init.d/lprng ]; then +- /etc/init.d/lprng stop +-fi +- if [ -e /etc/init.d/cups ]; then +- /etc/init.d/cups restart +- fi +- if [ -e /etc/init.d/cupsys ]; then +- /etc/init.d/cupsys restart +- fi +-sleep 2s +-port2=`lpinfo -v | grep -i 'usb://Brother/MFC7860DW' | head -1` +-if [ "$port2" = '' ];then +- port2=`lpinfo -v | grep -i 'usb://Brother/' | head -1` +- if [ "$port2" = '' ];then +- port2=`lpinfo -v | grep 'usb://' | head -1` +- fi +-fi +-port=`echo $port2| sed s/direct//g` +-if [ "$port" = '' ];then +- port=usb:/dev/usb/lp0 +-fi +-lpadmin -p MFC7860DW -E -v $port -P $ppd_file_name +- exit 0 diff -Naur old/usr/local/Brother/Printer/MFC7860DW/inf/brMFC7860DWfunc new/usr/local/Brother/Printer/MFC7860DW/inf/brMFC7860DWfunc --- old/usr/local/Brother/Printer/MFC7860DW/inf/brMFC7860DWfunc 2010-05-24 06:10:10.000000000 +0300 +++ new/usr/local/Brother/Printer/MFC7860DW/inf/brMFC7860DWfunc 2013-01-28 12:59:40.000000000 +0200 |