diff options
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 38 |
2 files changed, 30 insertions, 11 deletions
@@ -1,7 +1,7 @@ pkgbase = brother-mfc-j805dw pkgdesc = CUPS and LPR driver for Brother mfc-JX05DW(XL) printer pkgver = 1.0.5 - pkgrel = 2 + pkgrel = 3 url = https://support.brother.com/g/b/faqtop.aspx?c=us&lang=en&prod=mfcj805dw_us arch = i686 arch = x86_64 @@ -14,4 +14,3 @@ pkgbase = brother-mfc-j805dw depends_x86_64 = lib32-gcc-libs pkgname = brother-mfc-j805dw - @@ -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" } |