summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Abel2018-03-24 15:02:23 +0100
committerBenjamin Abel2018-03-24 15:03:58 +0100
commit97db0142a30ab097c2375e59e0b775a24925e342 (patch)
treee8b2a5a3aa4fa8ea20b9a803a94388e62dc61353
parent915c8200315dc4e2d79d6694d988d6420d9f7929 (diff)
downloadaur-97db0142a30ab097c2375e59e0b775a24925e342.tar.gz
Patch ldpwrapper file as in mfcj5330
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
-rw-r--r--brother_lpdwrapper_mfcj5335dw.patch (renamed from brother-mfc-j5335dw.patch)4
3 files changed, 12 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 254e5f04b8c7..f834b1e05204 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,10 +16,12 @@ pkgbase = brother-mfc-j5335dw
source = http://download.brother.com/welcome/dlf103028/mfcj5335dwcupswrapper-1.0.1-0.i386.rpm
source = cupswrapper-license.txt
source = lpr-license.txt
+ source = brother_lpdwrapper_mfcj5335dw.patch
md5sums = bcf37fe0e9624ae9e3ce0554573d113f
md5sums = 40c5de6899b0c319f6187e23626e7c42
md5sums = 310f8424517f3df127d39393ceaebb6f
md5sums = bf894a1a51baf6055a6c58ecf43c9782
+ md5sums = a6ff0cd2d946f103b044eb6fdb31c669
depends_x86_64 = lib32-glibc
pkgname = brother-mfc-j5335dw
diff --git a/PKGBUILD b/PKGBUILD
index 9977203abc4d..0829ff5cc781 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,11 +17,13 @@ install="$pkgname.install"
source=("http://download.brother.com/welcome/dlf103004/mfcj5335dwlpr-$_brother_pkgver.i386.rpm"
"http://download.brother.com/welcome/dlf103028/mfcj5335dwcupswrapper-$_brother_pkgver.i386.rpm"
'cupswrapper-license.txt'
- 'lpr-license.txt')
+ 'lpr-license.txt'
+ 'brother_lpdwrapper_mfcj5335dw.patch')
md5sums=(bcf37fe0e9624ae9e3ce0554573d113f
40c5de6899b0c319f6187e23626e7c42
310f8424517f3df127d39393ceaebb6f
- bf894a1a51baf6055a6c58ecf43c9782)
+ bf894a1a51baf6055a6c58ecf43c9782
+ a6ff0cd2d946f103b044eb6fdb31c669)
prepare() {
# do not install in /usr/local
@@ -36,6 +38,9 @@ prepare() {
install -d "${srcdir}"/usr/share/cups/model
install -d "${srcdir}"/usr/lib/cups/filter
+ # patch an error (?) in the perl script from brother
+ patch -p1 "${srcdir}"/opt/brother/Printers/mfcj5335dw/cupswrapper/brother_lpdwrapper_mfcj5335dw < brother_lpdwrapper_mfcj5335dw.patch
+
# go to the cupswrapper directory and find the source file from which to generate a ppd and wrapperfile
cd `find . -type d -name 'cupswrapper'`
@@ -65,7 +70,7 @@ prepare() {
# patch filter for PDF printing to avoid error:
# ERROR: typecheck
# OFFENDING COMMAND: resourcestatus
- sed -i 's|pdf2ps|pdftocairo -q -ps|g' "${srcdir}"/opt/brother/Printers/mfcj5335dw/lpd/filtermfcj5335dw
+ sed -i 's|pdf2ps|pdftocairo -q -ps|g' "${srcdir}"/opt/brother/Printers/mfcj5335dw/lpd/filter_mfcj5335dw
}
package() {
diff --git a/brother-mfc-j5335dw.patch b/brother_lpdwrapper_mfcj5335dw.patch
index 4b862d4037fc..6bee212bbedc 100644
--- a/brother-mfc-j5335dw.patch
+++ b/brother_lpdwrapper_mfcj5335dw.patch
@@ -1,9 +1,9 @@
--- pkg/brother-mfcj5335dw/opt/brother/Printers/mfcj5335dw/cupswrapper/brother_lpdwrapper_mfcj5335dw 2016-08-17 07:39:28.000000000 +0200
-+++ brother-mfc-j5335dw.patch 2017-09-02 16:59:33.243622717 +0200
++++ brother_lpdwrapper_mfcj5335dw.patch 2018-03-24 16:59:33.243622717 +0200
@@ -89,6 +89,9 @@
$PRINTER =~ s/\/cupswrapper//g;
$PRINTER =~ s/\///g;
-
+
+my $PRINTER = "mfcj5335dw";
+my $basedir = "/opt/brother/Printers/mfcj5335dw";
+