summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphaël Doursenaud2015-07-05 17:57:58 +0200
committerRaphaël Doursenaud2015-07-05 17:57:58 +0200
commit5c27070e5e13844b108c7cd622f00a7899c2edf1 (patch)
treef0620571bf5faa758e4c411cdc2f657ac0e1ef71
downloadaur-5c27070e5e13844b108c7cd622f00a7899c2edf1.tar.gz
Initial import
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD48
-rwxr-xr-xbrlpdwrapperdcp9055cdn139
3 files changed, 209 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..7710fd2f4af6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = brother-dcp9055cdn
+ pkgdesc = Brother CUPS and LPD driver for DCP-9055CDN
+ pkgver = 1.1.1
+ pkgrel = 6
+ url = http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#DCP-9055CDN
+ arch = i686
+ arch = x86_64
+ license = custom:Brother
+ license = GPL
+ depends = lib32-glibc
+ depends = psutils
+ depends = ghostscript
+ depends = cups
+ source = http://www.brother.com/pub/bsc/linux/dlf/dcp9055cdnlpr-1.1.1-5.i386.deb
+ source = http://www.brother.com/pub/bsc/linux/dlf/dcp9055cdncupswrapper-1.1.1-5.i386.deb
+ source = brlpdwrapperdcp9055cdn
+ md5sums = f9ffc1a38fcc64e1d7f82d13652a1f57
+ md5sums = b08a49bee644dac18229c2843c5349b2
+ md5sums = 2d368a9cbaeffbc7c9e24bcafe45b71e
+
+pkgname = brother-dcp9055cdn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0f47ade2dff7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Raphaël Doursenaud <rdoursenaud@free.fr>
+
+pkgname=brother-dcp9055cdn
+pkgver=1.1.1
+pkgrel=6
+_pkgrel=5
+pkgdesc="Brother CUPS and LPD driver for DCP-9055CDN"
+arch=('i686' 'x86_64')
+url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#DCP-9055CDN"
+license=('custom:Brother' 'GPL')
+
+if [ "$(uname -m)" = "x86_64" ]; then
+ depends=('lib32-glibc' 'psutils' 'ghostscript' 'cups')
+else
+ depends=('psutils' 'ghostscript' 'cups')
+fi
+
+source=(http://www.brother.com/pub/bsc/linux/dlf/dcp9055cdnlpr-$pkgver-$_pkgrel.i386.deb
+ http://www.brother.com/pub/bsc/linux/dlf/dcp9055cdncupswrapper-$pkgver-$_pkgrel.i386.deb
+ brlpdwrapperdcp9055cdn)
+
+md5sums=('f9ffc1a38fcc64e1d7f82d13652a1f57'
+ 'b08a49bee644dac18229c2843c5349b2'
+ '2d368a9cbaeffbc7c9e24bcafe45b71e')
+
+prepare()
+{
+ mkdir -p $srcdir/unpack || return 1
+ for i in $srcdir/*.deb
+ do
+ cd $srcdir/unpack
+ ar -x $i || return 1
+ cd $srcdir
+ bsdtar -pxf $srcdir/unpack/data.tar.gz || return 1
+ done
+}
+
+package()
+{
+ # Mimic deb install
+ cp -a $srcdir/usr $pkgdir/ || return 1
+ # Install PPD to the standard path so that cups can find it
+ install -d -m755 $pkgdir/usr/share/cups/model || return 1
+ install -D -m644 $srcdir/usr/local/Brother/Printer/dcp9055cdn/cupswrapper/dcp9055cdn.ppd $pkgdir/usr/share/cups/model || return 1
+ # Install tuned cups filter
+ install -d -m755 $pkgdir/usr/lib/cups/filter || return 1
+ install -D -m755 $srcdir/brlpdwrapperdcp9055cdn $pkgdir/usr/lib/cups/filter || return 1
+}
diff --git a/brlpdwrapperdcp9055cdn b/brlpdwrapperdcp9055cdn
new file mode 100755
index 000000000000..6a6d659cca1c
--- /dev/null
+++ b/brlpdwrapperdcp9055cdn
@@ -0,0 +1,139 @@
+#! /bin/sh
+#
+# Brother Print filter >>
+# Copyright (C) 2005 Brother. Industries, Ltd.
+# Ver1.10
+
+# 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"
+LOGLEVEL="1"
+LOGCLEVEL="7"
+DEBUG=0
+NUPENABLE=1
+LOG_LATESTONLY=1
+errorcode=0
+
+if [ $DEBUG != 0 ]; then
+ LOGFILE=/tmp/br_cupsfilter_debug_log
+fi
+
+PPDC=`printenv | grep "PPD="`
+PPDC=`echo $PPDC | sed -e 's/PPD=//'`
+
+if [ "$PPDC" = "" ]; then
+ PPDC="/usr/share/cups/model/dcp9055cdn.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 [ -e "/usr/local/Brother/Printer/dcp9055cdn/lpd/filterdcp9055cdn" ]; then
+ :
+else
+ echo "ERROR: /usr/local/Brother/Printer/dcp9055cdn/lpd/filterdcp9055cdn does not exist" >>$LOGFILE
+ errorcode=30
+ exit
+fi
+
+CUPSOPTION=`echo "$5 Copies=$4" | sed -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/cupswrapper/brcupsconfpt1" ]; then
+ if [ $DEBUG = 0 ]; then
+ /usr/local/Brother/cupswrapper/brcupsconfpt1 ${printer_name} $PPDC 0 "$CUPSOPTION" "dcp9055cdn">> /dev/null
+ else
+ /usr/local/Brother/cupswrapper/brcupsconfpt1 ${printer_name} $PPDC $LOGCLEVEL "$CUPSOPTION" "dcp9055cdn">>$LOGFILE
+ fi
+fi
+
+if [ $DEBUG -lt 10 ]; then
+ cat $INPUT_TEMP_PS | /usr/local/Brother/Printer/dcp9055cdn/lpd/filterdcp9055cdn "$$" "CUPS" "USB"
+
+ if [ $LOGLEVEL -gt 2 ]; then
+ if [ $LOGFILE != "/dev/null" ]; then
+ echo "" >>$LOGFILE
+ echo " ------PostScript Data-------" >>$LOGFILE
+ cat $INPUT_TEMP_PS >>$LOGFILE
+ fi
+ fi
+fi
+rm -f $INPUT_TEMP_PS
+
+exit $errorcode
+