summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schreiner2015-10-15 22:45:15 +0200
committerAndreas Schreiner2015-10-15 22:45:15 +0200
commit9a2b8b7eb3779593ef3c8470b99229799839ac95 (patch)
treeca48634ce597fe5b2dc0d7d2a371fe9b1fe634c1
downloadaur-9a2b8b7eb3779593ef3c8470b99229799839ac95.tar.gz
Driver for the Brother MFC-9140 Multifunctional Printer/Scanner Series
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD29
-rw-r--r--brother-mfc-9140cdn.install12
3 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..195a60a246bc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = brother-mfc-9140cdn
+ pkgdesc = LPR and CUPS driver for the Brother MFC-9140CDN
+ pkgver = 1.1.2
+ pkgrel = 1
+ url = http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html
+ install = brother-mfc-9140cdn.install
+ arch = i686
+ arch = x86_64
+ license = unknown
+ depends = deb2targz
+ depends = perl
+ source = http://download.brother.com/welcome/dlf100405/mfc9140cdnlpr-1.1.2-1.i386.deb
+ source = http://download.brother.com/welcome/dlf100407/mfc9140cdncupswrapper-1.1.2-1.i386.deb
+ sha256sums = 90eae54a7201c369ddc6c3999af24c9c8de7b2c72061ba0773e8809da5451df3
+ sha256sums = 6eccd08ce0fb57f59def431114913c35c738c7497053dbf649efd1d041c3d919
+
+pkgname = brother-mfc-9140cdn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bab1f878864b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+model="9140cdn"
+pkgname="brother-mfc-$model"
+pkgver="1.1.2"
+pkgrel=1
+_revision=1
+pkgdesc="LPR and CUPS driver for the Brother MFC-9140CDN"
+url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
+arch=('i686' 'x86_64')
+license='unknown'
+install="brother-mfc-${model}.install"
+depends=('deb2targz' 'perl')
+source=("http://download.brother.com/welcome/dlf100405/mfc${model}lpr-${pkgver}-${_revision}.i386.deb"
+ "http://download.brother.com/welcome/dlf100407/mfc${model}cupswrapper-${pkgver}-${_revision}.i386.deb")
+sha256sums=('90eae54a7201c369ddc6c3999af24c9c8de7b2c72061ba0773e8809da5451df3'
+ '6eccd08ce0fb57f59def431114913c35c738c7497053dbf649efd1d041c3d919')
+
+package() {
+ deb2targz *.deb >/dev/null || return 1
+ rm -f *.deb || return 1
+ cd $srcdir || return 1
+ [ -d "mfc${model}" ] || (mkdir mfc${model} || return 1)
+ for i in *.tar.gz;do tar xfz $i -C mfc${model};done || return 1
+ cd mfc${model} || return 1
+ cd opt/brother/Printers/mfc${model} || return 1
+ perl -i -pe 's#/etc/init.d#/etc/rc.d#g' ./cupswrapper/cupswrappermfc${model} || return 1
+ perl -i -pe 's#printcap\.local#printcap#g' $srcdir/mfc${model}/opt/brother/Printers/mfc${model}/inf/setupPrintcapij || return 1
+ cp -rf $srcdir/mfc${model}/usr/ $pkgdir/ || return 1
+ cp -rf $srcdir/mfc${model}/opt/ $pkgdir/ || return 1
+}
diff --git a/brother-mfc-9140cdn.install b/brother-mfc-9140cdn.install
new file mode 100644
index 000000000000..db108148709d
--- /dev/null
+++ b/brother-mfc-9140cdn.install
@@ -0,0 +1,12 @@
+post_install() {
+ post_upgrade;
+}
+
+post_upgrade() {
+ /opt/brother/Printers/mfc9140cdn/cupswrapper/cupswrappermfc9140cdn >/dev/null
+ if [ "$?" -eq 0 ]; then
+ printf "\033[1m\033[32m\x3d\x3d\x3e\033\1330m Done. The printer should be visible now via the CUPS-webinterface (http://localhost:631)\n"
+ else
+ printf "\033[1m\032[32m\x3d\x3d\x3e\033\1330m Something went wrong...\n"
+ fi
+}