summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohd Shahril2018-05-19 19:45:22 +0800
committerMohd Shahril2018-05-19 19:45:22 +0800
commit73cc5eceefb48246d399a6982894426e4458edbb (patch)
treef56f8f0a60b23018fbe14146aa3a83e2c3fb3d12
downloadaur-73cc5eceefb48246d399a6982894426e4458edbb.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD46
-rw-r--r--brother-dcpt510w.install27
-rw-r--r--fix_lp.patch11
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e30ba2420026
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = brother-dcpt510w
+ pkgdesc = Driver for the Brother DCP-T510W wifi multifuncional printer
+ pkgver = 1.0.1
+ pkgrel = 0
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-dcpt510w.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ makedepends = rpmextract
+ depends = a2ps
+ depends = cups
+ depends = lib32-glibc
+ optdepends = sane: scanning support
+ optdepends = brscan4: making dcpt510w available to sane (scanning support)
+ optdepends = brscan-skey: scankey support if connected via usb
+ source = http://download.brother.com/welcome/dlf103621/dcpt510wpdrv-1.0.1-0.i386.rpm
+ source = fix_lp.patch
+ sha256sums = 8072709a7ff3845fd96b8c6b70b13c3af996a905422af1b80c5b991cf1fc38cb
+ sha256sums = 288d5b0cf42d6db004d612bfb7162021df8e62cf6a32a9b0daedc1118556c92f
+
+pkgname = brother-dcpt510w
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..683c0df145ca
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Mohd Shahril Zainol Abidin <mohd_shahril_96@yahoo.com>
+
+pkgname=brother-dcpt510w
+pkgver=1.0.1
+pkgrel=0
+pkgdesc="Driver for the Brother DCP-T510W wifi multifuncional printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+makedepends=('rpmextract')
+install="brother-dcpt510w.install"
+arch=('i686' 'x86_64')
+optdepends=('sane: scanning support'
+ 'brscan4: making dcpt510w available to sane (scanning support)'
+ 'brscan-skey: scankey support if connected via usb')
+
+if [[ "$CARCH" == "x86_64" ]] ; then
+ depends=('a2ps' 'cups' 'lib32-glibc')
+elif [[ "$CARCH" == "i686" ]] ; then
+ depends=('a2ps' 'cups')
+fi
+
+source=(
+ "http://download.brother.com/welcome/dlf103621/dcpt510wpdrv-$pkgver-$pkgrel.i386.rpm" \
+ "fix_lp.patch"
+)
+sha256sums=(
+ '8072709a7ff3845fd96b8c6b70b13c3af996a905422af1b80c5b991cf1fc38cb'
+ '288d5b0cf42d6db004d612bfb7162021df8e62cf6a32a9b0daedc1118556c92f'
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/dcpt510w/cupswrapper/cupswrapperdcpt510w
+}
+
+package()
+{
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpt510w "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcpt510w.install b/brother-dcpt510w.install
new file mode 100644
index 000000000000..b3696941c122
--- /dev/null
+++ b/brother-dcpt510w.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpt510w/inf/setupPrintcapij dcpt510w -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpt510w/cupswrapper/cupswrapperdcpt510w
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpt510w/inf/setupPrintcapij dcpt510w -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpt510w/cupswrapper/cupswrapperdcpt510w -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..58fa80fe6bbc
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpt510w/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/dcpt510w/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
+