summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwallace2019-05-14 02:35:45 +0900
committerwallace2019-05-14 02:35:45 +0900
commitf5dc0fd69a8a49e0f9a377366b42d6a8c57a3405 (patch)
tree091eab05da18a44d2e6392471cf820c038844914
downloadaur-brother-dcpj983n.tar.gz
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD33
-rw-r--r--brother-dcpj983n.install27
-rw-r--r--fix_lp.patch11
4 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bd3184c51802
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = brother-dcpj983n
+ pkgdesc = LPR and CUPS driver for the Brother DCP-J983N
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = http://solutions.brother.com/linux/en_us/
+ install = brother-dcpj983n.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ depends = a2ps
+ depends = cups
+ source = fix_lp.patch
+ source = https://download.brother.com/welcome/dlf103266/dcpj983nlpr-1.0.0-0.i386.rpm
+ source = https://download.brother.com/welcome/dlf103267/dcpj983ncupswrapper-1.0.0-0.i386.rpm
+ md5sums = d48eb3c8d98e4ab98c9aeeaba65c4631
+ md5sums = dc13f800b8443db1691f774c3a8f8c1b
+ md5sums = 149be0d1ee1f811ca03b0b083f6857aa
+
+pkgname = brother-dcpj983n
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c9c353f27747
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: wallace < str(11) + my_id at gmail dot com>
+
+pkgname=brother-dcpj983n
+_printername=dcpj983n
+pkgver=1.0.0
+pkgrel=1
+pkgdesc="LPR and CUPS driver for the Brother DCP-J983N"
+url="http://solutions.brother.com/linux/en_us/"
+license=('custom:brother')
+depends=('a2ps' 'cups')
+install="brother-dcpj983n.install"
+arch=('i686' 'x86_64')
+md5sums=('d48eb3c8d98e4ab98c9aeeaba65c4631'
+ 'dc13f800b8443db1691f774c3a8f8c1b'
+ '149be0d1ee1f811ca03b0b083f6857aa')
+source=(
+ "fix_lp.patch"
+ "https://download.brother.com/welcome/dlf103266/${_printername}lpr-$pkgver-0.i386.rpm"
+ "https://download.brother.com/welcome/dlf103267/${_printername}cupswrapper-$pkgver-0.i386.rpm"
+)
+
+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_${_printername} "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcpj983n.install b/brother-dcpj983n.install
new file mode 100644
index 000000000000..ad07269105df
--- /dev/null
+++ b/brother-dcpj983n.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpj983n/inf/setupPrintcapij dcpj983n -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj983n/cupswrapper/cupswrapperdcpj983n
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpj983n/inf/setupPrintcapij dcpj983n -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj983n/cupswrapper/cupswrapperdcpj983n -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..960966b79e97
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpj983n/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/dcpj983n/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
+