summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJnogueira2016-02-08 23:43:45 +0000
committerJnogueira2016-02-08 23:43:45 +0000
commitc1a1e3362cc8fadab7b776ea84015f19b325afb0 (patch)
treef0d098ad9a0f8f5ebcce617e0ede60d5c5489992
downloadaur-c1a1e3362cc8fadab7b776ea84015f19b325afb0.tar.gz
First commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD64
-rw-r--r--brother-mfc-j6920dw.install26
3 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..125bcfe6f827
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Mon Feb 8 23:40:57 UTC 2016
+pkgbase = brother-mfc-j6920dw
+ pkgdesc = Driver for the Brother MFC-J6920DW printer
+ pkgver = 3.0.0
+ pkgrel = 1
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-mfc-j6920dw.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ makedepends = rpmextract
+ depends = a2ps
+ depends = cups
+ source = http://www.brother.com/pub/bsc/linux/dlf/mfcj6920dwlpr-3.0.0-1.i386.rpm
+ source = http://www.brother.com/pub/bsc/linux/dlf/mfcj6920dwcupswrapper-3.0.0-1.i386.rpm
+ md5sums = 6bc2cce4909849fe1f248a3a511421a6
+ md5sums = 1820c6bbec17476a6c03699eeaf3e85a
+
+pkgname = brother-mfc-j6920dw
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..beaf801b2008
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Jnogueira <jnogueira at yandex dot com>
+# Based on the DCP-J552DW PKGBUILD -> Marius Rejdak <mariuswol at gmail dot com>
+_Bmodel=mfc
+_Bversion=j6920dw
+pkgver=3.0.0
+pkgrel=1
+_pkgname=${_Bmodel}${_Bversion}
+pkgname=brother-${_Bmodel}-${_Bversion}
+pkgdesc="Driver for the Brother ${_Bmodel^^}-${_Bversion^^} printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+depends=('a2ps' 'cups')
+makedepends=('rpmextract')
+arch=('i686' 'x86_64')
+
+md5sums=('6bc2cce4909849fe1f248a3a511421a6'
+ '1820c6bbec17476a6c03699eeaf3e85a')
+
+source=(
+ "http://www.brother.com/pub/bsc/linux/dlf/${_pkgname}lpr-${pkgver}-${pkgrel}.i386.rpm" \
+ "http://www.brother.com/pub/bsc/linux/dlf/${_pkgname}cupswrapper-${pkgver}-${pkgrel}.i386.rpm"
+)
+
+cat <<EOF > "${startdir}/${pkgname}.install"
+post_install() {
+ # lpr
+ /opt/brother/Printers/${_pkgname}/inf/setupPrintcapij ${_pkgname} -i
+
+ # cupswrapper
+ /opt/brother/Printers/${_pkgname}/cupswrapper/cupswrapper${_pkgname}
+
+ systemctl restart org.cups.cupsd
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/${_pkgname}/inf/setupPrintcapij ${_pkgname} -e
+
+ # cupswrapper
+ /opt/brother/Printers/${_pkgname}/cupswrapper/cupswrapper${_pkgname} -e
+}
+
+op=\$1
+shift
+
+\$op "\$@"
+EOF
+
+install="${pkgname}.install"
+
+build() {
+ sed -i -e 's:chown lp $SPOOLER_NAME:chown root $SPOOLER_NAME:g' $srcdir/opt/brother/Printers/${_pkgname}/inf/setupPrintcapij
+}
+
+package() {
+ install -d "$pkgdir"/usr/bin
+ install -d "$pkgdir"/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_${_pkgname} "$pkgdir"/usr/bin/
+ cp -R "$srcdir"/opt "$pkgdir"/opt
+}
diff --git a/brother-mfc-j6920dw.install b/brother-mfc-j6920dw.install
new file mode 100644
index 000000000000..2b7178237087
--- /dev/null
+++ b/brother-mfc-j6920dw.install
@@ -0,0 +1,26 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/mfcj6920dw/inf/setupPrintcapij mfcj6920dw -i
+
+ # cupswrapper
+ /opt/brother/Printers/mfcj6920dw/cupswrapper/cupswrappermfcj6920dw
+
+ systemctl restart org.cups.cupsd
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/mfcj6920dw/inf/setupPrintcapij mfcj6920dw -e
+
+ # cupswrapper
+ /opt/brother/Printers/mfcj6920dw/cupswrapper/cupswrappermfcj6920dw -e
+}
+
+op=$1
+shift
+
+$op "$@"