You are not logged in.

#1 2017-03-30 00:46:10

jmsimonetc
Member
Registered: 2017-03-30
Posts: 4

Brother MFC-J5330DW

Regards
I have been creating the package to run the Brother MFC-J5330DW, and everything works but when I have to print the Cup LOG says "Broken Pipe"
This is the content of the PKGBUILD.

pkgname="brother-mfc-j5330dw"
pkgver="1.0.0"
pkgrel=1
pkgdesc="LPR and CUPS driver for the Brother MFC-J5330DW"
arch=('i686' 'x86_64')
url="c"
license=('custom:Brother commercial license')
depends=('cups' 'ghostscript' 'poppler' 'a2ps' 'psutils')
depends_x86_64=('lib32-glibc')
install="$pkgname.install"
source=("http://download.brother.com/welcome/dlf103003/mfcj5330dwlpr-1.0.0-0.i386.rpm"
        "[url]http://download.brother.com/welcome/dlf103027/mfcj5330dwcupswrapper-1.0.0-0.i386.rpm[/url]"
        'cupswrapper-license.txt'
        'lpr-license.txt')
md5sums=('92C9369F3D33C56FA0FDF04F130EE467'
         '43DD807C6E7C94574E9B4FEAD5007319'
         '310f8424517f3df127d39393ceaebb6f'
         'bf894a1a51baf6055a6c58ecf43c9782')

prepare() {
  # do not install in /usr/local
  if [ -d "${srcdir}"/usr/local/Brother ]; then
    install -d "${srcdir}"/usr/share
    mv "${srcdir}"/usr/local/Brother/ "${srcdir}"/usr/share/Brother
    rm -rf "${srcdir}"/usr/local
    sed -i 's|/usr/local/Brother|/usr/share/Brother|g' `grep -lr '/usr/local/Brother' ./`
  fi

  # setup cups directories
  install -d "${srcdir}"/usr/share/cups/model
  install -d "${srcdir}"/usr/lib/cups/filter

  # go to the cupswrapper directory and find the source file from which to generate a ppd and wrapperfile
  cd `find . -type d -name 'cupswrapper'`

  if [ -f cupswrapper* ]; then
    _wrapper_source=`ls cupswrapper*`

    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|/model/Brother|/model|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

  # /etc/printcap is managed by cups
  rm `find "${srcdir}" -type f -name 'setupPrintcap*'`

  # 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/mfcj5330dw/lpd/filter_mfcj5330dw
}

package() {
  cp -R "${srcdir}"/usr "${pkgdir}"
  cp -R "${srcdir}"/opt "${pkgdir}"

  install -Dm644 cupswrapper-license.txt "${pkgdir}"/usr/share/licenses/"${pkgname}"/cupswrapper-licence.txt
  install -Dm644 lpr-license.txt         "${pkgdir}"/usr/share/licenses/"${pkgname}"/lpr-licence.txt
}

It is created from the package for the MFC-J5320DW, if someone lends me a hand and it works, I can upload the package to AUR.
Thank you,

Last edited by jmsimonetc (2017-03-30 07:48:07)

Offline

#2 2017-03-30 01:05:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Brother MFC-J5330DW

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-03-30 07:48:36

jmsimonetc
Member
Registered: 2017-03-30
Posts: 4

Re: Brother MFC-J5330DW

Done,
Thanks and sorry.

Offline

#4 2023-06-08 07:29:48

alexisju
Member
Registered: 2015-01-25
Posts: 10

Re: Brother MFC-J5330DW

Still using this printer?

Monochrome print works for me but not color print. Any idea?

Offline

Board footer

Powered by FluxBB