# HG changeset patch # User Rohit Joshi # Date 1259933490 0 # Node ID 925caa2692f7c432ed30fb10f0dbbd9f5ae4e422 # Parent 7ce7af3a492bf3cec77bf20d8dcdc50a92764727 Add ufr2 (canon printer drivers) diff -r 7ce7af3a492b -r 925caa2692f7 ufr2/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ufr2/receipt Fri Dec 04 13:31:30 2009 +0000 @@ -0,0 +1,110 @@ +# SliTaz package receipt. + +PACKAGE="ufr2" +VERSION="1.80" +CATEGORY="system-tools" +MAINTAINER="jozee@slitaz.org" +SHORT_DESC="Canon URF2 driver with support for LBP, iR and MF series printers" +WEB_SITE="http://www.canon.com.au/pps/colour/imagepress_c1_drivers.aspx" +DEPENDS="cups cairo cndrvcups-common" +BUILD_DEPENDS="autoconf automake cairo-dev gtk+-dev cndrvcups-common-dev" +SOURCE="ufr2linuxv180" +TARBALL="${SOURCE}.zip" +WGET_URL="http://www.service.canon.com.au/drivers/files/$TARBALL" +TAGS="" + +# Rules to configure and make the package. + +compile_rules() { + + src="$WOK/$PACKAGE/$SOURCE/Sources" + cd $src + + [ -d cndrvcups-lb-$VERSION ] || tar xzf cndrvcups-lb-${VERSION}-1.tar.gz + + cd $src/cndrvcups-lb-$VERSION/ppd && + ./autogen.sh --prefix=/usr \ + --enable-shared \ + --disable-static \ + --program-suffix="" \ + --program-prefix="" && + make && + make DESTDIR=$PWD/_pkg install + + cd $src/cndrvcups-lb-$VERSION/pstoufr2cpca + ./autogen.sh --prefix=/usr \ + --enable-progpath=/usr/bin \ + --libdir=/usr/lib \ + --program-suffix="" \ + --program-prefix="" && + make && + make DESTDIR=$PWD/_pkg install + +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib \ + $fs/usr/share/caepcm \ + $fs/usr/share/licenses/$PACKAGE \ + $fs/usr/lib/cups/filter + + + _pkg="$WOK/$PACKAGE/$SOURCE/Sources" + + cp -a $_pkg/cndrvcups-lb-$VERSION/libs/*.so* $fs/usr/lib + cp -a $_pkg/cndrvcups-lb-$VERSION/data/C* $fs/usr/share/caepcm + cp -a $_pkg/cndrvcups-lb-$VERSION/ppd/_pkg/usr/share/* $fs/usr/share/ + cp -a $_pkg/cndrvcups-lb-$VERSION/pstoufr2cpca/_pkg/usr/lib/cups/filter $fs/usr/lib/cups/filter + + # gzip all ppd files + find $fs/usr/share/cups/model -name "*.ppd" | xargs gzip -n9 + + + + # non-free license + cp -a $_pkg/cndrvcups-lb-$VERSION/LICENSE-ufr2-1.80E.txt $fs/usr/share/licenses/$PACKAGE + + cd $fs/usr/lib + ln -sf libcanonufr2.so.1.0.0 liblibcanonufr2.so.1 + ln -sf libcanonufr2.so.1.0.0 libcanonufr2.so + + ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1 + ln -sf libufr2filter.so.1.0.0 libufr2filter.so + + +} + +pre_install() +{ + echo "" + echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2" + echo "================================================================================" + echo "You are installing a package with proprietary license." + echo "You must accept the license." + echo "================================================================================" + echo "" + +} + +post_install() +{ + echo "" + echo -e "\033[1m CANON PRINTING LICENSE INFORMATION:\033[0m $2" + echo "================================================================================" + echo "For installing this package, you have to accept the $PACKAGE license." + echo "The license is stored in /usr/share/licenses/$PACKAGE " + echo -n "Would you like to read the license (y/N) : "; read anser + if [ "$anser" = "y" ]; then + cat /usr/share/licenses/"$PACKAGE"/LICENSE | more + echo "" + fi + echo "================================================================================" + echo -n "Do you accept the license (y/N) : "; read anser + if [ "$anser" = "N" ]; then + echo "You did not accept the license, Removing the pkg." + tazpkg remove "$PACKAGE" + fi + +}