updated on Sat Jan 21 20:03:50 UTC 2012
[aur-mirror.git] / brother-hl2030 / brother-hl2030.patch
blob6e28f05e63581ad8c2702350aca17e0f7f750515
1 diff -ur old_usr/local/Brother/cupswrapper/cupswrapperHL2030-2.0.1 usr/local/Brother/cupswrapper/cupswrapperHL2030-2.0.1
2 --- old_usr/local/Brother/cupswrapper/cupswrapperHL2030-2.0.1 2007-12-06 00:36:39.000000000 +0100
3 +++ usr/local/Brother/cupswrapper/cupswrapperHL2030-2.0.1 2007-12-06 00:36:54.000000000 +0100
4 @@ -17,7 +17,7 @@
5 # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
6 # Place, Suite 330, Boston, MA 02111-1307 USA
9 +if /bin/false; then
10 if [ "$1" = '-e' ]; then
11 lpadmin -x HL2030
12 rm -f /usr/share/cups/model/HL2030.ppd
13 @@ -60,7 +60,8 @@
14 rm -f /usr/share/cups/model/HL2030.ppd
15 ppd_file_name=/usr/share/cups/model/HL2030.ppd
17 -cat <<ENDOFPPDFILE >$ppd_file_name
18 +fi
19 +cat <<ENDOFPPDFILE > ppd_file
20 *PPD-Adobe: "4.3"
21 *%================================================
22 *% Copyright(C) 2006 Brother Industries, Ltd.
23 @@ -333,15 +334,16 @@
24 ENDOFPPDFILE
27 +if /bin/false; then
28 brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperHL2030
29 brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperHL2030
30 rm -f $brotherlpdwrapper
33 -cat <<!ENDOFWFILTER! >$brotherlpdwrapper
34 +fi
35 +cat <<!ENDOFWFILTER! > wrapper
36 #! /bin/sh
38 -# Brother Print filter >> $brotherlpdwrapper
39 +# Brother Print filter
40 # Copyright (C) 2005 Brother. Industries, Ltd.
41 # Ver1.00
43 @@ -467,25 +469,25 @@
47 -if [ -e "/usr/local/Brother/lpd/filter\$PRINTER" ]; then
48 +if [ -e "/usr/share/brother/lpd/filter\$PRINTER" ]; then
50 else
51 - echo "ERROR: /usr/local/Brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
52 + echo "ERROR: /usr/share/brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
53 errorcode=30
54 exit $errorcode
57 -if [ -e "/usr/local/Brother/cupswrapper/brcupsconfig3" ]; then
58 +if [ -e "/usr/share/brother/cupswrapper/brcupsconfig3" ]; then
59 if [ \$DEBUG = 0 ]; then
60 - /usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
61 + /usr/share/brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
62 else
63 - /usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
64 + /usr/share/brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
69 if [ \$DEBUG -le 2 ]; then
70 - cat \$INPUT_TEMP_PS | /usr/local/Brother/lpd/filter\$PRINTER
71 + cat \$INPUT_TEMP_PS | /usr/share/brother/lpd/filter\$PRINTER
74 if [ \$DEBUG -ge 2 ]; then
75 @@ -501,7 +503,7 @@
77 !ENDOFWFILTER!
80 +if /bin/false; then
81 chmod a+x $brotherlpdwrapper
82 if [ -e /usr/lib64/cups/filter ]; then
83 cp $brotherlpdwrapper $brotherlpdwrapper64
84 @@ -532,3 +534,4 @@
86 lpadmin -p HL2030 -E -v $port -P /usr/share/cups/model/HL2030.ppd
87 exit 0
88 +fi
89 diff -ur old_usr/local/Brother/inf/brHL2030func usr/local/Brother/inf/brHL2030func
90 --- old_usr/local/Brother/inf/brHL2030func 2007-12-06 00:36:39.000000000 +0100
91 +++ usr/local/Brother/inf/brHL2030func 2007-12-06 00:36:58.000000000 +0100
92 @@ -24,3 +24,5 @@
93 Sleep={PrinterDefault,"1-99"}
94 Toner Save Mode={ON,OFF}
96 +[psconvert2]
97 +pstops=/usr/lib/cups/filter/pstops
98 diff -ur old_usr/local/Brother/lpd/filterHL2030 usr/local/Brother/lpd/filterHL2030
99 --- old_usr/local/Brother/lpd/filterHL2030 2007-12-06 00:36:39.000000000 +0100
100 +++ usr/local/Brother/lpd/filterHL2030 2007-12-06 00:36:50.000000000 +0100
101 @@ -21,7 +21,7 @@
102 PRINTER="HL2030"
103 PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')
105 -BR_PRT_PATH=/usr/local/Brother
106 +BR_PRT_PATH=/usr/share/brother
107 RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
108 PAPER_INF=$BR_PRT_PATH/inf/paperinf
109 PSCONV=$BR_PRT_PATH/lpd/psconvert2
110 @@ -109,11 +109,9 @@
111 cat $INPUT_TEMP1| $prefilter >$INPUT_TEMP
114 -#PSTOPSFILTER=`which pstops`
115 +PSTOPSFILTER='/usr/lib/cups/filter/pstops'
117 -if [ -e '/usr/bin/pstops' ];then
118 - PSTOPSFILTER='/usr/bin/pstops'
119 -else
120 +if ! [ -e "$PSTOPSFILTER" ];then
121 PSTOPSFILTER=''