summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek2017-04-17 19:13:14 +0200
committerBartek2017-04-17 19:13:14 +0200
commita2cf4fd3d486b5f153b20333b93a50dceae4c583 (patch)
tree0edeae71bb241ccb4cb0b3be18e8d916d1df6bef
downloadaur-a2cf4fd3d486b5f153b20333b93a50dceae4c583.tar.gz
DCP-J925DW Driver
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD40
-rw-r--r--brother-dcpj925dw.install27
-rw-r--r--fix_lp.patch11
4 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c8efa43f720b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = brother-dcpj925dw
+ pkgdesc = Driver for the Brother DCP-J925DW wifi multifuncional printer
+ pkgver = 3.0
+ pkgrel = 1
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-dcpj925dw.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ makedepends = rpmextract
+ depends = a2ps
+ depends = cups
+ optdepends = brscan4: scanning support
+ optdepends = brscan-skey: scankey support
+ source = fix_lp.patch
+ source = http://www.brother.com/pub/bsc/linux/dlf/dcpj925dwlpr-3.0.1-1.i386.rpm
+ source = http://www.brother.com/pub/bsc/linux/dlf/dcpj925dwcupswrapper-3.0.0-1.i386.rpm
+ md5sums = b1c8011e07e6eeaebde3464d5e9f7f49
+ md5sums = 9481020a4aa0cbde915cd52d0b0201fe
+ md5sums = d429fb9b1faa4e895d8af8045e83cb80
+
+pkgname = brother-dcpj925dw
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5957eddff8df
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: hawkeye116477 <hawkeye116477 at gmail.com>
+# Based on brother-dcpj315w PKGBUILD
+pkgname=brother-dcpj925dw
+pkgver=3.0
+pkgrel=1
+pkgdesc="Driver for the Brother DCP-J925DW wifi multifuncional printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+depends=('a2ps' 'cups')
+makedepends=('rpmextract')
+install="brother-dcpj925dw.install"
+arch=('i686' 'x86_64')
+
+md5sums=('b1c8011e07e6eeaebde3464d5e9f7f49'
+ '9481020a4aa0cbde915cd52d0b0201fe'
+ 'd429fb9b1faa4e895d8af8045e83cb80')
+
+source=(
+ "fix_lp.patch" \
+ "http://www.brother.com/pub/bsc/linux/dlf/dcpj925dwlpr-$pkgver.1-1.i386.rpm" \
+ "http://www.brother.com/pub/bsc/linux/dlf/dcpj925dwcupswrapper-$pkgver.0-1.i386.rpm"
+)
+
+optdepends=(
+ 'brscan4: scanning support'
+ 'brscan-skey: scankey support'
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+package()
+{
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpj925dw "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcpj925dw.install b/brother-dcpj925dw.install
new file mode 100644
index 000000000000..62af1c32bcdf
--- /dev/null
+++ b/brother-dcpj925dw.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpj925dw/inf/setupPrintcapij dcpj925dw -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj925dw/cupswrapper/cupswrapperdcpj925dw
+
+ systemctl restart cups
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpj925dw/inf/setupPrintcapij dcpj925dw -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj925dw/cupswrapper/cupswrapperdcpj925dw -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..1bf75f7614e5
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpj925dw/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/dcpj925dw/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
+