From d522955ba778a1052ef8e9b6219a0745f982e6ef Mon Sep 17 00:00:00 2001 From: milisbir Date: Tue, 26 Sep 2017 18:23:13 +0300 Subject: [PATCH] brother-mfc-l2700dw.paketlendi --- talimatname/genel/brother-mfc-l2700dw/talimat | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 talimatname/genel/brother-mfc-l2700dw/talimat diff --git a/talimatname/genel/brother-mfc-l2700dw/talimat b/talimatname/genel/brother-mfc-l2700dw/talimat new file mode 100644 index 000000000..e90ac2759 --- /dev/null +++ b/talimatname/genel/brother-mfc-l2700dw/talimat @@ -0,0 +1,38 @@ +# Description: Brother MFC-L2700DW için LPR ve CUPS sürücüsü +# URL: http://support.brother.com/g/b/countrytop.aspx?c=tr&lang=tr +# Packager: Cihan Alkan +# Depends on: cups + +name=brother-mfc-l2700dw +version=3.2.0 +release=1 +source=(http://download.brother.com/welcome/dlf101789/mfcl2700dwlpr-$version-1.i386.rpm + http://download.brother.com/welcome/dlf101790/mfcl2700dwcupswrapper-$version-1.i386.rpm) + +build() { +# '/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" +}