summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD37
-rw-r--r--brother-dcp365cn.install27
-rw-r--r--fix_lp.patch11
4 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..274fe334a93f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = brother-dcp365cn
+ pkgdesc = Driver for Brother DCP-365CN printer
+ pkgver = 1.1.3
+ pkgrel = 1
+ url = https://support.brother.com/g/b/producttop.aspx?c=de&lang=de&prod=dcp365cn_eu_as
+ install = brother-dcp365cn.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ depends = a2ps
+ depends = cups
+ depends = lib32-gcc-libs
+ depends = lib32-glibc
+ optdepends = brscan3: scanner support.
+ source = fix_lp.patch
+ source = https://download.brother.com/welcome/dlf005418/dcp365cnlpr-1.1.3-1.i386.rpm
+ source = https://download.brother.com/welcome/dlf005420/dcp365cncupswrapper-1.1.3-1.i386.rpm
+ md5sums = bea93ac27ae27cbd0916414e5a7f630b
+ md5sums = 951f04eaa29ce2a95c0b46582cf09411
+ md5sums = 0c62592b0c185bc6c2610b5407aaafb2
+
+pkgname = brother-dcp365cn
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4554766db56c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+pkgname=brother-dcp365cn
+pkgver=1.1.3
+pkgrel=1
+pkgdesc="Driver for Brother DCP-365CN printer"
+url="https://support.brother.com/g/b/producttop.aspx?c=de&lang=de&prod=dcp365cn_eu_as"
+license=('custom:brother')
+depends=('a2ps' 'cups' 'lib32-gcc-libs' 'lib32-glibc')
+optdepends=('brscan3: scanner support.')
+install="brother-dcp365cn.install"
+arch=('i686' 'x86_64')
+
+md5sums=('bea93ac27ae27cbd0916414e5a7f630b'
+ '951f04eaa29ce2a95c0b46582cf09411'
+ '0c62592b0c185bc6c2610b5407aaafb2')
+
+source=(
+ "fix_lp.patch" \
+ "https://download.brother.com/welcome/dlf005418/dcp365cnlpr-1.1.3-1.i386.rpm" \
+ "https://download.brother.com/welcome/dlf005420/dcp365cncupswrapper-1.1.3-1.i386.rpm"
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/dcp365cn/cupswrapper/cupswrapperdcp365cn
+}
+
+package() {
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcp365cn "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
+
diff --git a/brother-dcp365cn.install b/brother-dcp365cn.install
new file mode 100644
index 000000000000..d76499a308ce
--- /dev/null
+++ b/brother-dcp365cn.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcp365cn/inf/setupPrintcapij dcp365cn -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcp365cn/cupswrapper/cupswrapperdcp365cn
+
+ systemctl restart cups.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcp365cn/inf/setupPrintcapij dcp365cn -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcp365cn/cupswrapper/cupswrapperdcp365cn -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..4b646d3d2e26
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcp365cn/inf/setupPrintcapij.old 2011-10-12 09:08:53.000000000 +0200
++++ opt/brother/Printers/dcp365cn/inf/setupPrintcapij 2021-09-02 21:00:03.689999775 +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
+