summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSolomon Choina2021-06-30 15:51:32 -0400
committerSolomon Choina2021-06-30 15:51:32 -0400
commit6f8a7f4106c598447aa00bfdd67dabbe32f36e6d (patch)
tree65b7a0aec7ce300fba4122858adca11564e94f7d /PKGBUILD
parent73a0356d27631e511d6697f534bd9e3e2b8bf212 (diff)
downloadaur-brother-mfc-j805dw.tar.gz
update the pkgver
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD38
1 files changed, 29 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 80e7685768e3..9edd273be22b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Maintainer: Solomon Choina <shlomochoina@gmail.com>
pkgname=brother-mfc-j805dw
pkgver=1.0.5
-pkgrel=2
+pkgrel=3
pkgdesc="CUPS and LPR driver for Brother mfc-JX05DW(XL) printer"
arch=("i686" "x86_64")
depends_x86_64=('lib32-gcc-libs')
@@ -13,17 +13,37 @@ license=("EULA")
source=("https://download.brother.com/welcome/dlf104569/mfcj805dwpdrv-1.0.5-0.i386.deb")
sha256sums=('f299b9674d5edb9c16b5fdbfd39d9ed6b6618f2a30ad942181180e59d3e7a68d')
-package() {
- tar -xf data.tar.gz -C "$pkgdir"
+prepare() {
+ tar -xf data.tar.gz -C "$srcdir"
+ install -d $srcdir/usr/share/cups/model
+ install -d $srcdir/usr/lib/cups/filter
+
+ cd `find . -type d -name 'cupswrapper'`
+ if [ -f cupswrapper* ]; then
+ _wrapper_source=`ls cupswrapper*`
+ fi
+
- install -m 755 -d "$pkgdir"/usr/share/ppd/Brother/
- ln -s /opt/brother/Printers/mfcj805dw/cupswrapper/brother_mfcj805dw_printer_en.ppd "$pkgdir"/usr/share/ppd/Brother/
+ if [ ! -z $_wrapper_source ];then
+ sed -i '/^\/etc\/init.d\/cups/d' $_wrapper_source
+ sed -i '/^sleep/d' $_wrapper_source
+ sed -i '/^lpadmin/d' $_wrapper_source
+ sed -i 's|/usr|$srcdir/usr|g' $_wrapper_source
+ sed -i 's|/opt|$srcdir/opt|g' $_wrapper_source
+ sed -i 's|lpinfo|echo|g' $_wrapper_source
+ export srcdir=$srcdir
+ ./$_wrapper_source
+ sed -i 's|$srcdir||' $srcdir/usr/lib/cups/filter/*lpdwrapper*
+ sed -i "s|$srcdir||" $srcdir/usr/lib/cups/filter/*lpdwrapper*
+ rm $_wrapper_source
+ fi
- install -m 755 -d "$pkgdir"/usr/lib/cups/filter/
- ln -s /opt/brother/Printers/mfcj805dw/cupswrapper/brother_lpdwrapper_mfcj805dw "$pkgdir"/usr/lib/cups/filter/
- install -m 755 -d "$pkgdir"/usr/share/cups/Model/Brother/
- ln -s /opt/brother/Printers/mfcj805d/cupswrapper/brother_mfcj805dw_printer_en.ppd "$pkgdir"/usr/share/cups/Model/Brother/
+}
+package() {
+ cp -R $srcdir/usr "$pkgdir"
+
+ if [ -d $srcdir/opt ]; then cp -R $srcdir/opt $pkgdir; fi
install -D "$pkgdir"/opt/brother/Printers/mfcj805dw/LICENSE_ENG.txt "$pkgdir/usr/share/licenses/$pkgname"
}