summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlhark2020-11-24 22:53:24 +0100
committerlhark2020-11-24 22:53:24 +0100
commita78eb35d8fc91dc21f4a0feaba366d40d797d551 (patch)
tree7548c9ccebbf6e1afb2c6b2d10fb5f07ef8b40b9
downloadaur-brother-dcp-l2530dw.tar.gz
Tweak the brother-dcp-l2550dw installer for the DCP L2530DW
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD42
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b66d034446e9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = brother-dcp-l2530dw
+ pkgdesc = LPR and CUPS driver for the Brother DCP-L2530DW printer
+ pkgver = 4.0.0
+ pkgrel = 1
+ url = https://support.brother.com/g/b/downloadhowto.aspx?c=fr&lang=fr&prod=dcpl2530dw_eu&os=127&dlid=dlf103517_000&flang=4&type3=10282
+ arch = i686
+ arch = x86_64
+ groups = base-devel
+ license = EULA
+ source = https://download.brother.com/welcome/dlf103517/dcpl2530dwpdrv-4.0.0-1.i386.rpm
+ md5sums = a8f84171ee1796fc4899579d92df0e24
+
+pkgname = brother-dcp-l2530dw
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2179fdcf2564
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: lhark <lhark at hotmail dot fr>
+
+pkgname=brother-dcp-l2530dw
+pkgver=4.0.0
+pkgrel=1
+pkgdesc="LPR and CUPS driver for the Brother DCP-L2530DW printer"
+arch=("i686" "x86_64")
+url="https://support.brother.com/g/b/downloadhowto.aspx?c=fr&lang=fr&prod=dcpl2530dw_eu&os=127&dlid=dlf103517_000&flang=4&type3=10282"
+license=("EULA")
+groups=("base-devel")
+source=("https://download.brother.com/welcome/dlf103517/dcpl2530dwpdrv-4.0.0-1.i386.rpm")
+md5sums=('a8f84171ee1796fc4899579d92df0e24')
+
+package() {
+ # This package is based off of the brother-mfc-l2710dw package due to the identical packaging. All credit should go to enginefeeder101 for the script.
+
+ _model="DCPL2530DW"
+
+ # 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/"
+}