summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Zecher2017-09-03 18:30:55 -0300
committerMartin Zecher2017-09-03 18:30:55 -0300
commitb4daab0c6bfabde8bbb9c333324cdd24ad0a0330 (patch)
treef30101dd025e18322804c6fab9139c68329a36e9
downloadaur-b4daab0c6bfabde8bbb9c333324cdd24ad0a0330.tar.gz
first version
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD40
-rw-r--r--brother-dcpt300.install27
-rw-r--r--fix_lp.patch11
4 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..36a191d4e5a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = brother-dcpt300
+ pkgdesc = Driver for the Brother DCP-T300 multifuncional printer
+ pkgver = 3.0.2
+ pkgrel = 1
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-dcpt300.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ makedepends = rpmextract
+ depends = a2ps
+ depends = cups
+ depends = lib32-glibc
+ source = fix_lp.patch
+ source = http://download.brother.com/welcome/dlf101958/dcpt300lpr-3.0.2-0.i386.rpm
+ source = http://download.brother.com/welcome/dlf101959/dcpt300cupswrapper-3.0.2-0.i386.rpm
+ md5sums = 164dd5eaeb33bb89c5ba6a6a547b65b8
+ md5sums = a0299c04635a1db426f0d4c65200b3ab
+ md5sums = add52c42190a557a4294150a5a27905f
+
+pkgname = brother-dcpt300
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fb526197843
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Martin Zecher Magni <mzecher@gmail.com>
+# Strongly based on DCP-T500W PKGBUILD by Samuel Fernando Mesa Giraldo
+
+pkgname=brother-dcpt300
+pkgver=3.0.2
+pkgrel=1
+pkgdesc="Driver for the Brother DCP-T300 multifuncional printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+depends=('a2ps' 'cups' 'lib32-glibc')
+makedepends=('rpmextract')
+install="brother-dcpt300.install"
+arch=('i686' 'x86_64')
+
+md5sums=('164dd5eaeb33bb89c5ba6a6a547b65b8'
+ 'a0299c04635a1db426f0d4c65200b3ab'
+ 'add52c42190a557a4294150a5a27905f')
+
+source=(
+ "fix_lp.patch" \
+ "http://download.brother.com/welcome/dlf101958/dcpt300lpr-$pkgver-0.i386.rpm" \
+ "http://download.brother.com/welcome/dlf101959/dcpt300cupswrapper-$pkgver-0.i386.rpm"
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/dcpt300/cupswrapper/cupswrapperdcpt300
+}
+
+package()
+{
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpt300 "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcpt300.install b/brother-dcpt300.install
new file mode 100644
index 00000000000..e5d01956cfb
--- /dev/null
+++ b/brother-dcpt300.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpt300/inf/setupPrintcapij dcpt300 -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpt300/cupswrapper/cupswrapperdcpt300
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpt300/inf/setupPrintcapij dcpt300 -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpt300/cupswrapper/cupswrapperdcpt300 -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 00000000000..78730c6a72a
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpt300/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/dcpt300/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
+