updated on Tue Jan 17 08:05:08 UTC 2012
[aur-mirror.git] / brother-hl2040 / brother-hl2040.patch
blob757c397df21e37ff29e4eb7ce76db07a7af708fe
1 diff -ur usr/local/Brother/cupswrapper/cupswrapperHL2040-2.0.1 newusr/local/Brother/cupswrapper/cupswrapperHL2040-2.0.1
2 --- usr/local/Brother/cupswrapper/cupswrapperHL2040-2.0.1 2007-04-10 07:32:29.000000000 +0200
3 +++ newusr/local/Brother/cupswrapper/cupswrapperHL2040-2.0.1 2009-11-24 22:55:05.072156508 +0100
4 @@ -18,6 +18,7 @@
5 # Place, Suite 330, Boston, MA 02111-1307 USA
8 +if /bin/false; then
9 if [ "$1" = '-e' ]; then
10 lpadmin -x HL2040
11 rm -f /usr/share/cups/model/HL2040.ppd
12 @@ -60,7 +61,8 @@
13 rm -f /usr/share/cups/model/HL2040.ppd
14 ppd_file_name=/usr/share/cups/model/HL2040.ppd
16 -cat <<ENDOFPPDFILE >$ppd_file_name
17 +fi
18 +cat <<ENDOFPPDFILE > ppd_file
19 *PPD-Adobe: "4.3"
20 *%================================================
21 *% Copyright(C) 2006 Brother Industries, Ltd.
22 @@ -333,15 +335,17 @@
23 ENDOFPPDFILE
26 +if /bin/false; then
27 brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperHL2040
28 brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperHL2040
29 rm -f $brotherlpdwrapper
32 -cat <<!ENDOFWFILTER! >$brotherlpdwrapper
33 +fi
34 +cat <<!ENDOFWFILTER! > wrapper
35 #! /bin/sh
37 -# Brother Print filter >> $brotherlpdwrapper
38 +# Brother Print filter
39 # Copyright (C) 2005 Brother. Industries, Ltd.
40 # Ver1.00
42 @@ -467,25 +471,25 @@
46 -if [ -e "/usr/local/Brother/lpd/filter\$PRINTER" ]; then
47 +if [ -e "/usr/share/brother/lpd/filter\$PRINTER" ]; then
49 else
50 - echo "ERROR: /usr/local/Brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
51 + echo "ERROR: /usr/share/brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
52 errorcode=30
53 exit $errorcode
56 -if [ -e "/usr/local/Brother/cupswrapper/brcupsconfig3" ]; then
57 +if [ -e "/usr/share/brother/cupswrapper/brcupsconfig3" ]; then
58 if [ \$DEBUG = 0 ]; then
59 - /usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
60 + /usr/share/brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
61 else
62 - /usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
63 + /usr/share/brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
68 if [ \$DEBUG -le 2 ]; then
69 - cat \$INPUT_TEMP_PS | /usr/local/Brother/lpd/filter\$PRINTER
70 + cat \$INPUT_TEMP_PS | /usr/share/brother/lpd/filter\$PRINTER
73 if [ \$DEBUG -ge 2 ]; then
74 @@ -502,6 +506,7 @@
75 !ENDOFWFILTER!
78 +if /bin/false; then
79 chmod a+x $brotherlpdwrapper
80 if [ -e /usr/lib64/cups/filter ]; then
81 cp $brotherlpdwrapper $brotherlpdwrapper64
82 @@ -532,3 +537,4 @@
84 lpadmin -p HL2040 -E -v $port -P /usr/share/cups/model/HL2040.ppd
85 exit 0
86 +fi
87 diff -ur usr/local/Brother/inf/brHL2040func newusr/local/Brother/inf/brHL2040func
88 --- usr/local/Brother/inf/brHL2040func 2007-04-06 01:31:17.000000000 +0200
89 +++ newusr/local/Brother/inf/brHL2040func 2009-11-24 22:34:14.073499379 +0100
90 @@ -24,3 +24,5 @@
91 Sleep={PrinterDefault,"1-99"}
92 Toner Save Mode={ON,OFF}
94 +[psconvert2]
95 +pstops=/usr/lib/cups/filter/pstops
96 diff -ur usr/local/Brother/lpd/filterHL2040 newusr/local/Brother/lpd/filterHL2040
97 --- usr/local/Brother/lpd/filterHL2040 2007-04-06 01:31:17.000000000 +0200
98 +++ newusr/local/Brother/lpd/filterHL2040 2009-11-24 22:36:25.723017962 +0100
99 @@ -21,7 +21,7 @@
100 PRINTER="HL2040"
101 PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')
103 -BR_PRT_PATH=/usr/local/Brother
104 +BR_PRT_PATH=/usr/share/brother
105 RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
106 PAPER_INF=$BR_PRT_PATH/inf/paperinf
107 PSCONV=$BR_PRT_PATH/lpd/psconvert2
108 @@ -109,11 +109,9 @@
109 cat $INPUT_TEMP1| $prefilter >$INPUT_TEMP
112 -#PSTOPSFILTER=`which pstops`
113 +PSTOPSFILTER='/usr/lib/cups/filter/pstops'
115 -if [ -e '/usr/bin/pstops' ];then
116 - PSTOPSFILTER='/usr/bin/pstops'
117 -else
118 +if ! [ -e "$PSTOPSFILTER" ];then
119 PSTOPSFILTER=''