summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Westover2021-06-02 16:46:45 -0400
committerBen Westover2021-06-02 16:46:45 -0400
commitac7ccecab57e2a18a3664b524a4c0c3a547563fe (patch)
tree62be595f306c232aa0d4dc917d654756cc3be0ba
downloadaur-ac7ccecab57e2a18a3664b524a4c0c3a547563fe.tar.gz
Initial Commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD42
-rw-r--r--brother-hll3270cdw.install11
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..041d3c35fbc0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = brother-hll3270cdw
+ pkgdesc = LPR and CUPS driver for the Brother HL-L3270CDW
+ pkgver = 1.0.2
+ pkgrel = 1
+ url = http://support.brother.com/g/b/downloadtop.aspx?c=us&lang=en&prod=hll3270cdw_us_eu_as
+ install = brother-hll3270cdw.install
+ arch = i686
+ arch = x86_64
+ license = custom:Brother commercial license
+ depends = cups
+ source = https://download.brother.com/welcome/dlf103945/hll3270cdwpdrv-1.0.2-0.i386.rpm
+ sha256sums = 18b479c8587430675d13e116dcf4e77010840ff47e61bc80d91c3ab87023abc1
+ depends_x86_64 = lib32-glibc
+
+pkgname = brother-hll3270cdw
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..94c39684f237
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Ben Westover <kwestover.kw@gmail.com>
+# based on https://aur.archlinux.org/packages/brother-mfc-l2710dw/
+pkgname='brother-hll3270cdw'
+pkgver='1.0.2'
+pkgrel=1
+pkgdesc='LPR and CUPS driver for the Brother HL-L3270CDW'
+url='http://support.brother.com/g/b/downloadtop.aspx?c=us&lang=en&prod=hll3270cdw_us_eu_as'
+arch=('i686' 'x86_64')
+license=('custom:Brother commercial license')
+depends=('cups')
+depends_x86_64=('lib32-glibc')
+install="$pkgname.install"
+source=("https://download.brother.com/welcome/dlf103945/hll3270cdwpdrv-$pkgver-0.i386.rpm")
+sha256sums=('18b479c8587430675d13e116dcf4e77010840ff47e61bc80d91c3ab87023abc1')
+
+package() {
+ _model="HLL3270CDW"
+
+ # using /usr/share instead of /opt
+ mkdir -p "$pkgdir/usr/share"
+ cp -R "$srcdir/opt/brother" "$pkgdir/usr/share"
+ sed -i 's|\\\/opt\\\/|\\\/usr\\\/|' "$pkgdir/usr/share/brother/Printers/$_model/cupswrapper/lpdwrapper"
+ sed -i 's|\\\/opt\\\/|\\\/usr\\\/|' "$pkgdir/usr/share/brother/Printers/$_model/lpd/lpdfilter"
+
+ # /etc/printcap is managed by cups
+ find "$pkgdir" -type f -name 'setupPrintcap*' -delete
+
+ # symlink for lpdwrapper so it correctly figures out the printer model from the path
+ install -d "$pkgdir/usr/lib/cups/filter/"
+ ln -s "/usr/share/brother/Printers/$_model/cupswrapper/lpdwrapper" "$pkgdir/usr/lib/cups/filter/brother_lpdwrapper_$_model"
+
+ # symlink for the PPD
+ install -d "$pkgdir/usr/share/cups/model/"
+ ln -s "/usr/share/brother/Printers/$_model/cupswrapper/brother-$_model-cups-en.ppd" "$pkgdir/usr/share/cups/model/"
+
+ # a couple architecture-specific symlinks
+ ln -s "/usr/share/brother/Printers/$_model/lpd/$CARCH/brprintconflsr3" "$pkgdir/usr/share/brother/Printers/$_model/lpd/"
+ ln -s "/usr/share/brother/Printers/$_model/lpd/$CARCH/rawtobr3" "$pkgdir/usr/share/brother/Printers/$_model/lpd/"
+
+ # symlink for inf because it tries to execute it there
+ ln -s "/usr/share/brother/Printers/$_model/inf" "$pkgdir/usr/share/brother/Printers/$_model/lpd/"
+}
diff --git a/brother-hll3270cdw.install b/brother-hll3270cdw.install
new file mode 100644
index 000000000000..374a38a451d4
--- /dev/null
+++ b/brother-hll3270cdw.install
@@ -0,0 +1,11 @@
+post_install() {
+ post_upgrade;
+}
+
+post_upgrade() {
+ echo "Restart CUPS (org.cups.cupsd.service) in order to load the new files."
+ echo "Register the new print at \"http://localhost:631/\"."
+ echo -e "\n To avoid errors like \"Unable to locate printer...\" when printing via network:"
+ echo " Add the printer with its socked address \"socket://<printer ip>:9100\""
+}
+