summarylogtreecommitdiffstats
path: root/brother-mfc-7840w.patch
blob: 50d6cee40b41d8c6b243a200f4e82348e727b21d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
diff -ur old_usr/local/Brother/cupswrapper/cupswrapperMFC7840W-2.0.2 usr/local/Brother/cupswrapper/cupswrapperMFC7840W-2.0.2
--- usr/local/Brother/cupswrapper/cupswrapperMFC7840W-2.0.2.orig	2008-01-25 05:29:51.000000000 +0300
+++ usr/local/Brother/cupswrapper/cupswrapperMFC7840W-2.0.2	2012-01-27 15:05:45.796578436 +0400
@@ -18,6 +18,7 @@
 # Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
+if /bin/false; then
 if [ "$1" = '-e' ]; then
   lpadmin -x MFC7840W
   rm -f /usr/share/cups/model/MFC7840W.ppd
@@ -61,8 +62,8 @@
 fi
 rm -f /usr/share/cups/model/MFC7840W.ppd
 ppd_file_name=/usr/share/cups/model/MFC7840W.ppd
-
-cat <<ENDOFPPDFILE >$ppd_file_name
+fi
+cat <<ENDOFPPDFILE > ppd_file
 *PPD-Adobe: "4.3"
 *%================================================
 *%	Copyright(C) 2006 Brother Industries, Ltd.
@@ -338,13 +339,13 @@
 if [ -e '/usr/share/ppd' ];then
   cp  $ppd_file_name  /usr/share/ppd
 fi
-
+if /bin/false; then
 brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperMFC7840W
 brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperMFC7840W
 rm -f  $brotherlpdwrapper
 
-
-cat <<!ENDOFWFILTER! >$brotherlpdwrapper
+fi
+cat <<!ENDOFWFILTER! > wrapper
 #! /bin/sh
 #
 # Brother Print filter  >>  $brotherlpdwrapper
@@ -473,25 +474,25 @@
 fi
 
 
-if [ -e "/usr/local/Brother/lpd/filter\$PRINTER" ]; then
+if [ -e "/usr/share/brother/lpd/filter\$PRINTER" ]; then
        :
 else
-    echo "ERROR: /usr/local/Brother/lpd/filter\$PRINTER does not exist"   >>\$LOGFILE
+    echo "ERROR: /usr/share/brother/lpd/filter\$PRINTER does not exist"   >>\$LOGFILE
     errorcode=30
     exit $errorcode
 fi
 
-if [ -e "/usr/local/Brother/cupswrapper/brcupsconfig3" ]; then
+if [ -e "/usr/share/brother/cupswrapper/brcupsconfig3" ]; then
   if [ \$DEBUG = 0 ]; then
-     /usr/local/Brother/cupswrapper/brcupsconfig3  \$PRINTER  \$PPD 0 "\$options" >> /dev/null
+     /usr/share/brother/cupswrapper/brcupsconfig3  \$PRINTER  \$PPD 0 "\$options" >> /dev/null
   else
-     /usr/local/Brother/cupswrapper/brcupsconfig3  \$PRINTER  \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
+     /usr/share/brother/cupswrapper/brcupsconfig3  \$PRINTER  \$PPD \$LOGCLEVEL "\$options" >>\$LOGFILE
   fi
 fi
 
 
 if [ \$DEBUG -le 2 ]; then
-    cat    \$INPUT_TEMP_PS | /usr/local/Brother/lpd/filter\$PRINTER
+    cat    \$INPUT_TEMP_PS | /usr/share/brother/lpd/filter\$PRINTER
 fi
 
 if [ \$DEBUG -ge 2 ];  then
@@ -507,7 +508,7 @@
 
 !ENDOFWFILTER!
 
-
+if /bin/false; then
 chmod 755 $brotherlpdwrapper
 if [ -e /usr/lib64/cups/filter ]; then
    cp $brotherlpdwrapper  $brotherlpdwrapper64
@@ -538,3 +539,4 @@
 fi
 lpadmin -p MFC7840W -E -v $port -P /usr/share/cups/model/MFC7840W.ppd
   exit 0 
+fi

diff -ur old_usr/local/Brother/inf/brMFC7840Wfunc usr/local/Brother/inf/brMFC7840Wfunc
--- old_usr/local/Brother/inf/brMFC7840Wfunc	2007-04-06 01:31:14.000000000 +0200
+++ usr/local/Brother/inf/brMFC7840Wfunc	2009-04-19 16:10:05.010695023 +0200
@@ -24,3 +24,6 @@
 Sleep={PrinterDefault,"1-99"}
 Toner Save Mode={ON,OFF}
 
+[psconvert2]
+pstops=/usr/lib/cups/filter/pstops
+
diff -ur old_usr/local/Brother/lpd/filterMFC7840W usr/local/Brother/lpd/filterMFC7840W
--- old_usr/local/Brother/lpd/filterMFC7840W	2007-04-06 01:31:14.000000000 +0200
+++ usr/local/Brother/lpd/filterMFC7840W	2009-04-19 16:19:57.909802658 +0200
@@ -21,7 +21,7 @@
 PRINTER="MFC7840W"
 PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')
 
-BR_PRT_PATH=/usr/local/Brother
+BR_PRT_PATH=/usr/share/brother
 RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
 PAPER_INF=$BR_PRT_PATH/inf/paperinf
 PSCONV=$BR_PRT_PATH/lpd/psconvert2
@@ -109,12 +109,10 @@
 	cat $INPUT_TEMP1| $prefilter >$INPUT_TEMP
 fi
 	
-#PSTOPSFILTER=`which pstops`
+PSTOPSFILTER='/usr/lib/cups/filter/pstops'
 
-if [ -e '/usr/bin/pstops' ];then
-	PSTOPSFILTER='/usr/bin/pstops'
-else
-	PSTOPSFILTER=''
+if ! [ -e "$PSTOPSFILTER" ];then
+ 	PSTOPSFILTER=''
 fi