Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system/brother-dcp8410-lpr: Added (Firmware for DCP-L8410CDW). #8765

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions system/brother-dcp8410-lpr/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
This provides the LPR (Line Printer Remote protocol) driver for
Brother DCP-L8410CDW printer. It's merely a repackaging of the
official "deb" package.

You can check if everything is in order by executing:
$ lpinfo -v
...
network lpd://BRWD0123456789A/BINARY_P1

If you plan to use CUPS by installing "brother-dcp8410-cups", then
no more steps are needed. CUPS will generate necessary lines in
/etc/printcap file and use its own spool directory.

If you decide, however, to use this package stand-alone, then you may
choose to set things up further, either by using the "setupPrintcapij"
script:
# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -i

Or manually:
# mkdir -p /var/spool/lpd/dcpl8410cdw
# chown lp /var/spool/lpd/dcpl8410cdw
# chgrp lp /var/spool/lpd/dcpl8410cdw
# cat <<EOF >> /etc/printcap
dcpl8410cdw:\\
:mx=0:\\
:sd=/var/spool/lpd/dcpl8410cdw:\\
:sh:\\
:lp=/dev/usb/lp0:\\
:if=/opt/brother/Printers/dcpl8410cdw/lpd/filter_dcpl8410cdw:
EOF

Take note of the "/dev/usb/lp0" value. This path is even hardcoded in
the "setupPrintcapij" script. You may need to change it according to
your needs.

For removal, you either reverse the manual steps or issue:
# /opt/brother/Printers/dcpl8410cdw/inf/setupPrintcapij dcpl8410cdw -e
96 changes: 96 additions & 0 deletions system/brother-dcp8410-lpr/brother-dcp8410-lpr.SlackBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/bin/bash

# Slackware build script for brother-dcp8410-lpr

# Copyright 2024 Shahab Vahedi, NL
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=brother-dcp8410-lpr
VERSION=${VERSION:-1.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi

case "$ARCH" in
i?86|x86*)
;;
*)
echo "Only x86 architectures are supported."
exit 1
;;
esac

if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi

TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $PKG
ar p $CWD/dcpl8410cdwlpr-${VERSION}-*.deb data.tar.gz | tar xvz

chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

INST_OPT=opt/brother/Printers/dcpl8410cdw

# Populate the $INST_OPT/lpd directory with the right ELF files.
# $ARCH was checked earlier to only cover x86 systems.
case "$ARCH" in
i?86) SRC=i686 ;;
x86_64) SRC=x86_64 ;;
esac
mv $INST_OPT/lpd/$SRC/* $INST_OPT/lpd/
rm -r $INST_OPT/lpd/{i686,x86_64}/

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p usr/doc/$PRGNAM-$VERSION
cat $CWD/README > usr/doc/$PRGNAM-$VERSION/README.maintainer
cat $CWD/$PRGNAM.SlackBuild > usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p install
cat $CWD/slack-desc > install/slack-desc
cat $CWD/doinst.sh > install/doinst.sh
cat $CWD/douninst.sh > install/douninst.sh

/sbin/makepkg -l y -c y $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
10 changes: 10 additions & 0 deletions system/brother-dcp8410-lpr/brother-dcp8410-lpr.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PRGNAM="brother-dcp8410-lpr"
VERSION="1.5.0"
HOMEPAGE="https://support.brother.com/g/b/producttop.aspx?c=eu_ot&lang=en&prod=dcpl8410cdw_eu"
DOWNLOAD="https://download.brother.com/welcome/dlf103239/dcpl8410cdwlpr-1.5.0-0.i386.deb"
MD5SUM="34a3275131b38d9688d5fd17d4e6d6f0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Shahab Vahedi"
EMAIL="list+sbo@vahedi.org"
2 changes: 2 additions & 0 deletions system/brother-dcp8410-lpr/doinst.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
( cd usr/bin && rm -rf brprintconf_dcpl8410cdw )
( cd usr/bin && ln -sf /opt/brother/Printers/dcpl8410cdw/lpd/brprintconf_dcpl8410cdw brprintconf_dcpl8410cdw )
1 change: 1 addition & 0 deletions system/brother-dcp8410-lpr/douninst.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
( cd usr/bin && unlink brprintconf_dcpl8410cdw )
19 changes: 19 additions & 0 deletions system/brother-dcp8410-lpr/slack-desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.

|-----handy-ruler------------------------------------------------------|
brother-dcp8410-lpr: brother-dcp8410-lpr (LPR driver)
brother-dcp8410-lpr:
brother-dcp8410-lpr: LPR driver for Brother laser printer DCP-L8410CDW.
brother-dcp8410-lpr:
brother-dcp8410-lpr:
brother-dcp8410-lpr:
brother-dcp8410-lpr:
brother-dcp8410-lpr:
brother-dcp8410-lpr:
brother-dcp8410-lpr:
brother-dcp8410-lpr: