summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Nych2021-08-05 19:22:14 +0200
committerAdam Nych2021-08-05 19:22:14 +0200
commitdbeacf7288ec86f8549e770acc39ee464120a3ed (patch)
treefc20d1f91b164902f33f4bf3a8cdec78b07a8e2c
downloadaur-dbeacf7288ec86f8549e770acc39ee464120a3ed.tar.gz
Initilize the package
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD43
-rw-r--r--brother-dcpj100.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 000000000000..55e8849aba63
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = brother-dcpj100
+ pkgdesc = Driver for the Brother DCP-J100 multifuncional printer
+ pkgver = 3.0.0
+ pkgrel = 3
+ url = http://solutions.brother.com/linux/en_us/index.html
+ install = brother-dcpj100.install
+ arch = i686
+ arch = x86_64
+ license = custom:brother
+ depends = a2ps
+ depends = cups
+ source = fix_lp.patch
+ source = https://download.brother.com/welcome/dlf100906/dcpj100lpr-3.0.0-1.i386.rpm
+ source = https://download.brother.com/welcome/dlf100908/dcpj100cupswrapper-3.0.0-1.i386.rpm
+ md5sums = ee9f4388a008467c4f65f5aa3883c764
+ md5sums = c5add66bcef0f7d95498c44d2c7ba68a
+ md5sums = 33486e8669dd77b0b88711d1b84218fd
+
+pkgname = brother-dcpj100
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..93b0f54d9828
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Contributor: Alessio Bianchi <venator85@gmail.com>
+# Contributor: Jacek Roszkowski <j.roszk@gmail.com>
+# Contributor: Javier Cordero <jneight@gmail.com>
+# Contributor: M. Arnout <marnout at free.fr>
+# Contributor: Adam Nych <adam@nych.me>
+# Maintainer: Adam Nych <adam@nych.me>
+
+pkgname=brother-dcpj100
+pkgver=3.0.0
+pkgrel=3
+pkgdesc="Driver for the Brother DCP-J100 multifuncional printer"
+url="http://solutions.brother.com/linux/en_us/index.html"
+license=('custom:brother')
+depends=('a2ps' 'cups')
+install="brother-dcpj100.install"
+arch=('i686' 'x86_64')
+
+md5sums=('ee9f4388a008467c4f65f5aa3883c764'
+ 'c5add66bcef0f7d95498c44d2c7ba68a'
+ '33486e8669dd77b0b88711d1b84218fd')
+
+source=(
+ "fix_lp.patch" \
+ "https://download.brother.com/welcome/dlf100906/dcpj100lpr-$pkgver-1.i386.rpm" \
+ "https://download.brother.com/welcome/dlf100908/dcpj100cupswrapper-$pkgver-1.i386.rpm"
+)
+
+build() {
+ cd "$srcdir"
+ patch -Np0 < fix_lp.patch
+}
+
+post_install() {
+ /opt/brother/Printers/dcpj100/cupswrapper/cupswrapperdcpj100
+}
+
+package()
+{
+ install -d $pkgdir/usr/bin
+ install -d $pkgdir/var/spool/lpd
+ install -Dm755 "$srcdir"/usr/bin/brprintconf_dcpj100 "$pkgdir"/usr/bin/
+ cp -R $srcdir/opt $pkgdir/opt
+}
diff --git a/brother-dcpj100.install b/brother-dcpj100.install
new file mode 100644
index 000000000000..54d05408cec1
--- /dev/null
+++ b/brother-dcpj100.install
@@ -0,0 +1,27 @@
+post_install() {
+ # lpr
+ /opt/brother/Printers/dcpj100/inf/setupPrintcapij dcpj100 -i
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj100/cupswrapper/cupswrapperdcpj100
+
+ systemctl restart org.cups.cupsd.service
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ # lpr
+ /opt/brother/Printers/dcpj100/inf/setupPrintcapij dcpj100 -e
+
+ # cupswrapper
+ /opt/brother/Printers/dcpj100/cupswrapper/cupswrapperdcpj100 -e
+}
+
+op=$1
+shift
+
+$op "$@"
+
diff --git a/fix_lp.patch b/fix_lp.patch
new file mode 100644
index 000000000000..88e0b3fc095f
--- /dev/null
+++ b/fix_lp.patch
@@ -0,0 +1,11 @@
+--- opt/brother/Printers/dcpj100/inf/setupPrintcapij.old 2008-09-15 22:01:07.000000000 +0200
++++ opt/brother/Printers/dcpj100/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
+