diff options
author | guzz46 | 2015-08-09 12:59:56 +1200 |
---|---|---|
committer | guzz46 | 2015-08-09 12:59:56 +1200 |
commit | 3d4a9b76d8a0572a1b81a738efd1cbc30f5c9ced (patch) | |
tree | 4a8654ae2151a30f049f93a4440b79bef24fc922 | |
download | aur-3d4a9b76d8a0572a1b81a738efd1cbc30f5c9ced.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | brother-dcp560cn.install | 27 | ||||
-rw-r--r-- | brother_fix.patch | 75 | ||||
-rw-r--r-- | fix_lp.patch | 11 |
5 files changed, 178 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..faa7e0800add --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +# Generated by makepkg 4.2.1 +# Sun May 31 23:49:08 UTC 2015 +pkgbase = brother-dcp560cn + pkgdesc = Driver for the Brother DCP-560CN networked multifuncional printer + pkgver = 1.0.1 + pkgrel = 1 + url = http://solutions.brother.com/linux/en_us/index.html + install = brother-dcp560cn.install + arch = i686 + arch = x86_64 + license = custom:brother + makedepends = rpmextract + depends = a2ps + depends = lib32-libcups + source = fix_lp.patch + source = brother_fix.patch + source = http://www.brother.com/pub/bsc/linux/dlf/dcp560cnlpr-1.0.1-1.i386.rpm + source = http://www.brother.com/pub/bsc/linux/dlf/dcp560cncupswrapper-1.0.1-1.i386.rpm + md5sums = d8d7f052d04a4805a811bff5deb0d106 + md5sums = 495032733cb0f63f22069f579daf8bfc + md5sums = 3210ef875c5031726efe6ae95960d7ce + md5sums = ab86134d70121efc7846b7ed1b4e2446 + +pkgname = brother-dcp560cn diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e159a12c6ea9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Old Contributor: Alessio Bianchi <venator85@gmail.com> +# Contributor: Markus Härer <markus.haerer@gmx.net> + +pkgname=brother-dcp560cn +pkgver=1.0.1 +pkgrel=1 +pkgdesc="Driver for the Brother DCP-560CN networked multifuncional printer" +url="http://solutions.brother.com/linux/en_us/index.html" +license=('custom:brother') + +if [ $CARCH == "x86_64" ]; then + depends=('a2ps' 'lib32-libcups') +else + depends=('a2ps') +fi + +makedepends=('rpmextract') +install="brother-dcp560cn.install" +arch=('i686' 'x86_64') +source=( + fix_lp.patch + brother_fix.patch + http://www.brother.com/pub/bsc/linux/dlf/dcp560cnlpr-1.0.1-1.i386.rpm + http://www.brother.com/pub/bsc/linux/dlf/dcp560cncupswrapper-1.0.1-1.i386.rpm +) +md5sums=('d8d7f052d04a4805a811bff5deb0d106' + '495032733cb0f63f22069f579daf8bfc' + '3210ef875c5031726efe6ae95960d7ce' + 'ab86134d70121efc7846b7ed1b4e2446') + +package() +{ + cd $srcdir + for i in *.rpm; do + rpmextract.sh "$i" + done + patch -Np0 < ../fix_lp.patch + patch -Np0 < ../brother_fix.patch + cp -r "$srcdir/usr" "$pkgdir" + mkdir -p ../pkg/var/spool/lpd/dcp560cn +}
\ No newline at end of file diff --git a/brother-dcp560cn.install b/brother-dcp560cn.install new file mode 100644 index 000000000000..e7ded80c309d --- /dev/null +++ b/brother-dcp560cn.install @@ -0,0 +1,27 @@ +post_install() { + # lpr + mkdir -p /var/spool/lpd + /usr/local/Brother/Printer/dcp560cn/inf/setupPrintcapij dcp560cn -i + + # cupswrapper + /usr/local/Brother/Printer/dcp560cn/cupswrapper/cupswrapperdcp560cn + + /usr/bin/systemctl restart org.cups.cupsd.service +} + +post_upgrade() { + /bin/true +} + +pre_remove() { + # lpr + /usr/local/Brother/Printer/dcp560cn/inf/setupPrintcapij dcp560cn -e + + # cupswrapper + /usr/local/Brother/Printer/dcp560cn/cupswrapper/cupswrapperdcp560cn -e +} + +op=$1 +shift + +$op "$@" diff --git a/brother_fix.patch b/brother_fix.patch new file mode 100644 index 000000000000..3762cfc951dd --- /dev/null +++ b/brother_fix.patch @@ -0,0 +1,75 @@ +diff -Naur usr.old/local/Brother/Printer/dcp560cn/cupswrapper/cupswrapperdcp560cn usr/local/Brother/Printer/dcp560cn/cupswrapper/cupswrapperdcp560cn +--- usr.old/local/Brother/Printer/dcp560cn/cupswrapper/cupswrapperdcp560cn 2010-04-13 20:08:50.211208593 +0200 ++++ usr/local/Brother/Printer/dcp560cn/cupswrapper/cupswrapperdcp560cn 2010-04-13 19:59:19.164599589 +0200 +@@ -30,22 +30,22 @@ + rm -f /usr/lib/cups/filter/brlpdwrapper${printer_model} + rm -f /usr/lib64/cups/filter/brlpdwrapper${printer_model} + rm -f /usr/local/Brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1 +-if [ -e /etc/init.d/cups ]; then +- /etc/init.d/cups restart +-elif [ -e /etc/init.d/cupsys ]; then +- /etc/init.d/cupsys restart ++if [ -e /etc/rc.d/cups ]; then ++ /etc/rc.d/cups restart ++elif [ -e /etc/rc.d/cupsys ]; then ++ /etc/rc.d/cupsys restart + fi +-# /etc/init.d/cups restart ++# /etc/rc.d/cups restart + exit 0 + fi + if [ "$1" = "-r" ]; then + lpadmin -x ${printer_name} +-if [ -e /etc/init.d/cups ]; then +- /etc/init.d/cups restart +-elif [ -e /etc/init.d/cupsys ]; then +- /etc/init.d/cupsys restart ++if [ -e /etc/rc.d/cups ]; then ++ /etc/rc.d/cups restart ++elif [ -e /etc/rc.d/cupsys ]; then ++ /etc/rc.d/cupsys restart + fi +-# /etc/init.d/cups restart ++# /etc/rc.d/cups restart + exit 0 + fi + if [ "$1" = "help" ] || [ "$1" = "-h" ]; then +@@ -839,18 +839,18 @@ + + chmod a+w /usr/local/Brother/${device_model}/${printer_model}/inf/br${printer_model}rc + chmod a+w /usr/local/Brother/${device_model}/${printer_model}/inf +-if [ -e /etc/init.d/lpd ]; then +- /etc/init.d/lpd stop ++if [ -e /etc/rc.d/lpd ]; then ++ /etc/rc.d/lpd stop + fi +-if [ -e /etc/init.d/lprng ]; then +- /etc/init.d/lprng stop ++if [ -e /etc/rc.d/lprng ]; then ++ /etc/rc.d/lprng stop + fi + + +-if [ -e /etc/init.d/cups ]; then +- /etc/init.d/cups restart +-elif [ -e /etc/init.d/cupsys ]; then +- /etc/init.d/cupsys restart ++if [ -e /etc/rc.d/cups ]; then ++ /etc/rc.d/cups restart ++elif [ -e /etc/rc.d/cupsys ]; then ++ /etc/rc.d/cupsys restart + fi + + sleep 2s +diff -Naur usr.old/local/Brother/Printer/dcp560cn/inf/setupPrintcapij usr/local/Brother/Printer/dcp560cn/inf/setupPrintcapij +--- usr.old/local/Brother/Printer/dcp560cn/inf/setupPrintcapij 2010-04-13 20:08:50.214959736 +0200 ++++ usr/local/Brother/Printer/dcp560cn/inf/setupPrintcapij 2010-04-13 19:59:56.077929516 +0200 +@@ -20,7 +20,7 @@ + + BRPRINTER_MODEL=$1 + BRPRINTER_NAME=`echo $BRPRINTER_MODEL | tr '[a-z]' '[A-Z]'` +-PRINTCAP_NAME=/etc/printcap.local ++PRINTCAP_NAME=/etc/printcap + SPOOLER_NAME=/var/spool/lpd/$BRPRINTER_MODEL + + DEVICE_IF=/dev/usb/lp0
\ No newline at end of file diff --git a/fix_lp.patch b/fix_lp.patch new file mode 100644 index 000000000000..ce5b097a0f62 --- /dev/null +++ b/fix_lp.patch @@ -0,0 +1,11 @@ +--- usr/local/Brother/Printer/dcp560cn/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200 ++++ usr/local/Brother/Printer/dcp560cn/inf/setupPrintcapij 2008-09-15 22:01:26.000000000 +0200 +@@ -34,7 +34,7 @@ + if [ ! -d $SPOOLER_NAME ]; then + mkdir $SPOOLER_NAME + fi +- chown lp $SPOOLER_NAME ++ chown root $SPOOLER_NAME + chgrp lp $SPOOLER_NAME + chmod 700 $SPOOLER_NAME +
\ No newline at end of file |