diff options
author | Matt Kline | 2016-09-01 20:46:42 -0700 |
---|---|---|
committer | Matt Kline | 2016-09-01 22:07:33 -0700 |
commit | 355e492a05387c39a6969cce7a54a49ec2e7ba86 (patch) | |
tree | b31fa14124ae693372611395f656b22b8689c6f5 | |
download | aur-355e492a05387c39a6969cce7a54a49ec2e7ba86.tar.gz |
Here goes nothing.
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | brother-hl3180cdw.install | 9 | ||||
-rw-r--r-- | brother-hl3180cdw.patch | 46 |
5 files changed, 125 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5581fd8d9bae --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +# Generated by mksrcinfo v8 +# Fri Sep 2 03:47:25 UTC 2016 +pkgbase = brother-hl3180cdw + pkgdesc = LPR and CUPS driver for the Brother HL-318CDW + pkgver = 1.1.4 + pkgrel = 1 + url = https://github.com/khaledhosny/xits-math + install = brother-hl3180cdw.install + arch = i686 + arch = x86_64 + license = custom:brother + depends = cups + source = brother-hl3180cdw.patch + source = http://download.brother.com/welcome/dlf102680/hl3180cdwlpr-1.1.3-0.i386.rpm + source = http://download.brother.com/welcome/dlf102681/hl3180cdwcupswrapper-1.1.4-0.i386.rpm + md5sums = a4f5c5ce72cb1ba09f7f86a23b4ecd4e + md5sums = 1b34a004a808e7149419e04e8a31d5c3 + md5sums = faf5cd7771c5ef0939d0e37fd16506d6 + depends_x86_64 = lib32-glibc + +pkgname = brother-hl3180cdw + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..1c7d732a03bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/ +pkg/ +*.pkg.tar.xz +*.rpm diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0e8d3587d850 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: Matt Kline <matt@bitbashing.io> +pkgname='brother-hl3180cdw' +pkgver=1.1.4 +pkgrel=1 +pkgdesc="LPR and CUPS driver for the Brother HL-318CDW" +arch=('any') +url="https://github.com/khaledhosny/xits-math" +license=('custom:brother') +depends=('cups') +arch=('i686' 'x86_64') +depends_x86_64=('lib32-glibc') +install='brother-hl3180cdw.install' +source=( + 'brother-hl3180cdw.patch' + 'http://download.brother.com/welcome/dlf102680/hl3180cdwlpr-1.1.3-0.i386.rpm' + 'http://download.brother.com/welcome/dlf102681/hl3180cdwcupswrapper-1.1.4-0.i386.rpm' +) +md5sums=('14bd3e7abdc7783b6c7ad2ced3707b8c' + '1b34a004a808e7149419e04e8a31d5c3' + 'faf5cd7771c5ef0939d0e37fd16506d6') + +prepare() { + cd "$srcdir/opt/" || return 1 + patch -p1 < ../brother-hl3180cdw.patch + # Replace /opt/brother/Printers/ with /usr/share/brother + cd "$srcdir/opt/brother/Printers/hl3180cdw" || return 1 + sed -i 's%opt/brother/\(Printers\|${device_model}\)%usr/share/brother%g' \ + cupswrapper/cupswrapperhl3180cdw inf/setupPrintcapij lpd/filterhl3180cdw + + cd "$srcdir" || return 1 + "$srcdir/opt/brother/Printers/hl3180cdw/cupswrapper/cupswrapperhl3180cdw" +} + +package() { + # Copy over drivers and cups wrapper files + mkdir -p "$pkgdir/usr/share" + cp -r "$srcdir/opt/brother/Printers" "$pkgdir/usr/share/brother" + # Strip out the script we just ran and the PPD + rm "$pkgdir/usr/share/brother/hl3180cdw/cupswrapper/cupswrapperhl3180cdw" + mv "$pkgdir/usr/share/brother/hl3180cdw/cupswrapper/brother_hl3180cdw_printer_en.ppd" ppd_file + # Install the PPD and filter. + install -m 644 -D ppd_file "$pkgdir/usr/share/cups/model/brother_hl3180cdw_printer_en.ppd" + install -m 755 -D wrapper "$pkgdir/usr/lib/cups/filter/brother_lpdwrapper_hl3180cdw" +} diff --git a/brother-hl3180cdw.install b/brother-hl3180cdw.install new file mode 100644 index 000000000000..59850e941f0b --- /dev/null +++ b/brother-hl3180cdw.install @@ -0,0 +1,9 @@ +post_install() { + echo "This package does not currently install the printer for you." + echo "Do so via the usual CUPS web interface at localhost:631." +} + +post_remove() { + echo "This package does not uninstall the printer from CUPS for you." + echo "Do so via the usual CUPS web interface at localhost:631." +} diff --git a/brother-hl3180cdw.patch b/brother-hl3180cdw.patch new file mode 100644 index 000000000000..6c4672afa07d --- /dev/null +++ b/brother-hl3180cdw.patch @@ -0,0 +1,46 @@ +--- old_opt/brother/Printers/hl3180cdw/cupswrapper/cupswrapperhl3180cdw 2016-01-25 23:58:45.000000000 -0800 ++++ new_opt/brother/Printers/hl3180cdw/cupswrapper/cupswrapperhl3180cdw 2016-09-01 20:41:42.525560282 -0700 +@@ -23,8 +23,9 @@ + device_name=`echo $printer_name | eval sed -e 's/MFC/MFC-/' -e 's/DCP/DCP-/' -e 's/HL/HL-/' -e 's/FAX/FAX-/'` + pcfilename=`echo $printer_name | tr -d '[A-Z]'` + device_model="Printers" +-tmp_filter=/var/tmp/brother_lpdwrapper_${printer_model} ++tmp_filter=wrapper + ++if false; then + if [ -d "/usr/share/cups/model" ]; then + mkdir -p /usr/share/cups/model/Brother + else +@@ -102,6 +103,7 @@ + fi + fi + ++fi + # + # create temporary CUPS Filter + # +@@ -148,7 +150,7 @@ + PPDC=\`echo \$PPDC | sed -e 's/PPD=//'\` + + if [ "\$PPDC" = "" ]; then +- PPDC="/usr/share/cups/model/Brother/brother_${printer_model}_printer_en.ppd" ++ PPDC="/usr/share/cups/model/brother_${printer_model}_printer_en.ppd" + fi + + +@@ -263,6 +265,7 @@ + + chmod 755 $tmp_filter + ++if false; then + # + # check /usr/lib/cups/filter + # +@@ -351,6 +354,7 @@ + + echo lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name + lpadmin -p ${printer_name} -E -v $URI -P $ppd_file_name ++fi + + exit 0 + |