summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchiso2019-06-22 14:36:46 +0900
committerArchiso2019-06-22 14:36:46 +0900
commit18c4ab77232ac9c2c8fb886fb7a7a17a989d74ee (patch)
treebd85b75311867b127afcc28ad1151fcff7d0809e
downloadaur-brother-dcpj577n.tar.gz
First commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD33
-rw-r--r--brother-dcpj577n.install27
-rw-r--r--fix_lp.patch11
4 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..968e9ffd1be1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = brother-dcpj577n
+ pkgdesc = Brother DCP-J577N CUPS driver
+ pkgver = 1.0.5
+ pkgrel = 0
+ url = http://brother.co.jp/
+ install = brother-dcpj577n.install
+ arch = i686
+ arch = x86_64
+ license = EULA
+ depends = cups
+ depends = a2ps
+ source = fix_lp.patch
+ source = https://download.brother.com/welcome/dlf104037/dcpj577npdrv-1.0.5-0.i386.rpm
+ md5sums = 0123659bafc46e84ca66316dc511f0f8
+ md5sums = 23c3134e53d7a38778ba8b0fe2e93d64
+
+pkgname = brother-dcpj577n
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..31d3357b3ce0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Nie(sha) <nieein56@tamag.org>
+
+pkgname="brother-dcpj577n"
+pkgver="1.0.5"
+pkgrel="0"
+pkgdesc="Brother DCP-J577N CUPS driver"
+url="http://brother.co.jp/"
+license=('EULA')
+install="brother-dcpj577n.install"
+depends=('cups' 'a2ps')
+arch=('i686' 'x86_64')
+
+md5sums=(
+ '0123659bafc46e84ca66316dc511f0f8'
+ '23c3134e53d7a38778ba8b0fe2e93d64'
+)
+
+source=(
+ 'fix_lp.patch' \
+ "https://download.brother.com/welcome/dlf104037/dcpj577npdrv-$pkgver-$pkgrel.i386.rpm"
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+package() {
+ install -d "$pkgdir"/usr/bin
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpj577n "$pkgdir"/usr/bin/
+ cp -R "$srcdir"/opt "$pkgdir"/opt
+}
+
diff --git a/brother-dcpj577n.install b/brother-dcpj577n.install
new file mode 100644
index 000000000000..0cf78e3cfec1
--- /dev/null
+++ b/brother-dcpj577n.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpj577n/inf/setupPrintcapij dcpj577n -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj577n/cupswrapper/cupswrapperdcpj577n
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpj577n/inf/setupPrintcapij dcpj577n -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj577n/cupswrapper/cupswrapperdcpj577n -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..8977e13035ed
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpj577n/inf/setupPrintcapij.old 2019-06-15 22:55:31.673344065 +0900
++++ opt/brother/Printers/dcpj577n/inf/setupPrintcapij 2019-06-15 22:55:46.776677529 +0900
+@@ -34,7 +34,7 @@
+ if [ ! -d $SPOOLER_NAME ]; then
+ mkdir -p $SPOOLER_NAME
+ fi
+- chown lp $SPOOLER_NAME
++ chown root $SPOOLER_NAME
+ chgrp lp $SPOOLER_NAME
+ chmod 700 $SPOOLER_NAME
+