summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD43
-rw-r--r--brother-dcpj968n.install26
-rw-r--r--eula.txt8
-rw-r--r--fix_lp.patch11
5 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..eb029df4cb2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = brother-dcpj968n
+ pkgdesc = Driver for the Brother DCP-J968N wifi multifuncional printer
+ pkgver = 1.0.0_0
+ pkgrel = 1
+ url = https://support.brother.co.jp/j/b/producttop.aspx?c=jp&lang=ja&prod=dcpj968n
+ install = brother-dcpj968n.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ license = custom:brother
+ depends = a2ps
+ depends = cups
+ depends = lib32-glibc
+ source = https://download.brother.com/welcome/dlf102835/dcpj968nlpr-1.0.0-0.i386.rpm
+ source = https://download.brother.com/welcome/dlf102843/dcpj968ncupswrapper-1.0.0-0.i386.rpm
+ source = eula.txt
+ source = fix_lp.patch
+ md5sums = a7fbbaa67ccbaa17a81f2f6db0be660e
+ md5sums = 545e8cdcd598cd2d21e3c3e1dd990033
+ md5sums = 8f3fd8004f2345afe1e009bfb9d36f00
+ md5sums = 0eeafd97723bd243e0c8bdc0e49f7dc9
+
+pkgname = brother-dcpj968n
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2ca1b5f20ff
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: masuke5 <s dot zerogoichi at gmail dot com>
+
+pkgname=brother-dcpj968n
+pkgver=1.0.0_0
+pkgrel=1
+pkgdesc="Driver for the Brother DCP-J968N wifi multifuncional printer"
+arch=('i686' 'x86_64')
+url="https://support.brother.co.jp/j/b/producttop.aspx?c=jp&lang=ja&prod=dcpj968n"
+license=('GPL2' 'custom:brother')
+depends=('a2ps' 'cups' 'lib32-glibc')
+install="brother-dcpj968n.install"
+source=(
+ "https://download.brother.com/welcome/dlf102835/dcpj968nlpr-${pkgver/_/-}.i386.rpm"
+ "https://download.brother.com/welcome/dlf102843/dcpj968ncupswrapper-${pkgver/_/-}.i386.rpm"
+ 'eula.txt'
+ 'fix_lp.patch'
+)
+md5sums=(
+ 'a7fbbaa67ccbaa17a81f2f6db0be660e'
+ '545e8cdcd598cd2d21e3c3e1dd990033'
+ '8f3fd8004f2345afe1e009bfb9d36f00'
+ '0eeafd97723bd243e0c8bdc0e49f7dc9'
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/dcpj968n/cupswrapper/cupswrapperdcpj968n
+}
+
+package() {
+ # Licenses
+ install -Dm644 ${srcdir}/eula.txt ${pkgdir}/usr/share/licenses/${pkgname}/eula.txt
+ ln -s /usr/share/licenses/GPL2/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/cupswrapper-license.txt
+
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpj968n "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcpj968n.install b/brother-dcpj968n.install
new file mode 100644
index 00000000000..c21626df54b
--- /dev/null
+++ b/brother-dcpj968n.install
@@ -0,0 +1,26 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpj968n/inf/setupPrintcapij dcpj968n -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj968n/cupswrapper/cupswrapperdcpj968n
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpj968n/inf/setupPrintcapij dcpj968n -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj968n/cupswrapper/cupswrapperdcpj968n -e
+}
+
+op=$1
+shift
+
+$op "$@"
diff --git a/eula.txt b/eula.txt
new file mode 100644
index 00000000000..094108f7c31
--- /dev/null
+++ b/eula.txt
@@ -0,0 +1,8 @@
+License Agreement
+This Agreement provides terms and conditions for license grant from Brother Industries, Ltd ("Broher"). Brother, who owns all copyrights to the software that is distributed with this Agreement ("Software") to recipients thereof ("User"), for use of the Software. User shall have the right to use the Software only in accordance with the terms and conditions of this Agreement. Any use by User of the Software shall be deemed as its agreement hereto.
+
+Brother retains any and all copyrights to the Software. In no case this Agreement shall be construed to assign or otherwise transfer from Brother to User any copyrights or other intellectual property rights to whole or any part of the Software.
+
+Brother grants User a non-exclusive license: to reproduce and/or distribute (via Internet or in any other manner) the Software. Further, Brother grants User a non-exclusive license to modify, alter, translate or otherwise prepare derivative works of the Software and to reproduce and distribute (via Internet or in any other manner) such modification, alteration, translation or other derivative works for any purpose.
+
+The license of the Software from Brother hereunder is granted "AS IS." BROTHER HEREBY DISCLAIMS ANY WARRANTIES WITH RESPECT TO THE SOFTWARE, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTY FOR THE QUALITY, MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR NON-INFRINGEMENT. Brother shall have no liability in contract, tort (including negligence or breach of statutory duty) or otherwise for any interruption of use, loss of data, or for any indirect, incidental, punitive or consequential loss or damage, or for any loss of profit, revenue, data, goodwill or anticipated savings that arises under, out of, or in contemplation of this Agreement or otherwise arises due to any error, inaccuracy or defect in the Software even if Brother has been advised of the possibility of such loss or damage. Further, Brother shall have no liability to disclose and/or distribute the source cord of the Software to User under any circumstances. In no case shall the above license by Brother to modify, alter, translate or otherwise prepare derivative works of the Software be construed as Brother's implied agreement or undertakings to disclose and/or distribute the source cord of the Software.
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 00000000000..2845d59c92f
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpj968n/inf/setupPrintcapij.old 2020-06-20 12:00:53.791722901 +0900
++++ opt/brother/Printers/dcpj968n/inf/setupPrintcapij 2020-06-20 12:02:24.895058105 +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
+