wok annotate ufr2/receipt @ rev 12989

Up: db (5.3.21) and cross-compile for ARM
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jun 04 00:47:21 2012 +0200 (2012-06-04)
parents cd3b8f4f8405
children 9b6bb1d6033f
rev   line source
jozee@4556 1 # SliTaz package receipt.
jozee@4556 2
jozee@4556 3 PACKAGE="ufr2"
pankso@10689 4 VERSION="2.20"
jozee@4556 5 CATEGORY="system-tools"
jozee@4556 6 MAINTAINER="jozee@slitaz.org"
jozee@4556 7 SHORT_DESC="Canon URF2 driver with support for LBP, iR and MF series printers"
pankso@10689 8 SOURCE="UFR_II_Printer_Driver_for_Linux_V220_uk_EN"
pankso@10689 9 TARBALL="${SOURCE}.tar.gz"
jozee@4556 10 WEB_SITE="http://www.canon.com.au/pps/colour/imagepress_c1_drivers.aspx"
pankso@10689 11 WGET_URL="http://gdlp01.c-wss.com/gds/8/0100002708/03/$TARBALL"
jozee@4974 12 TAGS="printing printer drivers"
jozee@4556 13
pankso@10689 14 DEPENDS="cups cairo cndrvcups-common cups"
pankso@10689 15 BUILD_DEPENDS="autoconf automake cairo-dev gtk+-dev cndrvcups-common-dev cups-dev"
pankso@10689 16
jozee@4556 17 # Rules to configure and make the package.
pankso@10689 18 compile_rules()
pankso@10689 19 {
pankso@10689 20 #src="$WOK/$PACKAGE/$SOURCE/Sources"
jozee@4556 21 cd $src
jozee@4556 22
pankso@10689 23 [ -d cndrvcups-lb-$VERSION ] || tar xzf Sources/cndrvcups-lb-${VERSION}-1.tar.gz
jozee@4556 24
jozee@4556 25 cd $src/cndrvcups-lb-$VERSION/ppd &&
pankso@10689 26 ./autogen.sh \
pankso@10689 27 --prefix=/usr \
pankso@10689 28 --enable-shared \
pankso@10689 29 --disable-static \
pankso@10689 30 --program-suffix="" \
pankso@10689 31 --program-prefix="" &&
gokhlayeh@11574 32 make $MAKEFLAGS &&
pankso@10689 33 make DESTDIR=$DESTDIR install
jozee@4556 34
jozee@4556 35 cd $src/cndrvcups-lb-$VERSION/pstoufr2cpca
pankso@10689 36 ./autogen.sh \
pankso@10689 37 --prefix=/usr \
pankso@10689 38 --enable-progpath=/usr/bin \
pankso@10689 39 --libdir=/usr/lib \
pankso@10689 40 --program-suffix="" \
pankso@10689 41 --program-prefix="" &&
gokhlayeh@11574 42 make $MAKEFLAGS &&
pankso@10689 43 make DESTDIR=$DESTDIR install
jozee@4556 44 }
jozee@4556 45
jozee@4556 46 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@4556 47 genpkg_rules()
jozee@4556 48 {
pankso@10689 49 mkdir -p \
pankso@10689 50 $fs/usr/lib \
pankso@10689 51 $fs/usr/share/caepcm \
pankso@10689 52 $fs/usr/share/licenses/$PACKAGE \
pankso@10689 53 $fs/usr/lib/cups/filter
jozee@4556 54
pankso@10689 55 cp -a $src/cndrvcups-lb-$VERSION/libs/*.so* $fs/usr/lib
pankso@10689 56 cp -a $src/cndrvcups-lb-$VERSION/data/C* $fs/usr/share/caepcm
pankso@10689 57 cp -a $install/usr/share/* $fs/usr/share/
pankso@10689 58 cp -a $install/usr/lib/cups/filter $fs/usr/lib/cups/filter
jozee@4556 59
jozee@4556 60 # gzip all ppd files
jozee@4556 61 find $fs/usr/share/cups/model -name "*.ppd" | xargs gzip -n9
pankso@10689 62
pankso@10689 63 # non-free license
pankso@10689 64 cp -a $src/Documents/LICENSE-ufr2drv*.txt $fs/usr/share/licenses/$PACKAGE
jozee@4556 65
pankso@10689 66 cd $fs/usr/lib
pankso@10689 67 ln -sf libcanonufr2.so.1.0.0 liblibcanonufr2.so.1
pankso@10689 68 ln -sf libcanonufr2.so.1.0.0 libcanonufr2.so
pankso@10689 69 ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1
pankso@10689 70 ln -sf libufr2filter.so.1.0.0 libufr2filter.so
jozee@4556 71 }
jozee@4556 72
jozee@4556 73 pre_install()
jozee@4556 74 {
jozee@4556 75 echo ""
jozee@4556 76 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
jozee@4556 77 echo "================================================================================"
jozee@4556 78 echo "You are installing a package with proprietary license."
jozee@4556 79 echo "You must accept the license."
jozee@4556 80 echo "================================================================================"
jozee@4556 81 echo ""
jozee@4556 82 }
jozee@4556 83
jozee@4556 84 post_install()
jozee@4556 85 {
jozee@4556 86 echo ""
jozee@4556 87 echo -e "\033[1m CANON PRINTING LICENSE INFORMATION:\033[0m $2"
jozee@4556 88 echo "================================================================================"
jozee@4556 89 echo "For installing this package, you have to accept the $PACKAGE license."
jozee@4556 90 echo "The license is stored in /usr/share/licenses/$PACKAGE "
jozee@4556 91 echo -n "Would you like to read the license (y/N) : "; read anser
jozee@4556 92 if [ "$anser" = "y" ]; then
jozee@4556 93 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
jozee@4556 94 echo ""
jozee@4556 95 fi
jozee@4556 96 echo "================================================================================"
jozee@4556 97 echo -n "Do you accept the license (y/N) : "; read anser
jozee@4556 98 if [ "$anser" = "N" ]; then
jozee@4556 99 echo "You did not accept the license, Removing the pkg."
jozee@4556 100 tazpkg remove "$PACKAGE"
jozee@4556 101 fi
jozee@4556 102 }