diff options
author | Mario Preksavec <mario@slackware.hr> | 2014-11-02 12:06:37 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-11-02 12:12:35 +0700 |
commit | 3df6142fda67ba5b027ef2539c714c749991b3b2 (patch) | |
tree | 47c205008ec332edae64cee5741aa48252003e57 /system/cndrvcups-capt | |
parent | f44ae903b13fdc7904a0d9fb85ae5b1579e34239 (diff) | |
download | slackbuilds-3df6142fda67ba5b027ef2539c714c749991b3b2.tar.gz slackbuilds-3df6142fda67ba5b027ef2539c714c749991b3b2.tar.xz |
system/cndrvcups-capt: Added (Canon CAPT Printer Driver).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/cndrvcups-capt')
-rw-r--r-- | system/cndrvcups-capt/README | 7 | ||||
-rw-r--r-- | system/cndrvcups-capt/README.SLACKWARE | 17 | ||||
-rw-r--r-- | system/cndrvcups-capt/cndrvcups-capt.SlackBuild | 239 | ||||
-rw-r--r-- | system/cndrvcups-capt/cndrvcups-capt.info | 10 | ||||
-rw-r--r-- | system/cndrvcups-capt/doinst.sh | 26 | ||||
-rw-r--r-- | system/cndrvcups-capt/ppapdata.c.diff | 10 | ||||
-rw-r--r-- | system/cndrvcups-capt/slack-desc | 19 |
7 files changed, 328 insertions, 0 deletions
diff --git a/system/cndrvcups-capt/README b/system/cndrvcups-capt/README new file mode 100644 index 00000000000..06da58eb9a1 --- /dev/null +++ b/system/cndrvcups-capt/README @@ -0,0 +1,7 @@ +Canon CAPT Printer Driver for Linux + +This CAPT printer driver provides printing functions for Canon LBP printers +operating under the CUPS (Common UNIX Printing System) environment. + +This package contains parts that are binary only and compiled on a 32bit +system. To get it up and running on 64bit, you will need multilib installed. diff --git a/system/cndrvcups-capt/README.SLACKWARE b/system/cndrvcups-capt/README.SLACKWARE new file mode 100644 index 00000000000..3b6414c2b8c --- /dev/null +++ b/system/cndrvcups-capt/README.SLACKWARE @@ -0,0 +1,17 @@ +Here's an a quick example on how I added my printer: + + lpadmin -p Canon_LBP7210Cdn \ + -P /usr/share/cups/model/CNCUPSLBP7210CCAPTK.ppd \ + -v ccp://localhost:59687 -E + + ccpdadmin -p Canon_LBP7210Cdn -o net:192.168.0.215 + +Make the service autostart: + + if [ -x /etc/rc.d/rc.ccpd ]; then + /etc/rc.d/rc.ccpd start + fi + +To check status of the printer, use: + + captstatusui -P Canon_LBP7210Cdn diff --git a/system/cndrvcups-capt/cndrvcups-capt.SlackBuild b/system/cndrvcups-capt/cndrvcups-capt.SlackBuild new file mode 100644 index 00000000000..1825f0920bb --- /dev/null +++ b/system/cndrvcups-capt/cndrvcups-capt.SlackBuild @@ -0,0 +1,239 @@ +#!/bin/sh + +# Slackware build script for cndrvcups-capt + +# Copyright 2014 Mario Preksavec, Zagreb, HR +# 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. + +PRGNAM=cndrvcups-capt +VERSION=${VERSION:-2.60} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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-1.tar.gz +cd $PRGNAM-$VERSION-1 +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 {} \; + +# Fix missing include +patch -p1 <$CWD/ppapdata.c.diff + +( + cd driver + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --disable-static + make + make install DESTDIR=$PKG +) + +( + cd backend + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} + make + make install DESTDIR=$PKG +) + +( + cd pstocapt + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} + make + make install DESTDIR=$PKG +) + +( + cd pstocapt2 + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} + make + make install DESTDIR=$PKG +) + +( + cd pstocapt3 + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} + make + make install DESTDIR=$PKG +) + +( + cd ppd + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} + make + make install DESTDIR=$PKG +) + +( + cd statusui + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} + make + make install DESTDIR=$PKG +) + +( + cd cngplp + autoreconf -fi + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} + cd files + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./autogen.sh + cd ../../ + make + make install DESTDIR=$PKG +) + +mkdir -p $PKG/usr/{bin,sbin,lib} +mkdir -p $PKG/etc/rc.d +mkdir -p $PKG/usr/share/{caepcm,ccpd,captmon,captmon2,captemon,captfilter} + +install -m0755 -oroot -groot libs/captmon/captmon $PKG/usr/bin +install -m0755 -oroot -groot libs/captmon2/captmon2 $PKG/usr/bin +install -m0755 -oroot -groot libs/captfilter $PKG/usr/bin +install -m0755 -oroot -groot libs/captemon/captmon* $PKG/usr/bin +install -m0755 -oroot -groot libs/captdrv $PKG/usr/bin + +install -m0755 -oroot -groot libs${LIBDIRSUFFIX}/ccpd $PKG/usr/sbin +install -m0755 -oroot -groot libs${LIBDIRSUFFIX}/ccpdadmin $PKG/usr/sbin + +install -m0644 -oroot -groot samples/ccpd.conf $PKG/etc/ccpd.conf.new +install -m0755 -oroot -groot samples/ccpd $PKG/etc/rc.d/rc.ccpd.new + +install -m0644 -oroot -groot data/* $PKG/usr/share/caepcm +install -m0755 -oroot -groot libs/ccpddata/* $PKG/usr/share/ccpd +install -m0755 -oroot -groot libs/captemon/CNAC*.BIN $PKG/usr/share/ccpd +install -m0755 -oroot -groot libs/captmon/msgtable.xml $PKG/usr/share/captmon +install -m0755 -oroot -groot libs/captmon2/msgtable2.xml $PKG/usr/share/captmon2 +install -m0755 -oroot -groot libs/captemon/*.xml $PKG/usr/share/captemon +install -m0755 -oroot -groot libs/CnA*INK.DAT $PKG/usr/share/captfilter + +install -m0644 -oroot -groot libs/libcaptfilter.so.1.0.0 $PKG/usr/lib +install -m0644 -oroot -groot libs/libcaiocaptnet.so.1.0.0 $PKG/usr/lib +install -m0644 -oroot -groot libs/libcncaptnpm.so.2.0.1 $PKG/usr/lib +install -m0644 -oroot -groot libs/libcnaccm.so.1.0 $PKG/usr/lib + +( + cd $PKG/usr/lib + ln -sf libcaiocaptnet.so.1.0.0 libcaiocaptnet.so.1 + ln -sf libcaiocaptnet.so.1.0.0 libcaiocaptnet.so + ln -sf libcncaptnpm.so.2.0.1 libcncaptnpm.so.2 + ln -sf libcncaptnpm.so.2.0.1 libcncaptnpm.so + ln -sf libcaptfilter.so.1.0.0 libcaptfilter.so.1 + ln -sf libcaptfilter.so.1.0.0 libcaptfilter.so + ln -sf libcnaccm.so.1.0 libcnaccm.so.1 + ln -sf libcnaccm.so.1.0 libcnaccm.so +) + +( + if [ -d $PKG/usr/lib64/cups ]; then + mkdir -p $PKG/usr/lib/cups/{backend,filter} + cd $PKG/usr/lib/cups/backend + ln -sf ../../../lib64/cups/backend/ccp ccp + cd $PKG/usr/lib/cups/filter + ln -sf ../../../lib64/cups/filter/pstocapt pstocapt + ln -sf ../../../lib64/cups/filter/pstocapt2 pstocapt2 + ln -sf ../../../lib64/cups/filter/pstocapt3 pstocapt3 + fi +) + +mkdir -p $PKG/var/captmon +chown lp:lp $PKG/var/captmon + +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 $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING LICENSE* README* $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/system/cndrvcups-capt/cndrvcups-capt.info b/system/cndrvcups-capt/cndrvcups-capt.info new file mode 100644 index 00000000000..2ac6a5e0067 --- /dev/null +++ b/system/cndrvcups-capt/cndrvcups-capt.info @@ -0,0 +1,10 @@ +PRGNAM="cndrvcups-capt" +VERSION="2.60" +HOMEPAGE="http://www.canon.com/" +DOWNLOAD="http://mirror.slackware.hr/sources/canon/cndrvcups-capt-2.60-1.tar.gz" +MD5SUM="a621e2f6d42b8c130a6e46b9790e6ea1" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="cndrvcups-common" +MAINTAINER="Mario Preksavec" +EMAIL="mario at slackware dot hr" diff --git a/system/cndrvcups-capt/doinst.sh b/system/cndrvcups-capt/doinst.sh new file mode 100644 index 00000000000..00d59401e10 --- /dev/null +++ b/system/cndrvcups-capt/doinst.sh @@ -0,0 +1,26 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.ccpd.new +config etc/ccpd.conf.new diff --git a/system/cndrvcups-capt/ppapdata.c.diff b/system/cndrvcups-capt/ppapdata.c.diff new file mode 100644 index 00000000000..cdb2df79a61 --- /dev/null +++ b/system/cndrvcups-capt/ppapdata.c.diff @@ -0,0 +1,10 @@ +--- cndrvcups-capt-2.60-1/statusui/src/ppapdata.c.orig 2013-06-27 03:18:49.000000000 +0200 ++++ cndrvcups-capt-2.60-1/statusui/src/ppapdata.c 2014-04-30 02:46:55.610352073 +0200 +@@ -23,6 +23,7 @@ + #include <string.h> + + #include <cups/cups.h> ++#include <cups/ppd.h> + #include "uimain.h" + #include "cnsktmodule.h" + diff --git a/system/cndrvcups-capt/slack-desc b/system/cndrvcups-capt/slack-desc new file mode 100644 index 00000000000..ea7e82e852b --- /dev/null +++ b/system/cndrvcups-capt/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------------------------------------------------------| +cndrvcups-capt: cndrvcups-capt (Canon CAPT Printer Driver for Linux) +cndrvcups-capt: +cndrvcups-capt: This CAPT printer driver provides printing functions for Canon LBP +cndrvcups-capt: printers operating under the CUPS (Common UNIX Printing System) +cndrvcups-capt: environment. +cndrvcups-capt: +cndrvcups-capt: +cndrvcups-capt: +cndrvcups-capt: +cndrvcups-capt: +cndrvcups-capt: |