diff options
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | brother-dcpj582n.install | 27 | ||||
-rw-r--r-- | fix_lp.patch | 11 |
5 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7bb162a93c63 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = brother-dcpj582n + pkgdesc = Brother DCP-J582N CUPS driver + pkgver = 1.0.5 + pkgrel = 0 + url = http://brother.co.jp/ + install = brother-dcpj582n.install + arch = i686 + arch = x86_64 + license = EULA + depends = cups + depends = a2ps + depends = lib32-gcc-libs + source = fix_lp.patch + source = https://download.brother.com/welcome/dlf104685/dcpj582npdrv-1.0.5-0.i386.rpm + md5sums = 341b0c2528985336ec0a0f539809a87b + md5sums = 0877c76c218a9f2e0709f58fcd70c3a5 + +pkgname = brother-dcpj582n + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0f5d1bc2e576 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +pkg/ +src/ +*.rpm +*.tar.xz + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b71a3d3ad7b4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,33 @@ +# Maintainer: tr-mtzk <tr.mtzk@gmail.com> + +pkgname="brother-dcpj582n" +pkgver="1.0.5" +pkgrel="0" +pkgdesc="Brother DCP-J582N CUPS driver" +url="http://brother.co.jp/" +license=('EULA') +install="brother-dcpj582n.install" +depends=('cups' 'a2ps' 'lib32-gcc-libs') +arch=('i686' 'x86_64') + +md5sums=( + '341b0c2528985336ec0a0f539809a87b' + '0877c76c218a9f2e0709f58fcd70c3a5' +) + +source=( + 'fix_lp.patch' \ + "https://download.brother.com/welcome/dlf104685/dcpj582npdrv-$pkgver-$pkgrel.i386.rpm" +) + +build() { + cd "$srcdir" + patch -Np0 < fix_lp.patch +} + +package() { + install -d "$pkgdir"/usr/bin + install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpj582n "$pkgdir"/usr/bin/ + cp -R "$srcdir"/opt "$pkgdir"/opt +} + diff --git a/brother-dcpj582n.install b/brother-dcpj582n.install new file mode 100644 index 000000000000..ea8b67476248 --- /dev/null +++ b/brother-dcpj582n.install @@ -0,0 +1,27 @@ +post_install() { + # lpr + /opt/brother/Printers/dcpj582n/inf/setupPrintcapij dcpj582n -i + + # cupswrapper + /opt/brother/Printers/dcpj582n/cupswrapper/cupswrapperdcpj582n + + systemctl restart org.cups.cupsd.service +} + +post_upgrade() { + /bin/true +} + +pre_remove() { + # lpr + /opt/brother/Printers/dcpj582n/inf/setupPrintcapij dcpj582n -e + + # cupswrapper + /opt/brother/Printers/dcpj582n/cupswrapper/cupswrapperdcpj582n -e +} + +op=$1 +shift + +$op "$@" + diff --git a/fix_lp.patch b/fix_lp.patch new file mode 100644 index 000000000000..e126f343a84d --- /dev/null +++ b/fix_lp.patch @@ -0,0 +1,11 @@ +--- opt/brother/Printers/dcpj582n/inf/setupPrintcapij.old 2020-06-05 22:21:00.364552651 +0900 ++++ opt/brother/Printers/dcpj582n/inf/setupPrintcapij 2020-06-05 22:18:11.379178284 +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 + |