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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
--- old_usr/local/Brother/Printer/mfc240c/cupswrapper/cupswrappermfc240c 2016-06-04 18:27:01.893882000 -0500
+++ usr/local/Brother/Printer/mfc240c/cupswrapper/cupswrappermfc240c 2016-06-04 18:31:52.815619223 -0500
@@ -23,6 +23,7 @@
device_name=`echo $printer_name | eval sed -e 's/MFC/MFC-/' -e 's/DCP/DCP-/' -e 's/FAX/FAX-/'`
pcfilename=`echo $printer_name | tr -d '[A-Z]'`
device_model="Printer"
+if /bin/false; then
if [ "$1" = '-e' ]; then
lpadmin -x ${printer_name}
rm -f /usr/share/cups/model/br${printer_model}.ppd
@@ -66,7 +67,8 @@
rm -f /usr/share/cups/model/br${printer_model}.ppd
ppd_file_name=/usr/share/cups/model/br${printer_model}.ppd
-cat <<ENDOFPPDFILE1 >$ppd_file_name
+fi
+cat <<ENDOFPPDFILE1 > ppd_file
*PPD-Adobe: "4.3"
*%================================================
@@ -253,24 +255,6 @@
*BRSlowDrying ON/ON: ""
*CloseUI: *BRSlowDrying
-ENDOFPPDFILE1
-
-if [ $printer_model = "mfc5860cn" ]; then
- cat <<ENDOFPPDFILE_2 >>$ppd_file_name
-*%=== Media Type ================================
-*OpenUI *BRInputSlot/Paper Feed: PickOne
-*OrderDependency: 13 AnySetup *BRInputSlot
-*DefaultBRInputSlot: AUTO
-*BRInputSlot AUTO/Auto Select: " "
-*BRInputSlot Tray1/Tray 1: " "
-*BRInputSlot Tray2/Tray 2: " "
-*CloseUI: *BRInputSlot
-
-ENDOFPPDFILE_2
-fi
-
-
-cat <<ENDOFPPDFILE_END >>$ppd_file_name
*%=== Media Type ================================
*OpenUI *BRColorMediaType/Media Type: PickOne
*OrderDependency: 16 AnySetup *BRColorMediaType
@@ -665,10 +649,9 @@
*UIConstraints: *BRColorMediaType Transparencies *Resolution Photo
*UIConstraints: *BRColorMediaType Transparencies *Resolution Highest
+ENDOFPPDFILE1
-
-ENDOFPPDFILE_END
-
+if /bin/false; then
chmod 644 $ppd_file_name
if [ -d /usr/share/ppd ]
@@ -690,8 +673,9 @@
rm -f $brotherlpdwrapper
#echo 'rm -f /usr/lib/cups/filter/brlpdwrapper${printer_model}'
+fi
-cat <<!ENDOFWFILTER! >$brotherlpdwrapper
+cat <<!ENDOFWFILTER! > wrapper
#! /bin/sh
#
# Copyright (C) 2005 Brother. Industries, Ltd.
@@ -756,25 +740,25 @@
INPUT_TEMP_PS=\`mktemp /tmp/br_input_ps.XXXXXX\`
nup="cat"
-if [ "`echo \$5 | grep 'Nup='`" != '' ] && [ \$NUPENABLE != 0 ]; then
+if [ "\`echo \$5 | grep 'Nup='\`" != '' ] && [ \$NUPENABLE != 0 ]; then
- if [ "`echo \$5 | grep 'Nup=64'`" != '' ]; then
+ if [ "\`echo \$5 | grep 'Nup=64'\`" != '' ]; then
nup="psnup -64"
- elif [ "`echo \$5 | grep 'Nup=32'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=32'\`" != '' ]; then
nup="psnup -32"
- elif [ "`echo \$5 | grep 'Nup=25'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=25'\`" != '' ]; then
nup="psnup -25"
- elif [ "`echo \$5 | grep 'Nup=16'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=16'\`" != '' ]; then
nup="psnup -16"
- elif [ "`echo \$5 | grep 'Nup=8'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=8'\`" != '' ]; then
nup="psnup -8"
- elif [ "`echo \$5 | grep 'Nup=6'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=6'\`" != '' ]; then
nup="psnup -6"
- elif [ "`echo \$5 | grep 'Nup=4'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=4'\`" != '' ]; then
nup="psnup -4"
- elif [ "`echo \$5 | grep 'Nup=2'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=2'\`" != '' ]; then
nup="psnup -2"
- elif [ "`echo \$5 | grep 'Nup=1'`" != '' ]; then
+ elif [ "\`echo \$5 | grep 'Nup=1'\`" != '' ]; then
nup="cat"
fi
echo "NUP=\$nup" >>\$LOGFILE
@@ -798,25 +782,25 @@
cat > \$INPUT_TEMP_PS
fi
fi
-if [ -e "/usr/local/Brother/${device_model}/${printer_model}/lpd/filter${printer_model}" ]; then
+if [ -e "/usr/share/brother/${device_model}/${printer_model}/lpd/filter${printer_model}" ]; then
:
else
- echo "ERROR: /usr/local/Brother/${device_model}/${printer_model}/lpd/filter${printer_model} does not exist" >>\$LOGFILE
+ echo "ERROR: /usr/share/brother/${device_model}/${printer_model}/lpd/filter${printer_model} does not exist" >>\$LOGFILE
errorcode=30
exit
fi
CUPSOPTION=\`echo "\$5 Copies=\$4" | sed -e 's/BrChain/Chain/' -e 's/BrBrightness/Brightness/' -e 's/BrContrast/Contrast/' -e 's/BrHalfCut/HalfCut/' -e 's/BrAutoTapeCut/AutoCut/' -e 's/BrMirror/Mirror/' -e 's/BrHalftonePattern/Halftone/' -e 's/Binary/Binary/' -e 's/Dither/Dither/' -e 's/ErrorDiffusion/ErrorDiffusion/' -e 's/PageSize/media/' -e 's/BrSheets/Sheets/' -e 's/multiple-document-handling/Collate/' -e 's/separate-documents-collated-copies/ON/' -e 's/separate-documents-uncollated-copies/OFF/'\`
-if [ -e "/usr/local/Brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1" ]; then
+if [ -e "/usr/share/brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1" ]; then
if [ \$DEBUG = 0 ]; then
- /usr/local/Brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1 ${printer_name} \$PPDC 0 "\$CUPSOPTION" "${printer_model}">> /dev/null
+ /usr/share/brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1 ${printer_name} \$PPDC 0 "\$CUPSOPTION" "${printer_model}">> /dev/null
else
- /usr/local/Brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1 ${printer_name} \$PPDC \$LOGCLEVEL "\$CUPSOPTION" "${printer_model}">>\$LOGFILE
+ /usr/share/brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1 ${printer_name} \$PPDC \$LOGCLEVEL "\$CUPSOPTION" "${printer_model}">>\$LOGFILE
fi
fi
if [ \$DEBUG -lt 10 ]; then
- cat \$INPUT_TEMP_PS | /usr/local/Brother/${device_model}/${printer_model}/lpd/filter${printer_model} "\$\$" "CUPS" "USB"
+ cat \$INPUT_TEMP_PS | /usr/share/brother/${device_model}/${printer_model}/lpd/filter${printer_model} "\$\$" "CUPS" "USB"
if [ \$LOGLEVEL -gt 2 ]; then
if [ \$LOGFILE != "/dev/null" ]; then
@@ -832,6 +816,7 @@
!ENDOFWFILTER!
+if /bin/false; then
chmod 755 $brotherlpdwrapper
#if [ -e /usr/lib64/cups/backend ]; then
# cp $brotherlpdwrapper $brotherlpdwrapper64
@@ -872,4 +857,4 @@
lpadmin -p ${printer_name} -E -v $port -m br${printer_model}.ppd
exit 0
-
+fi
--- old_usr/local/Brother/Printer/mfc240c/inf/brmfc240cfunc 2016-02-24 21:02:31.348670372 -0600
+++ usr/local/Brother/Printer/mfc240c/inf/brmfc240cfunc 2016-02-24 20:49:04.062019161 -0600
@@ -46,3 +46,6 @@
[Constraint]
+[psconvert2]
+pstops=/usr/lib/cups/filter/pstops
+
--- old_usr/local/Brother/Printer/mfc240c/lpd/filtermfc240c 2016-02-24 21:02:31.348670372 -0600
+++ usr/local/Brother/Printer/mfc240c/lpd/filtermfc240c 2016-02-24 20:52:02.742015740 -0600
@@ -21,7 +21,7 @@
PRINTER="mfc240c"
PRINTER_TMP=$(echo $PRINTER | sed -e 's/ //g' -e 's/-//g')
-BR_PRT_PATH=/usr/local/Brother/Printer/${PRINTER}
+BR_PRT_PATH=/usr/share/brother/Printer/${PRINTER}
RCFILE=`eval echo $BR_PRT_PATH/inf/brPRINTERrc | eval sed 's/PRINTER/"$PRINTER_TMP"/'`
PAPER_INF=$BR_PRT_PATH/inf/paperinfij2
PSCONV=$BR_PRT_PATH/lpd/psconvertij2
|