milis/talimatname/genel/b/brother-mfc-l2700dw/talimat

38 lines
1.4 KiB
Plaintext
Raw Normal View History

2017-10-27 20:46:27 +02:00
# Tanım: Brother MFC-L2700DW için LPR ve CUPS sürücüsü
2017-09-26 17:23:13 +02:00
# URL: http://support.brother.com/g/b/countrytop.aspx?c=tr&lang=tr
2017-12-22 23:19:06 +01:00
# Paketçi: CihanAlkan
2017-10-27 20:46:27 +02:00
# Gerekler: cups
2018-07-20 09:44:31 +02:00
# Grup: sürücü
2017-09-26 17:23:13 +02:00
2017-10-28 14:10:23 +02:00
isim=brother-mfc-l2700dw
surum=3.2.0
devir=1
kaynak=(http://download.brother.com/welcome/dlf101789/mfcl2700dwlpr-$surum-1.i386.rpm
2017-12-22 23:19:06 +01:00
http://download.brother.com/welcome/dlf101790/mfcl2700dwcupswrapper-$surum-1.i386.rpm)
2017-09-26 17:23:13 +02:00
2017-10-27 23:59:41 +02:00
derle() {
2017-09-26 17:23:13 +02:00
# '/usr/local' klasörüne kurma
if [ -d $SRC/usr/local/Brother ]; then
install -dm755 "$SRC/usr/share"
mv "$SRC/usr/local/Brother/" "$SRC/usr/share/brother"
rm -rf "$SRC/usr/local"
sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' ./`
fi
# setup cups-directories
install -dm755 "$SRC/usr/share/cups/model"
install -dm755 "$SRC/usr/lib/cups/filter"
# copy ppd and filter file to their destination dirs
cd `find . -type d -name 'cupswrapper'`
cp *lpdwrapper* "$SRC/usr/lib/cups/filter/"
cp *.ppd "$SRC/usr/share/cups/model/"
cd "$SRC"
# get absolute printer path
_baseDir="\"/$(find opt -maxdepth 3 -depth -print -quit -type d)\""
# replace the dynamic basedir var with the absolute path
sed -i "s|\`readlink\ \$0\`|$_baseDir|" $SRC/usr/lib/cups/filter/*lpdwrapper*
# /etc/printcap is managed by cups
rm "$(find $SRC -type f -name 'setupPrintcap*')"
cp -R "$SRC/usr" "$PKG"
cp -R "$SRC/opt" "$PKG"
}