summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Mattern2015-08-04 15:18:45 +0200
committerPeter Mattern2015-08-04 15:18:45 +0200
commit84e14a0238a5bc706e12b2f369072e83e35a7f49 (patch)
tree8e4afc0af627057f98c43374c27c560f165190f5
downloadaur-brother-mfc-210c.tar.gz
initial commit
-rw-r--r--.SRCINFO29
-rw-r--r--PKGBUILD59
-rw-r--r--adjust-cupswrapperMFC210C-1.0.0-to-arch.patch52
-rw-r--r--adjust-setupPrintcapij-to-arch.patch42
-rw-r--r--brother-eula.txt7
-rw-r--r--brother-mfc-210c.install20
6 files changed, 209 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..0247d532dee
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,29 @@
+pkgbase = brother-mfc-210c
+ pkgdesc = LPR driver and CUPS wrapper for Brother MFC-210C. Covers MFC-215C as well.
+ pkgver = 1.0.2
+ pkgrel = 1
+ url = http://support.brother.com
+ install = brother-mfc-210c.install
+ arch = i686
+ arch = x86_64
+ license = custom:Brother
+ license = GPL
+ makedepends = tcsh
+ optdepends = cups: use CUPS printing system
+ optdepends = tcsh: needed to use CUPS wrapper
+ optdepends = lprng: use LPRng
+ conflicts = brother-lpr-drivers-common
+ conflicts = brother-lpr-drivers-extra
+ conflicts = brother-cups-wrapper-common
+ conflicts = brother-cups-wrapper-extra
+ source = http://download.brother.com/welcome/dlf006047/MFC210Clpr-1.0.2-1.i386.rpm
+ source = http://download.brother.com/welcome/dlf006049/cupswrapperMFC210C-1.0.0-1.i386.rpm
+ source = adjust-setupPrintcapij-to-arch.patch
+ source = adjust-cupswrapperMFC210C-1.0.0-to-arch.patch
+ sha256sums = 239561ee34d004edb48edcd9b80e5e2b813ae5db6675cefcb856c754ed58f571
+ sha256sums = 2c28381ea27e1083b17f46bacb68131411b40cb224415bba6ad358ca6376f80c
+ sha256sums = 6f2da3e52d5a8e4b72ef4a9a2fe821933573425a2cb20753c8be1849d55d84c7
+ sha256sums = d40d9ad28b0f4600fd9cfeb3ee966c92c613acd57651b100d067be93219e3638
+
+pkgname = brother-mfc-210c
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..13f2dceb795
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Peter Mattern <pmattern at arcor dot de>
+# Contributor: libernux <dutchman55 at gmx dot com>
+
+pkgname=brother-mfc-210c
+pkgver=1.0.2
+pkgrel=1
+pkgdesc="LPR driver and CUPS wrapper for Brother MFC-210C. Covers MFC-215C as well."
+arch=("i686" "x86_64")
+url="http://support.brother.com"
+license=("custom:Brother" "GPL")
+ if test "$CARCH" == x86_64; then
+ depends+=('lib32-glibc')
+ fi
+makedepends=("tcsh")
+optdepends=("cups: use CUPS printing system"
+ "tcsh: needed to use CUPS wrapper"
+ "lprng: use LPRng"
+ )
+conflicts=("brother-lpr-drivers-common"
+ "brother-lpr-drivers-extra"
+ "brother-cups-wrapper-common"
+ "brother-cups-wrapper-extra"
+ )
+install=brother-mfc-210c.install
+source=("http://download.brother.com/welcome/dlf006047/MFC210Clpr-1.0.2-1.i386.rpm"
+ "http://download.brother.com/welcome/dlf006049/cupswrapperMFC210C-1.0.0-1.i386.rpm"
+ "adjust-setupPrintcapij-to-arch.patch"
+ "adjust-cupswrapperMFC210C-1.0.0-to-arch.patch"
+ )
+sha256sums=("239561ee34d004edb48edcd9b80e5e2b813ae5db6675cefcb856c754ed58f571"
+ "2c28381ea27e1083b17f46bacb68131411b40cb224415bba6ad358ca6376f80c"
+ "6f2da3e52d5a8e4b72ef4a9a2fe821933573425a2cb20753c8be1849d55d84c7"
+ "d40d9ad28b0f4600fd9cfeb3ee966c92c613acd57651b100d067be93219e3638"
+ )
+
+prepare() {
+
+ patch -p1 < $srcdir/adjust-setupPrintcapij-to-arch.patch
+ patch -p1 < $srcdir/adjust-cupswrapperMFC210C-1.0.0-to-arch.patch
+
+ # use /usr/share/brother instead of /usr/local/Brother
+ mkdir -p usr/share/cups/model
+ mv usr/local/Brother usr/share/brother
+ rmdir usr/local
+ sed -i "s:/usr/local/Brother:/usr/share/brother:g" $(grep -rl "usr/local/Brother" .)
+
+ # replace '/usr' by '$srcdir/usr' while running cupswrapperMFC210C-1.0.0
+ sed -i "s:/usr:$srcdir/usr:g" $(grep -rl "usr" .)
+ # run cupswrapperMFC210C-1.0.0 doing the actual work
+ ./usr/share/brother/cupswrapper/cupswrapperMFC210C-1.0.0
+ # revert path changes to get well-behaved FHS citizens again
+ sed -i "s:$srcdir/usr:/usr:g" $(grep -rl "$srcdir/usr" .)
+}
+
+package() {
+ cp -a usr $pkgdir
+ install -D -m644 $startdir/brother-eula.txt \
+ $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/adjust-cupswrapperMFC210C-1.0.0-to-arch.patch b/adjust-cupswrapperMFC210C-1.0.0-to-arch.patch
new file mode 100644
index 00000000000..7375adb74cf
--- /dev/null
+++ b/adjust-cupswrapperMFC210C-1.0.0-to-arch.patch
@@ -0,0 +1,52 @@
+--- orig/usr/local/Brother/cupswrapper/cupswrapperMFC210C-1.0.0 2005-02-02 06:05:50.000000000 +0100
++++ modif/usr/local/Brother/cupswrapper/cupswrapperMFC210C-1.0.0 2015-08-04 00:54:44.191866647 +0200
+@@ -37,10 +37,10 @@
+ echo ' -r : remove printer'
+ exit(0)
+ endif
+-mkdir -p /usr/local/Brother/filter
++mkdir -p /usr/share/brother/filter
+ mkdir -p /usr/lib/cups/filter
+
+-if(!(-e "/usr/local/Brother/lpd/filterMFC210C"))then
++if(!(-e "/usr/share/brother/lpd/filterMFC210C"))then
+ echo "ERROR : Brother LPD filter is not installed."
+ endif
+ rm -f /usr/share/cups/model/brmfc210c_cups.ppd
+@@ -1035,8 +1035,8 @@
+ echo ' echo "PPD = $PPD" >>$LOGFILE' >> $brotherlpdwrapper
+ echo 'endif' >> $brotherlpdwrapper
+ echo '' >> $brotherlpdwrapper
+-echo 'if(!(-e /usr/local/Brother/lpd/filterMFC210C)) then' >> $brotherlpdwrapper
+-echo ' echo "ERROR: /usr/local/Brother/lpd/filterMFC210C does not exist" >>$LOGFILE' >> $brotherlpdwrapper
++echo 'if(!(-e /usr/share/brother/lpd/filterMFC210C)) then' >> $brotherlpdwrapper
++echo ' echo "ERROR: /usr/share/brother/lpd/filterMFC210C does not exist" >>$LOGFILE' >> $brotherlpdwrapper
+ echo ' set errorcode=30' >> $brotherlpdwrapper
+ echo ' exit $errorcode' >> $brotherlpdwrapper
+ echo 'endif' >> $brotherlpdwrapper
+@@ -1177,7 +1177,7 @@
+ echo '' >> $brotherlpdwrapper
+ echo '' >> $brotherlpdwrapper
+ echo 'if($DEBUG < 10) then' >> $brotherlpdwrapper
+-echo ' cat $INPUT_TEMP_PS | /usr/local/Brother/lpd/filterMFC210C' >> $brotherlpdwrapper
++echo ' cat $INPUT_TEMP_PS | /usr/share/brother/lpd/filterMFC210C' >> $brotherlpdwrapper
+ echo '' >> $brotherlpdwrapper
+ echo ' if($LOGLEVEL > 2) then' >> $brotherlpdwrapper
+ echo ' if($LOGFILE != "/dev/null") then' >> $brotherlpdwrapper
+@@ -1195,15 +1195,4 @@
+ echo '' >> $brotherlpdwrapper
+ echo '' >> $brotherlpdwrapper
+ chmod a+x $brotherlpdwrapper
+-chmod a+w /usr/local/Brother/inf/brMFC210Crc
+-chmod a+w /usr/local/Brother/inf
+-if( -e /etc/init.d/lpd) then
+- /etc/init.d/lpd stop
+-endif
+-if( -e /etc/init.d/lprng) then
+- /etc/init.d/lprng stop
+-endif
+-/etc/init.d/cups restart
+-sleep 2s
+-lpadmin -p MFC210C -E -v usb:/dev/usb/lp0 -m brmfc210c_cups.ppd
+- exit(0)
++exit(0)
diff --git a/adjust-setupPrintcapij-to-arch.patch b/adjust-setupPrintcapij-to-arch.patch
new file mode 100644
index 00000000000..e752adcff91
--- /dev/null
+++ b/adjust-setupPrintcapij-to-arch.patch
@@ -0,0 +1,42 @@
+--- orig/usr/local/Brother/inf/setupPrintcapij 2005-04-20 11:34:32.000000000 +0200
++++ modif/usr/local/Brother/inf/setupPrintcapij 2015-08-03 19:48:27.889697524 +0200
+@@ -19,7 +19,7 @@
+ #
+
+ BRPRINTER_NAME=$1
+-PRINTCAP_NAME=/etc/printcap.local
++PRINTCAP_NAME=/etc/lprng/printcap
+ SPOOLER_NAME=/var/spool/lpd/$BRPRINTER_NAME
+ DEVICE_IF=/dev/lp0
+
+@@ -29,12 +29,6 @@
+
+ case "$2" in
+ -i)
+- if [ ! -d $SPOOLER_NAME ]; then
+- mkdir $SPOOLER_NAME
+- fi
+- chown lp $SPOOLER_NAME
+- chgrp lp $SPOOLER_NAME
+- chmod 700 $SPOOLER_NAME
+
+ if [ "$3" = "USB" ]; then
+ DEVICE_IF=/dev/usb/lp0
+@@ -46,8 +40,16 @@
+ :sd=/var/spool/lpd/$BRPRINTER_NAME:\\
+ :sh:\\
+ :lp=$DEVICE_IF:\\
+- :if=/usr/local/Brother/lpd/filter$BRPRINTER_NAME:
++ :if=/usr/share/brother/lpd/filter$BRPRINTER_NAME:
+ EOF
++
++ checkpc -f
++
++ if [ ! -d $SPOOLER_NAME ]; then
++ mkdir $SPOOLER_NAME
++ fi
++ chown daemon.lp $SPOOLER_NAME
++ chmod 700 $SPOOLER_NAME
+ ;;
+ -e)
+ mv $PRINTCAP_NAME $PRINTCAP_NAME.tmp
diff --git a/brother-eula.txt b/brother-eula.txt
new file mode 100644
index 00000000000..8c604ae3ec7
--- /dev/null
+++ b/brother-eula.txt
@@ -0,0 +1,7 @@
+This Agreement provides terms and conditions for license grant from Brother Industries, Ltd ("Broher"). Brother, who owns all copyrights to the software that is distributed with this Agreement ("Software") to recipients thereof ("User"), for use of the Software. User shall have the right to use the Software only in accordance with the terms and conditions of this Agreement. Any use by User of the Software shall be deemed as its agreement hereto.
+
+Brother retains any and all copyrights to the Software. In no case this Agreement shall be construed to assign or otherwise transfer from Brother to User any copyrights or other intellectual property rights to whole or any part of the Software.
+
+Brother grants User a non-exclusive license: to reproduce and/or distribute (via Internet or in any other manner) the Software. Further, Brother grants User a non-exclusive license to modify, alter, translate or otherwise prepare derivative works of the Software and to reproduce and distribute (via Internet or in any other manner) such modification, alteration, translation or other derivative works for any purpose.
+
+The license of the Software from Brother hereunder is granted "AS IS." BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO THE SOFTWARE, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY, MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. Brother shall have no liability in contract, tort (including negligence or breach of statutory duty) or otherwise for any interruption of use, loss of data, or for any indirect, incidental, punitive or consequential loss or damage, or for any loss of profit, revenue, data, goodwill or anticipated savings that arises under, out of, or in contemplation of this Agreement or otherwise arises due to any error, inaccuracy or defect in the Software even if Brother has been advised of the possibility of such loss or damage. Further, Brother shall have no liability to disclose and/or distribute the source cord of the Software to User under any circumstances. In no case shall the above license by Brother to modify, alter, translate or otherwise prepare derivative works of the Software be construed as Brother's implied agreement or undertakings to disclose and/or distribute the source cord of the Software.
diff --git a/brother-mfc-210c.install b/brother-mfc-210c.install
new file mode 100644
index 00000000000..ef47431ba09
--- /dev/null
+++ b/brother-mfc-210c.install
@@ -0,0 +1,20 @@
+post_install() {
+
+ chown root.lp /usr/share/brother/inf
+ chmod 775 /usr/share/brother/inf
+ chown daemon.lp /usr/share/brother/inf/brMFC210Crc
+ chmod 600 /usr/share/brother/inf/brMFC210Crc
+
+ echo ""
+ echo "LPRng:"
+ echo "In order to use this driver with LPRng run"
+ echo " /usr/share/brother/inf/setupPrintcapij MFC210C -i USB"
+ echo "as root and restart the lpd daemon. (Assums the basic"
+ echo "configuration has been done already and lpd is up and running.)"
+ echo ""
+ echo "CUPS:"
+ echo "Installation of this package does not cover adding a printer"
+ echo "to allow for chosing an arbitrary queue name."
+ echo "This has to be done manually e. g. from the Web-UI."
+ echo ""
+}