summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChiwan Park2021-08-29 16:10:40 +0900
committerChiwan Park2021-08-29 16:10:40 +0900
commit03fb9edf1440a3cfc8d9a02fcdc75f04b45eb560 (patch)
treee66255e492c268b7e8ca162f54a79d38c0634386
downloadaur-03fb9edf1440a3cfc8d9a02fcdc75f04b45eb560.tar.gz
Initialize commit with package
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD43
-rw-r--r--brother-dcpt520w.install27
-rw-r--r--fix_lp.patch11
4 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..41e7f2f1f4ab
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = brother-dcpt520w
+ pkgdesc = Driver for the Brother DCP-T520W wifi multifuncional printer
+ pkgver = 3.5.0
+ pkgrel = 1
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-dcpt520w.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ depends = a2ps
+ depends = cups
+ depends = lib32-glibc
+ optdepends = sane: scanning support
+ optdepends = brscan4: making dcpt520w available to sane
+ optdepends = brscan-skey: scankey support if connected via usb
+ source = http://download.brother.com/welcome/dlf105173/dcpt520wpdrv-3.5.0-1.i386.rpm
+ source = fix_lp.patch
+ sha256sums = f096e7737b985209404d25ae25b862463c07fff67f31f807b68a188209c7b734
+ sha256sums = db4f8c1f9ad69aa0dbb53755e076ef60256f871f64c4d6179cd9e4d21c4625c1
+
+pkgname = brother-dcpt520w
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..60468feca17b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Chiwan Park <chiwanpark@hotmail.com>
+
+pkgname=brother-dcpt520w
+pkgver=3.5.0
+pkgrel=1
+pkgdesc="Driver for the Brother DCP-T520W wifi multifuncional printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+install="brother-dcpt520w.install"
+arch=('i686' 'x86_64')
+optdepends=('sane: scanning support'
+ 'brscan4: making dcpt520w available to sane'
+ 'brscan-skey: scankey support if connected via usb')
+
+if [[ "$CARCH" == "x86_64" ]] ; then
+ depends=('a2ps' 'cups' 'lib32-glibc')
+elif [[ "$CARCH" == "i686" ]] ; then
+ depends=('a2ps' 'cups')
+fi
+
+source=(
+ "http://download.brother.com/welcome/dlf105173/dcpt520wpdrv-$pkgver-$pkgrel.i386.rpm" \
+ "fix_lp.patch"
+)
+sha256sums=(
+ 'f096e7737b985209404d25ae25b862463c07fff67f31f807b68a188209c7b734' \
+ 'db4f8c1f9ad69aa0dbb53755e076ef60256f871f64c4d6179cd9e4d21c4625c1'
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/dcpt520w/cupswrapper/cupswrapperdcpt520w
+}
+
+package() {
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcpt520w.install b/brother-dcpt520w.install
new file mode 100644
index 000000000000..6c0ffbaf50d7
--- /dev/null
+++ b/brother-dcpt520w.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpt520w/inf/setupPrintcapij dcpt520w -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpt520w/cupswrapper/cupswrapperdcpt520w
+
+ systemctl restart org.cups.cups.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpt520w/inf/setupPrintcapij dcpt520w -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpt520w/cupswrapper/cupswrapperdcpt520w -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..f2efb4731bdf
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpt520w/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/dcpt520w/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
+