wok-current annotate ufr2/receipt @ rev 20144

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