githubからソースをダウンロードして、
iarchisoを使ってビルドするようになった、
みたいな。
で、makeしてみたけど、、、
Makefile:40: ターゲット 'root-image' のレシピで失敗しました
make: *** [root-image] エラー 1
なんか、作法が間違っているのかな。わからん。
githubから、ってことになると、
その内容は流動的であり、きょうと明日では、
もう変わっている、ってことが起こるでしょうね。
供給側は、かなり手間が省けるのは解る。だけど、
需要側は面倒になってくる。客を減らすような
気はするけど、、、。
ま、推移を見守りますか。
↓ ↓ ↓ ↓
落とし先が間違いしていました!
整理を兼ねて、、、
$ sudo pacman -S git archiso
$ pwd
/home/xxx
$ git clone https://github.com/mrgreen3/archbang
$ cd archbang
$ sudo ./build -v
でokでした!
isoは、archbang/out/ 内に生成される。
今日の時点での出来上がりは、
archbang-beta-311215-i686.iso
出来上がりの、アーキテクチャーは、
ビルド環境に依存するようだ。
archbang-031215-i686でビルドした。
7-8分ぐらいかな。
バージョン日付けがくっついててなにより。
でも、ビルドしてみないと、バージョンが確認
できないんでは、困るね。
buildファイルを見たら、
システムの時計が反映されるようになっている。
もはや無断階リリース、みたいなことかな。
数日何も変化しないこともあるだろうに、それでも
バージョンの日付は変わるってことになるね。
github方式。
わかってしまえば、よい勉強になるかも。
応用すれば、”じぶんディストロ”をやれなくもない?
やれるとしても、システムの込み入った内部のことはムリ。
デスクトップの見ばえとか、
日本語入力をインストール済みにしてしまうとか、
までならやれるかも。
でも提供者が信頼できないと、どこかに
アップロードしても誰もダウンロード
してくれないですね。
↓ ↓ ↓ ↓
cd-rに焼いて起動してみた。
ちゃんと起動し、liveで使えたが、
インストーラーは、起動はするが、continueするために
エンターを叩くと、クラッシュし終了。
まあ、やり方のテスト段階であろうし、
上がっているisoに期待するのは、尚早でしょう。
2015年12月31日
2015年12月30日
バイバイchromium-34。archbang
dcp7030_cups-browsed.serviceへ。個人的覚え書き。
メーカーの仕様変更がarchlinuxに通じるまでには
多大な時間がかかる。cupsサーバーにプリンタの情報を
送るコマンドがあるんだけれど、
systemdのcupsd.serviceは、かなり前に
cups-browsed.serviceに変わっている。
修正しないと、下記のようになる。
$ sudo bash /usr/local/Brother/cupswrapper/cupswrapperDCP7030-2.0.2
Failed to restart cupsd.service: Unit cupsd.service failed to load: No such file or directory.
でも、機能的には、問題ないから、
直さなくてもいいんだけど、気持よくない場合は、
修正箇所(スクリプトの3箇所でservice名を変更;
$ cat /usr/local/Brother/cupswrapper/cupswrapperDCP7030-2.0.2
----------------------------------------------
#! /bin/sh
#
# Brother Print filter
# Copyright (C) 2005 Brother. Industries, Ltd.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
if [ "$1" = '-e' ]; then
lpadmin -x DCP7030
rm -f /usr/share/cups/model/DCP7030.ppd
rm -f /usr/lib/cups/filter/brlpdwrapperDCP7030
rm -f /usr/lib64/cups/filter/brlpdwrapperDCP7030
rm -f /usr/local/Brother/cupswrapper/brcupsconfig3
if [ -f /usr/share/ppd/DCP7030.ppd ];then
rm -f /usr/share/ppd/DCP7030.ppd
fi
# restart
systemctl restart cups-browsed
exit 0
fi
if [ "$1" = "-r" ]; then
lpadmin -x DCP7030
# restart
systemctl restart cups-browsed
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/lpd/filterDCP7030" ]; then
:
else
echo "ERROR : Brother LPD filter is not installed."
fi
rm -f /usr/share/cups/model/DCP7030.ppd
ppd_file_name=/usr/share/cups/model/DCP7030.ppd
cat <$ppd_file_name
*PPD-Adobe: "4.3"
*%================================================
*% Copyright(C) 2006 Brother Industries, Ltd.
*% "Brother DCP7030 for CUPS"
*%================================================
*%==== General Information Keywords ========================
*FormatVersion: "4.3"
*FileVersion: "1.00"
*LanguageEncoding: ISOLatin1
*LanguageVersion: English
*Manufacturer: "Brother"
*PCFileName: "DCP7030.PPD"
*Product: "(Brother DCP7030 series)"
*cupsVersion: 1.1
*cupsManualCopies: True
*cupsModelNumber: 68
*cupsFilter: "application/vnd.cups-postscript 0 brlpdwrapperDCP7030"
*PSVersion: "(3010.106) 3"
*ModelName: "DCP7030"
*NickName: "Brother DCP7030 for CUPS"
*ShortNickName: "Brother DCP7030 for CUPS"
*%==== Basic Device Capabilities =============
*LanguageLevel: "3"
*TTRasterizer: Type42
*ColorDevice: False
*DefaultColorSpace: Gray
*FileSystem: True
*?FileSystem:"
save
/devname (%disk0%) def
/ret false def
0 1 7{
devname exch 48 add 5 exch put
devname devstatus {
0 ne {/ret true def}if
pop pop pop pop pop pop pop
}if
}for
ret {(True)}{(False)} ifelse = flush
restore
"
*End
*Throughput: "18"
*FreeVM: "1700000"
*%==== Installable Options ===================
*%==== Media Selection ======================
*OpenUI *PageSize: PickOne
*OrderDependency: 30 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize Letter/Letter: " "
*PageSize Legal/Legal: " "
*PageSize Executive/Executive: " "
*PageSize A4/A4: " "
*PageSize A5/A5: " "
*PageSize A6/A6: " "
*PageSize Env10/Com-10: " "
*PageSize EnvMonarch/Monarch: " "
*PageSize EnvDL/DL: " "
*PageSize EnvC5/C5: " "
*PageSize EnvISOB5/B5: " "
*PageSize EnvISOB6/B6: " "
*CloseUI: *PageSize
*OpenUI *PageRegion: PickOne
*OrderDependency: 40 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion Letter/Letter: " "
*PageRegion Legal/Legal: " "
*PageRegion Executive/Executive: " "
*PageRegion A4/A4: " "
*PageRegion A5/A5: " "
*PageRegion A6/A6: " "
*PageRegion Env10/Com-10: " "
*PageRegion EnvMonarch/Monarch: " "
*PageRegion EnvDL/DL: " "
*PageRegion EnvC5/C5: " "
*PageRegion EnvISOB5/B5: " "
*PageRegion EnvISOB6/B6: " "
*CloseUI: *PageRegion
*DefaultImageableArea: A4
*ImageableArea Letter/Letter: "18 12 594 780"
*ImageableArea Legal/Legal: "18 12 594 996"
*ImageableArea Executive/Executive: "18 12 504 744"
*ImageableArea A4/A4: "18 12 577 830"
*ImageableArea A5/A5: "18 12 403 583"
*ImageableArea A6/A6: "18 12 279 408"
*ImageableArea Env10/Com-10: "18 12 279 672"
*ImageableArea EnvMonarch/Monarch: "18 12 261 528"
*ImageableArea EnvDL/DL: "18 12 294 612"
*ImageableArea EnvC5/C5: "18 12 441 637"
*ImageableArea EnvISOB5/B5: "18 12 463 697"
*ImageableArea EnvISOB6/B6: "18 12 336 487"
*%==== Information About Media Sizes ========
*DefaultPaperDimension: A4
*PaperDimension Letter/Letter: "612 792"
*PaperDimension Legal/Legal: "612 1008"
*PaperDimension Executive/Executive: "522 756"
*PaperDimension A4/A4: "595 842"
*PaperDimension A5/A5: "420 595"
*PaperDimension A6/A6: "297 420"
*PaperDimension Env10/Com-10: "297 684"
*PaperDimension EnvMonarch/Monarch: "279 540"
*PaperDimension EnvDL/DL: "312 624"
*PaperDimension EnvC5/C5: "459 649"
*PaperDimension EnvISOB5/B5: "499 709"
*PaperDimension EnvISOB6/B6: "354 499"
*%==== 5.13 Media Handling Features ============================
*OpenUI *BrMediaType/BrMediaType: PickOne
*OrderDependency: 28 AnySetup *BrMediaType
*DefaultBrMediaType: PLAIN
*BrMediaType PLAIN/Plain Paper: " "
*BrMediaType THIN/Thin Paper: " "
*BrMediaType THICK/Thick Paper: " "
*BrMediaType THICKERPAPER2/Thicker Paper: " "
*BrMediaType BOND/Bond Paper: " "
*BrMediaType TRANSPARENCIES/Transparencies: " "
*BrMediaType ENV/Envelopes: " "
*BrMediaType ENVTHICK/Env. Thick: " "
*BrMediaType ENVTHIN/Env. Thin: " "
*CloseUI: *BrMediaType
*OpenUI *InputSlot/InputSlot: PickOne
*OrderDependency: 29 AnySetup *InputSlot
*DefaultInputSlot: TRAY1
*InputSlot MANUAL/Manual Feed: " "
*InputSlot TRAY1/Tray1: " "
*CloseUI: *InputSlot
*RequiresPageRegion All:True
*%=== Duplex ================================
*%=== Output Bin =============================
*% === Collate ==========
*%==== 5.14 Finishing Features =================================
*%%%%% Resolution and Appearance Control %%%%%
*OpenUI *Resolution: PickOne
*OrderDependency: 11 AnySetup *Resolution
*DefaultResolution: 600dpi
*Resolution 300dpi: " "
*Resolution 600dpi: " "
*Resolution 1200x600dpi/HQ1200dpi: " "
*CloseUI: *Resolution
*OpenUI *TonerSaveMode/Toner Save: PickOne
*DefaultTonerSaveMode: Off
*OrderDependency: 10 AnySetup *TonerSaveMode
*TonerSaveMode Off/Off: "statusdict begin false tonersave end"
*TonerSaveMode On/On: "statusdict begin true tonersave end"
*CloseUI: *TonerSaveMode
*OpenUI *Sleep/Sleep Time [Min.]: PickOne
*DefaultSleep: PrinterDefault
*OrderDependency: 10 AnySetup *Sleep
*Sleep PrinterDefault/Printer Default: ""
*Sleep 2minutes/2: "statusdict begin 2 powersavetime end"
*Sleep 10minutes/10: "statusdict begin 10 powersavetime end"
*Sleep 30minutes/30: "statusdict begin 30 powersavetime end"
*CloseUI: *Sleep
*%==== 5.20 Font Related Keywords ==============================
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
*Font Bookman-Light: Standard "(001.004S)" Standard ROM
*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
*Font Courier: Standard "(002.004S)" Standard ROM
*Font Courier-Bold: Standard "(002.004S)" Standard ROM
*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
*Font Helvetica: Standard "(001.006S)" Standard ROM
*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
*Font Times-Bold: Standard "(001.007S)" Standard ROM
*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
*Font Times-Italic: Standard "(001.007S)" Standard ROM
*Font Times-Roman: Standard "(001.007S)" Standard ROM
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
*Font ZapfDingbats: Special "(001.004S)" Special ROM
*Font Symbol: Special "(001.007S)" Special ROM
*Font Alaska: Standard "(001.005)" Standard ROM
*Font AlaskaExtrabold: Standard "(001.005)" Standard ROM
*Font AntiqueOakland: Standard "(001.005)" Standard ROM
*Font AntiqueOakland-Bold: Standard "(001.005)" Standard ROM
*Font AntiqueOakland-Oblique: Standard "(001.005)" Standard ROM
*Font ClevelandCondensed: Standard "(001.005)" Standard ROM
*Font Connecticut: Standard "(001.005)" Standard ROM
*Font Guatemala-Antique: Standard "(001.005)" Standard ROM
*Font Guatemala-Bold: Standard "(001.005)" Standard ROM
*Font Guatemala-Italic: Standard "(001.005)" Standard ROM
*Font Guatemala-BoldItalic: Standard "(001.005)" Standard ROM
*Font LetterGothic: Standard "(001.005)" Standard ROM
*Font LetterGothic-Bold: Standard "(001.005)" Standard ROM
*Font LetterGothic-Oblique: Standard "(001.005)" Standard ROM
*Font Maryland: Standard "(001.005)" Standard ROM
*Font Oklahoma: Standard "(001.005)" Standard ROM
*Font Oklahoma-Bold: Standard "(001.005)" Standard ROM
*Font Oklahoma-Oblique: Standard "(001.005)" Standard ROM
*Font Oklahoma-BoldOblique: Standard "(001.005)" Standard ROM
*Font Utah: Standard "(001.005)" Standard ROM
*Font Utah-Bold: Standard "(001.005)" Standard ROM
*Font Utah-Oblique: Standard "(001.005)" Standard ROM
*Font Utah-BoldOblique: Standard "(001.005)" Standard ROM
*Font UtahCondensed: Standard "(001.005)" Standard ROM
*Font UtahCondensed-Bold: Standard "(001.005)" Standard ROM
*Font UtahCondensed-Oblique: Standard "(001.004)" Standard ROM
*Font UtahCondensed-BoldOblique: Standard "(001.005)" Standard ROM
*Font BermudaScript: Standard "(001.005)" Standard ROM
*Font Germany: Standard "(001.005)" Standard ROM
*Font SanDiego: Standard "(001.005)" Standard ROM
*Font US-Roman: Standard "(001.005)" Standard ROM
*?FontQuery: "
save
count 1 gt
{exch dup dup
=string cvs (/) print print (:) print
FontDirectory exch known
{pop(Yes)}
{(fonts/)AppendName exch pop mark exch
{}=string filenameforall counttomark
0 gt
{cleartomark(Yes)}
{cleartomark(No)}ifelse
}ifelse
=
}if
(*) = flush
restore
"
*End
*?FontList: "
save
FontDirectory{pop ==}forall
(fonts/*)
{dup length 6 sub 6 exch getinterval cvn ==
}=string filenameforall
(*) = flush
restore
"
*End
ENDOFPPDFILE
chmod 755 $ppd_file_name
if [ -e '/usr/share/ppd' ];then
cp $ppd_file_name /usr/share/ppd
fi
brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperDCP7030
brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperDCP7030
rm -f $brotherlpdwrapper
cat <$brotherlpdwrapper
#! /bin/sh
#
# Brother Print filter >> $brotherlpdwrapper
# Copyright (C) 2005 Brother. Industries, Ltd.
# Ver1.00
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
LOGFILE="/dev/null"
LOGCLEVEL="7"
DEBUG=0
NUPENABLE=1
ENABLECOPY=0
LOG_LATESTONLY=1
errorcode=0
set +o noclobber
if [ "\`echo \$5 | grep 'debug-noprint=1'\`" != '' ]; then
DEBUG=1
fi
if [ "\`echo \$5 | grep 'debug-noprint=2'\`" != '' ]; then
DEBUG=2
fi
if [ "\`echo \$5 | grep 'debug-noprint=3'\`" != '' ]; then
DEBUG=3
fi
if [ \$DEBUG != 0 ]; then
LOGFILE=/tmp/br_cupsfilter_debug_log
fi
PRINTER=DCP7030
if [ "\$PPD" = "" ]; then
PPD="/usr/share/cups/model/DCP7030.ppd"
fi
if [ \$LOGFILE != "/dev/null" ]; then
if [ \$LOG_LATESTONLY == "1" ]; then
rm -f \$LOGFILE
date >\$LOGFILE
else
if [ -e \$LOGFILE ]; then
date >>\$LOGFILE
else
date >\$LOGFILE
fi
fi
echo "arg0 = \$0" >>\$LOGFILE
echo "arg1 = \$1" >>\$LOGFILE
echo "arg2 = \$2" >>\$LOGFILE
echo "arg3 = \$3" >>\$LOGFILE
echo "arg4 = \$4" >>\$LOGFILE
echo "arg5 = \$5" >>\$LOGFILE
echo "arg6 = \$6" >>\$LOGFILE
echo "PPD = \$PPD" >>\$LOGFILE
fi
INPUT_TEMP_PS=\`mktemp /tmp/br_input_ps.XXXXXX\`
nup="cat"
if [ "\`echo \$5 | grep 'Nup='\`" != '' ] && [ \$NUPENABLE != 0 ]; then
if [ "\`echo \$5 | grep 'Nup=64'\`" != '' ]; then
nup="psnup -64"
elif [ "\`echo \$5 | grep 'Nup=32'\`" != '' ]; then
nup="psnup -32"
elif [ "\`echo \$5 | grep 'Nup=25'\`" != '' ]; then
nup="psnup -25"
elif [ "\`echo \$5 | grep 'Nup=16'\`" != '' ]; then
nup="psnup -16"
elif [ "\`echo \$5 | grep 'Nup=8'\`" != '' ]; then
nup="psnup -8"
elif [ "\`echo \$5 | grep 'Nup=6'\`" != '' ]; then
nup="psnup -6"
elif [ "\`echo \$5 | grep 'Nup=4'\`" != '' ]; then
nup="psnup -4"
elif [ "\`echo \$5 | grep 'Nup=2'\`" != '' ]; then
nup="psnup -2"
elif [ "\`echo \$5 | grep 'Nup=1'\`" != '' ]; then
nup="cat"
fi
echo "NUP=\$nup" >>\$LOGFILE
if [ -e /usr/bin/psnup ]; then
if [ \$# -ge 7 ]; then
cat \$6 | \$nup > \$INPUT_TEMP_PS
else
cat | \$nup > \$INPUT_TEMP_PS
fi
else
if [ \$# -ge 7 ]; then
cp \$6 \$INPUT_TEMP_PS
else
cat > \$INPUT_TEMP_PS
fi
fi
else
if [ \$# -ge 7 ]; then
cp \$6 \$INPUT_TEMP_PS
else
cat > \$INPUT_TEMP_PS
fi
fi
if [ "\$ENABLECOPY" != 0 ];then
if [ "\$4" -ge 2 ];then
options="\$5"" ""Copies=\$4"
else
options="\$5"
fi
else
options="\$5"
fi
if [ -e "/usr/local/Brother/lpd/filter\$PRINTER" ]; then
:
else
echo "ERROR: /usr/local/Brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
errorcode=30
exit $errorcode
fi
if [ -e "/usr/local/Brother/cupswrapper/brcupsconfig3" ]; then
if [ \$DEBUG = 0 ]; then
/usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
else
/usr/local/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
fi
if [ \$DEBUG -ge 2 ]; then
if [ \$LOGFILE != "/dev/null" ]; then
echo "" >>\$LOGFILE
echo " ------PostScript Data-------" >>\$LOGFILE
cat \$INPUT_TEMP_PS >>\$LOGFILE
fi
fi
rm -f \$INPUT_TEMP_PS
exit \$errorcode
!ENDOFWFILTER!
chmod 755 $brotherlpdwrapper
if [ -e /usr/lib64/cups/filter ]; then
cp $brotherlpdwrapper $brotherlpdwrapper64
fi
chmod a+w /usr/local/Brother/inf/brDCP7030rc
chmod a+w /usr/local/Brother/inf
# restart
systemctl restart cups-browsed
sleep 2s
port2=`lpinfo -v | grep -i 'usb://Brother/DCP-7030' | 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 DCP7030 -E -v $port -P /usr/share/cups/model/DCP7030.ppd
exit 0
----------------------------------------------
多大な時間がかかる。cupsサーバーにプリンタの情報を
送るコマンドがあるんだけれど、
systemdのcupsd.serviceは、かなり前に
cups-browsed.serviceに変わっている。
修正しないと、下記のようになる。
$ sudo bash /usr/local/Brother/cupswrapper/cupswrapperDCP7030-2.0.2
Failed to restart cupsd.service: Unit cupsd.service failed to load: No such file or directory.
でも、機能的には、問題ないから、
直さなくてもいいんだけど、気持よくない場合は、
修正箇所(スクリプトの3箇所でservice名を変更;
$ cat /usr/local/Brother/cupswrapper/cupswrapperDCP7030-2.0.2
----------------------------------------------
#! /bin/sh
#
# Brother Print filter
# Copyright (C) 2005 Brother. Industries, Ltd.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
if [ "$1" = '-e' ]; then
lpadmin -x DCP7030
rm -f /usr/share/cups/model/DCP7030.ppd
rm -f /usr/lib/cups/filter/brlpdwrapperDCP7030
rm -f /usr/lib64/cups/filter/brlpdwrapperDCP7030
rm -f /usr/local/Brother/cupswrapper/brcupsconfig3
if [ -f /usr/share/ppd/DCP7030.ppd ];then
rm -f /usr/share/ppd/DCP7030.ppd
fi
# restart
systemctl restart cups-browsed
exit 0
fi
if [ "$1" = "-r" ]; then
lpadmin -x DCP7030
# restart
systemctl restart cups-browsed
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/lpd/filterDCP7030" ]; then
:
else
echo "ERROR : Brother LPD filter is not installed."
fi
rm -f /usr/share/cups/model/DCP7030.ppd
ppd_file_name=/usr/share/cups/model/DCP7030.ppd
cat <
*PPD-Adobe: "4.3"
*%================================================
*% Copyright(C) 2006 Brother Industries, Ltd.
*% "Brother DCP7030 for CUPS"
*%================================================
*%==== General Information Keywords ========================
*FormatVersion: "4.3"
*FileVersion: "1.00"
*LanguageEncoding: ISOLatin1
*LanguageVersion: English
*Manufacturer: "Brother"
*PCFileName: "DCP7030.PPD"
*Product: "(Brother DCP7030 series)"
*cupsVersion: 1.1
*cupsManualCopies: True
*cupsModelNumber: 68
*cupsFilter: "application/vnd.cups-postscript 0 brlpdwrapperDCP7030"
*PSVersion: "(3010.106) 3"
*ModelName: "DCP7030"
*NickName: "Brother DCP7030 for CUPS"
*ShortNickName: "Brother DCP7030 for CUPS"
*%==== Basic Device Capabilities =============
*LanguageLevel: "3"
*TTRasterizer: Type42
*ColorDevice: False
*DefaultColorSpace: Gray
*FileSystem: True
*?FileSystem:"
save
/devname (%disk0%) def
/ret false def
0 1 7{
devname exch 48 add 5 exch put
devname devstatus {
0 ne {/ret true def}if
pop pop pop pop pop pop pop
}if
}for
ret {(True)}{(False)} ifelse = flush
restore
"
*End
*Throughput: "18"
*FreeVM: "1700000"
*%==== Installable Options ===================
*%==== Media Selection ======================
*OpenUI *PageSize: PickOne
*OrderDependency: 30 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize Letter/Letter: " "
*PageSize Legal/Legal: " "
*PageSize Executive/Executive: " "
*PageSize A4/A4: " "
*PageSize A5/A5: " "
*PageSize A6/A6: " "
*PageSize Env10/Com-10: " "
*PageSize EnvMonarch/Monarch: " "
*PageSize EnvDL/DL: " "
*PageSize EnvC5/C5: " "
*PageSize EnvISOB5/B5: " "
*PageSize EnvISOB6/B6: " "
*CloseUI: *PageSize
*OpenUI *PageRegion: PickOne
*OrderDependency: 40 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion Letter/Letter: " "
*PageRegion Legal/Legal: " "
*PageRegion Executive/Executive: " "
*PageRegion A4/A4: " "
*PageRegion A5/A5: " "
*PageRegion A6/A6: " "
*PageRegion Env10/Com-10: " "
*PageRegion EnvMonarch/Monarch: " "
*PageRegion EnvDL/DL: " "
*PageRegion EnvC5/C5: " "
*PageRegion EnvISOB5/B5: " "
*PageRegion EnvISOB6/B6: " "
*CloseUI: *PageRegion
*DefaultImageableArea: A4
*ImageableArea Letter/Letter: "18 12 594 780"
*ImageableArea Legal/Legal: "18 12 594 996"
*ImageableArea Executive/Executive: "18 12 504 744"
*ImageableArea A4/A4: "18 12 577 830"
*ImageableArea A5/A5: "18 12 403 583"
*ImageableArea A6/A6: "18 12 279 408"
*ImageableArea Env10/Com-10: "18 12 279 672"
*ImageableArea EnvMonarch/Monarch: "18 12 261 528"
*ImageableArea EnvDL/DL: "18 12 294 612"
*ImageableArea EnvC5/C5: "18 12 441 637"
*ImageableArea EnvISOB5/B5: "18 12 463 697"
*ImageableArea EnvISOB6/B6: "18 12 336 487"
*%==== Information About Media Sizes ========
*DefaultPaperDimension: A4
*PaperDimension Letter/Letter: "612 792"
*PaperDimension Legal/Legal: "612 1008"
*PaperDimension Executive/Executive: "522 756"
*PaperDimension A4/A4: "595 842"
*PaperDimension A5/A5: "420 595"
*PaperDimension A6/A6: "297 420"
*PaperDimension Env10/Com-10: "297 684"
*PaperDimension EnvMonarch/Monarch: "279 540"
*PaperDimension EnvDL/DL: "312 624"
*PaperDimension EnvC5/C5: "459 649"
*PaperDimension EnvISOB5/B5: "499 709"
*PaperDimension EnvISOB6/B6: "354 499"
*%==== 5.13 Media Handling Features ============================
*OpenUI *BrMediaType/BrMediaType: PickOne
*OrderDependency: 28 AnySetup *BrMediaType
*DefaultBrMediaType: PLAIN
*BrMediaType PLAIN/Plain Paper: " "
*BrMediaType THIN/Thin Paper: " "
*BrMediaType THICK/Thick Paper: " "
*BrMediaType THICKERPAPER2/Thicker Paper: " "
*BrMediaType BOND/Bond Paper: " "
*BrMediaType TRANSPARENCIES/Transparencies: " "
*BrMediaType ENV/Envelopes: " "
*BrMediaType ENVTHICK/Env. Thick: " "
*BrMediaType ENVTHIN/Env. Thin: " "
*CloseUI: *BrMediaType
*OpenUI *InputSlot/InputSlot: PickOne
*OrderDependency: 29 AnySetup *InputSlot
*DefaultInputSlot: TRAY1
*InputSlot MANUAL/Manual Feed: " "
*InputSlot TRAY1/Tray1: " "
*CloseUI: *InputSlot
*RequiresPageRegion All:True
*%=== Duplex ================================
*%=== Output Bin =============================
*% === Collate ==========
*%==== 5.14 Finishing Features =================================
*%%%%% Resolution and Appearance Control %%%%%
*OpenUI *Resolution: PickOne
*OrderDependency: 11 AnySetup *Resolution
*DefaultResolution: 600dpi
*Resolution 300dpi: " "
*Resolution 600dpi: " "
*Resolution 1200x600dpi/HQ1200dpi: " "
*CloseUI: *Resolution
*OpenUI *TonerSaveMode/Toner Save: PickOne
*DefaultTonerSaveMode: Off
*OrderDependency: 10 AnySetup *TonerSaveMode
*TonerSaveMode Off/Off: "statusdict begin false tonersave end"
*TonerSaveMode On/On: "statusdict begin true tonersave end"
*CloseUI: *TonerSaveMode
*OpenUI *Sleep/Sleep Time [Min.]: PickOne
*DefaultSleep: PrinterDefault
*OrderDependency: 10 AnySetup *Sleep
*Sleep PrinterDefault/Printer Default: ""
*Sleep 2minutes/2: "statusdict begin 2 powersavetime end"
*Sleep 10minutes/10: "statusdict begin 10 powersavetime end"
*Sleep 30minutes/30: "statusdict begin 30 powersavetime end"
*CloseUI: *Sleep
*%==== 5.20 Font Related Keywords ==============================
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
*Font Bookman-Light: Standard "(001.004S)" Standard ROM
*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
*Font Courier: Standard "(002.004S)" Standard ROM
*Font Courier-Bold: Standard "(002.004S)" Standard ROM
*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
*Font Helvetica: Standard "(001.006S)" Standard ROM
*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
*Font Times-Bold: Standard "(001.007S)" Standard ROM
*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
*Font Times-Italic: Standard "(001.007S)" Standard ROM
*Font Times-Roman: Standard "(001.007S)" Standard ROM
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
*Font ZapfDingbats: Special "(001.004S)" Special ROM
*Font Symbol: Special "(001.007S)" Special ROM
*Font Alaska: Standard "(001.005)" Standard ROM
*Font AlaskaExtrabold: Standard "(001.005)" Standard ROM
*Font AntiqueOakland: Standard "(001.005)" Standard ROM
*Font AntiqueOakland-Bold: Standard "(001.005)" Standard ROM
*Font AntiqueOakland-Oblique: Standard "(001.005)" Standard ROM
*Font ClevelandCondensed: Standard "(001.005)" Standard ROM
*Font Connecticut: Standard "(001.005)" Standard ROM
*Font Guatemala-Antique: Standard "(001.005)" Standard ROM
*Font Guatemala-Bold: Standard "(001.005)" Standard ROM
*Font Guatemala-Italic: Standard "(001.005)" Standard ROM
*Font Guatemala-BoldItalic: Standard "(001.005)" Standard ROM
*Font LetterGothic: Standard "(001.005)" Standard ROM
*Font LetterGothic-Bold: Standard "(001.005)" Standard ROM
*Font LetterGothic-Oblique: Standard "(001.005)" Standard ROM
*Font Maryland: Standard "(001.005)" Standard ROM
*Font Oklahoma: Standard "(001.005)" Standard ROM
*Font Oklahoma-Bold: Standard "(001.005)" Standard ROM
*Font Oklahoma-Oblique: Standard "(001.005)" Standard ROM
*Font Oklahoma-BoldOblique: Standard "(001.005)" Standard ROM
*Font Utah: Standard "(001.005)" Standard ROM
*Font Utah-Bold: Standard "(001.005)" Standard ROM
*Font Utah-Oblique: Standard "(001.005)" Standard ROM
*Font Utah-BoldOblique: Standard "(001.005)" Standard ROM
*Font UtahCondensed: Standard "(001.005)" Standard ROM
*Font UtahCondensed-Bold: Standard "(001.005)" Standard ROM
*Font UtahCondensed-Oblique: Standard "(001.004)" Standard ROM
*Font UtahCondensed-BoldOblique: Standard "(001.005)" Standard ROM
*Font BermudaScript: Standard "(001.005)" Standard ROM
*Font Germany: Standard "(001.005)" Standard ROM
*Font SanDiego: Standard "(001.005)" Standard ROM
*Font US-Roman: Standard "(001.005)" Standard ROM
*?FontQuery: "
save
count 1 gt
{exch dup dup
=string cvs (/) print print (:) print
FontDirectory exch known
{pop(Yes)}
{(fonts/)AppendName exch pop mark exch
{}=string filenameforall counttomark
0 gt
{cleartomark(Yes)}
{cleartomark(No)}ifelse
}ifelse
=
}if
(*) = flush
restore
"
*End
*?FontList: "
save
FontDirectory{pop ==}forall
(fonts/*)
{dup length 6 sub 6 exch getinterval cvn ==
}=string filenameforall
(*) = flush
restore
"
*End
ENDOFPPDFILE
chmod 755 $ppd_file_name
if [ -e '/usr/share/ppd' ];then
cp $ppd_file_name /usr/share/ppd
fi
brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperDCP7030
brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperDCP7030
rm -f $brotherlpdwrapper
cat <$brotherlpdwrapper
#! /bin/sh
#
# Brother Print filter >> $brotherlpdwrapper
# Copyright (C) 2005 Brother. Industries, Ltd.
# Ver1.00
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
LOGFILE="/dev/null"
LOGCLEVEL="7"
DEBUG=0
NUPENABLE=1
ENABLECOPY=0
LOG_LATESTONLY=1
errorcode=0
set +o noclobber
if [ "\`echo \$5 | grep 'debug-noprint=1'\`" != '' ]; then
DEBUG=1
fi
if [ "\`echo \$5 | grep 'debug-noprint=2'\`" != '' ]; then
DEBUG=2
fi
if [ "\`echo \$5 | grep 'debug-noprint=3'\`" != '' ]; then
DEBUG=3
fi
if [ \$DEBUG != 0 ]; then
LOGFILE=/tmp/br_cupsfilter_debug_log
fi
PRINTER=DCP7030
if [ "\$PPD" = "" ]; then
PPD="/usr/share/cups/model/DCP7030.ppd"
fi
if [ \$LOGFILE != "/dev/null" ]; then
if [ \$LOG_LATESTONLY == "1" ]; then
rm -f \$LOGFILE
date >\$LOGFILE
else
if [ -e \$LOGFILE ]; then
date >>\$LOGFILE
else
date >\$LOGFILE
fi
fi
echo "arg0 = \$0" >>\$LOGFILE
echo "arg1 = \$1" >>\$LOGFILE
echo "arg2 = \$2" >>\$LOGFILE
echo "arg3 = \$3" >>\$LOGFILE
echo "arg4 = \$4" >>\$LOGFILE
echo "arg5 = \$5" >>\$LOGFILE
echo "arg6 = \$6" >>\$LOGFILE
echo "PPD = \$PPD" >>\$LOGFILE
fi
INPUT_TEMP_PS=\`mktemp /tmp/br_input_ps.XXXXXX\`
nup="cat"
if [ "\`echo \$5 | grep 'Nup='\`" != '' ] && [ \$NUPENABLE != 0 ]; then
if [ "\`echo \$5 | grep 'Nup=64'\`" != '' ]; then
nup="psnup -64"
elif [ "\`echo \$5 | grep 'Nup=32'\`" != '' ]; then
nup="psnup -32"
elif [ "\`echo \$5 | grep 'Nup=25'\`" != '' ]; then
nup="psnup -25"
elif [ "\`echo \$5 | grep 'Nup=16'\`" != '' ]; then
nup="psnup -16"
elif [ "\`echo \$5 | grep 'Nup=8'\`" != '' ]; then
nup="psnup -8"
elif [ "\`echo \$5 | grep 'Nup=6'\`" != '' ]; then
nup="psnup -6"
elif [ "\`echo \$5 | grep 'Nup=4'\`" != '' ]; then
nup="psnup -4"
elif [ "\`echo \$5 | grep 'Nup=2'\`" != '' ]; then
nup="psnup -2"
elif [ "\`echo \$5 | grep 'Nup=1'\`" != '' ]; then
nup="cat"
fi
echo "NUP=\$nup" >>\$LOGFILE
if [ -e /usr/bin/psnup ]; then
if [ \$# -ge 7 ]; then
cat \$6 | \$nup > \$INPUT_TEMP_PS
else
cat | \$nup > \$INPUT_TEMP_PS
fi
else
if [ \$# -ge 7 ]; then
cp \$6 \$INPUT_TEMP_PS
else
cat > \$INPUT_TEMP_PS
fi
fi
else
if [ \$# -ge 7 ]; then
cp \$6 \$INPUT_TEMP_PS
else
cat > \$INPUT_TEMP_PS
fi
fi
if [ "\$ENABLECOPY" != 0 ];then
if [ "\$4" -ge 2 ];then
options="\$5"" ""Copies=\$4"
else
options="\$5"
fi
else
options="\$5"
fi
if [ -e "/usr/local/Brother/lpd/filter\$PRINTER" ]; then
:
else
echo "ERROR: /usr/local/Brother/lpd/filter\$PRINTER does not exist" >>\$LOGFILE
errorcode=30
exit $errorcode
fi
if [ -e "/usr/local/Brother/cupswrapper/brcupsconfig3" ]; then
if [ \$DEBUG = 0 ]; then
/usr/local/Brother/cupswrapper/brcupsconfig3 \$PRINTER \$PPD 0 "\$options" >> /dev/null
else
/usr/local/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
fi
if [ \$DEBUG -ge 2 ]; then
if [ \$LOGFILE != "/dev/null" ]; then
echo "" >>\$LOGFILE
echo " ------PostScript Data-------" >>\$LOGFILE
cat \$INPUT_TEMP_PS >>\$LOGFILE
fi
fi
rm -f \$INPUT_TEMP_PS
exit \$errorcode
!ENDOFWFILTER!
chmod 755 $brotherlpdwrapper
if [ -e /usr/lib64/cups/filter ]; then
cp $brotherlpdwrapper $brotherlpdwrapper64
fi
chmod a+w /usr/local/Brother/inf/brDCP7030rc
chmod a+w /usr/local/Brother/inf
# restart
systemctl restart cups-browsed
sleep 2s
port2=`lpinfo -v | grep -i 'usb://Brother/DCP-7030' | 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 DCP7030 -E -v $port -P /usr/share/cups/model/DCP7030.ppd
exit 0
----------------------------------------------