From 86a632af531b7d5c9b40554f1ddb20014fca66b3 Mon Sep 17 00:00:00 2001 From: Juan M. Lasca Date: Fri, 22 Apr 2022 21:35:38 +0700 Subject: system/brlaser: Added (CUPS driver for Brother laser printers). Signed-off-by: Willy Sudiarto Raharjo --- system/brlaser/README | 18 ++++++++ system/brlaser/brlaser.SlackBuild | 96 +++++++++++++++++++++++++++++++++++++++ system/brlaser/brlaser.info | 10 ++++ system/brlaser/slack-desc | 19 ++++++++ 4 files changed, 143 insertions(+) create mode 100644 system/brlaser/README create mode 100644 system/brlaser/brlaser.SlackBuild create mode 100644 system/brlaser/brlaser.info create mode 100644 system/brlaser/slack-desc diff --git a/system/brlaser/README b/system/brlaser/README new file mode 100644 index 0000000000..57aa60edaa --- /dev/null +++ b/system/brlaser/README @@ -0,0 +1,18 @@ +brlaser is a CUPS driver for Brother laser printers. + +Although most Brother printers support a standard printer language such +as PCL or PostScript, not all do. If you have a monochrome Brother +laser printer (or multi-function device) and the other open source +drivers don't work, this one might help. + +Works with the Following printers: +Lenovo M7605D +Brother DCP-1510 series, DCP-1600 series, DCP-7030, DCP-7040, DCP-7055, + DCP-7055W, DCP-7060D, DCP-7065DN, DCP-7080, DCP-L2500D series, + DCP-L2520D series, DCP-L2520DW series, DCP-L2540DW series, + HL-1110 series, HL-1200 series, HL-2030 series, HL-2140 series, + HL-2220 series, HL-2270DW series, HL-5030 series, + HL-L2300D series, HL-L2320D series, HL-L2340D series, + HL-L2360D series, HL-L2375DW series, HL-L2390DW, MFC-1910W, + MFC-7240, MFC-7360N, MFC-7365DN, MFC-7420, MFC-7460DN, + MFC-7840W, MFC-L2710DW series. diff --git a/system/brlaser/brlaser.SlackBuild b/system/brlaser/brlaser.SlackBuild new file mode 100644 index 0000000000..272b865153 --- /dev/null +++ b/system/brlaser/brlaser.SlackBuild @@ -0,0 +1,96 @@ +#!/bin/bash + +# Slackware build script for brlaser + +# Copyright 2022 Juan M. Lasca +# 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=brlaser +VERSION=${VERSION:-6} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +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 0555 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 0555 {} \; + +mkdir -p build +cd build + cmake \ + -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/brlaser/brlaser.info b/system/brlaser/brlaser.info new file mode 100644 index 0000000000..bab366784d --- /dev/null +++ b/system/brlaser/brlaser.info @@ -0,0 +1,10 @@ +PRGNAM="brlaser" +VERSION="6" +HOMEPAGE="https://github.com/pdewacht/brlaser" +DOWNLOAD="https://github.com/pdewacht/brlaser/archive/refs/tags/v6/brlaser-6.tar.gz" +MD5SUM="d4ac1bf8e66389013d2d458780ef4257" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Juan M. Lasca" +EMAIL="juanmlasca@gmail.com" diff --git a/system/brlaser/slack-desc b/system/brlaser/slack-desc new file mode 100644 index 0000000000..c28e7ea61e --- /dev/null +++ b/system/brlaser/slack-desc @@ -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------------------------------------------------------| +brlaser: brlaser (CUPS driver for Brother laser printers) +brlaser: +brlaser: Although most Brother printers support a standard printer language +brlaser: such as PCL or PostScript, not all do. If you have a monochrome +brlaser: Brother laser printer (or multi-function device) and the other open +brlaser: source drivers don't work, this one might help. +brlaser: +brlaser: +brlaser: +brlaser: +brlaser: -- cgit v1.2.3