summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoribilux2017-11-17 10:56:25 +0100
committeribilux2017-11-17 10:56:25 +0100
commita44b41057b56ab836477760af2717a591dd00473 (patch)
treebb0b6573fb6427d2b54e8e305e650621da8cbf05
downloadaur-a44b41057b56ab836477760af2717a591dd00473.tar.gz
initializing
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD44
-rw-r--r--brother-mfcj245.install27
-rw-r--r--fix_lp.patch11
4 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..cfeed5a1227
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = brother-mfcj245
+ pkgdesc = Driver for the Brother DCP-j245 wifi multifuncional printer
+ pkgver = 3.0.0
+ pkgrel = 1
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-mfcj245.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ makedepends = rpmextract
+ depends = a2ps
+ depends = cups
+ source = fix_lp.patch
+ source = http://www.brother.com/pub/bsc/linux/dlf/mfcj245lpr-3.0.0-1.i386.rpm
+ source = http://www.brother.com/pub/bsc/linux/dlf/mfcj245cupswrapper-3.0.0-1.i386.rpm
+ md5sums = b890daa9317b3cbec2e0a077b4be221f
+ md5sums = 514702c4b09b195a1a6fbe67f8327bd9
+ md5sums = 31c4664b7f0eb6751decf1d04819c100
+
+pkgname = brother-mfcj245
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..001a721b646
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Contributor: Alessio Bianchi <venator85@gmail.com>
+# Contributor: Jacek Roszkowski <j.roszk@gmail.com>
+# Contributor: Javier Cordero <jneight@gmail.com>
+# Contributor: Vieux Grognon <vieux@grognon.net>
+# Maintainer: Vieux Grognon <vieux@grognon.net>
+
+pkgname=brother-mfcj245
+pkgver=3.0.0
+pkgrel=1
+pkgdesc="Driver for the Brother DCP-j245 wifi multifuncional printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+depends=('a2ps' 'cups')
+makedepends=('rpmextract')
+install="brother-mfcj245.install"
+arch=('i686' 'x86_64')
+
+md5sums=('b890daa9317b3cbec2e0a077b4be221f'
+ '514702c4b09b195a1a6fbe67f8327bd9'
+ '31c4664b7f0eb6751decf1d04819c100')
+
+source=(
+ "./fix_lp.patch" \
+ "http://www.brother.com/pub/bsc/linux/dlf/mfcj245lpr-3.0.0-1.i386.rpm" \
+ "http://www.brother.com/pub/bsc/linux/dlf/mfcj245cupswrapper-3.0.0-1.i386.rpm"
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/mfcj245/cupswrapper/cupswrappermfcj245
+}
+
+package()
+{
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_mfcj245 "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
+
diff --git a/brother-mfcj245.install b/brother-mfcj245.install
new file mode 100644
index 00000000000..426f9a57b33
--- /dev/null
+++ b/brother-mfcj245.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/mfcj245/inf/setupPrintcapij mfcj245 -i
+
+ # cupswrapper
+ /opt/brother/Printers/mfcj245/cupswrapper/cupswrappermfcj245
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/mfcj245/inf/setupPrintcapij mfcj245 -e
+
+ # cupswrapper
+ /opt/brother/Printers/mfcj245/cupswrapper/cupswrappermfcj245 -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 00000000000..9d111986732
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/mfcj245/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/mfcj245/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
+