summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZulkar2017-08-26 21:24:46 +0200
committerZulkar2017-08-26 21:24:46 +0200
commite85389d2feb6e2fb5d188e34a727b5dd8a980cf6 (patch)
treeec0523aba8bbf9cb76f8f04838e8eed3871a5bde
downloadaur-brother-dcp-j515w.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD39
-rw-r--r--brother-dcp-j515w.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..659b93f2a2fd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = brother-dcp-j515w
+ pkgdesc = Driver for the Brother DCP-J515W wifi multifuncional printer
+ pkgver = 1.1.3
+ pkgrel = 4
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-dcp-j515w.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ depends = a2ps
+ depends = cups
+ source = fix_lp.patch
+ source = http://www.brother.com/pub/bsc/linux/dlf/dcpj515wlpr-1.1.3-1.i386.rpm
+ source = http://www.brother.com/pub/bsc/linux/dlf/dcpj515wcupswrapper-1.1.3-1.i386.rpm
+ md5sums = 0f20e150ee454a9a129b88dd7eed19a9
+ md5sums = 020e78c217433eb373c973f30b579c87
+ md5sums = 59d8d466411fefaf593fdf448c35cec0
+
+pkgname = brother-dcp-j515w
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..444cd94e31e4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Contributor: Zulkar <mickael dot tessier 91 arobase gmail dot com>
+# Maintainer: Zulkar <mickael dot tessier 91 arobase gmail dot com>
+
+pkgname=brother-dcp-j515w
+pkgver=1.1.3
+pkgrel=4
+pkgdesc="Driver for the Brother DCP-J515W wifi multifuncional printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+depends=('a2ps' 'cups')
+install="brother-dcp-j515w.install"
+arch=('i686' 'x86_64')
+
+md5sums=('0f20e150ee454a9a129b88dd7eed19a9'
+ '020e78c217433eb373c973f30b579c87'
+ '59d8d466411fefaf593fdf448c35cec0')
+
+source=(
+ "fix_lp.patch" \
+ "http://www.brother.com/pub/bsc/linux/dlf/dcpj515wlpr-$pkgver-1.i386.rpm" \
+ "http://www.brother.com/pub/bsc/linux/dlf/dcpj515wcupswrapper-$pkgver-1.i386.rpm"
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/dcpj515w/cupswrapper/cupswrapperdcpj515w
+}
+
+package()
+{
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpj515w "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcp-j515w.install b/brother-dcp-j515w.install
new file mode 100644
index 000000000000..092810fb196a
--- /dev/null
+++ b/brother-dcp-j515w.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpj515w/inf/setupPrintcapij dcpj515w -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj515w/cupswrapper/cupswrapperdcpj515w
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpj515w/inf/setupPrintcapij dcpj515w -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj515w/cupswrapper/cupswrapperdcpj515w -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..c18bcaf7b607
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpj515w/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/dcpj515w/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
+