wok-stable rev 4556
Add ufr2 (canon printer drivers)
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Fri Dec 04 13:31:30 2009 +0000 (2009-12-04) |
parents | 7ce7af3a492b |
children | c3ba7c0d47f3 |
files | ufr2/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ufr2/receipt Fri Dec 04 13:31:30 2009 +0000 1.3 @@ -0,0 +1,110 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="ufr2" 1.7 +VERSION="1.80" 1.8 +CATEGORY="system-tools" 1.9 +MAINTAINER="jozee@slitaz.org" 1.10 +SHORT_DESC="Canon URF2 driver with support for LBP, iR and MF series printers" 1.11 +WEB_SITE="http://www.canon.com.au/pps/colour/imagepress_c1_drivers.aspx" 1.12 +DEPENDS="cups cairo cndrvcups-common" 1.13 +BUILD_DEPENDS="autoconf automake cairo-dev gtk+-dev cndrvcups-common-dev" 1.14 +SOURCE="ufr2linuxv180" 1.15 +TARBALL="${SOURCE}.zip" 1.16 +WGET_URL="http://www.service.canon.com.au/drivers/files/$TARBALL" 1.17 +TAGS="" 1.18 + 1.19 +# Rules to configure and make the package. 1.20 + 1.21 +compile_rules() { 1.22 + 1.23 + src="$WOK/$PACKAGE/$SOURCE/Sources" 1.24 + cd $src 1.25 + 1.26 + [ -d cndrvcups-lb-$VERSION ] || tar xzf cndrvcups-lb-${VERSION}-1.tar.gz 1.27 + 1.28 + cd $src/cndrvcups-lb-$VERSION/ppd && 1.29 + ./autogen.sh --prefix=/usr \ 1.30 + --enable-shared \ 1.31 + --disable-static \ 1.32 + --program-suffix="" \ 1.33 + --program-prefix="" && 1.34 + make && 1.35 + make DESTDIR=$PWD/_pkg install 1.36 + 1.37 + cd $src/cndrvcups-lb-$VERSION/pstoufr2cpca 1.38 + ./autogen.sh --prefix=/usr \ 1.39 + --enable-progpath=/usr/bin \ 1.40 + --libdir=/usr/lib \ 1.41 + --program-suffix="" \ 1.42 + --program-prefix="" && 1.43 + make && 1.44 + make DESTDIR=$PWD/_pkg install 1.45 + 1.46 +} 1.47 + 1.48 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.49 +genpkg_rules() 1.50 +{ 1.51 + mkdir -p $fs/usr/lib \ 1.52 + $fs/usr/share/caepcm \ 1.53 + $fs/usr/share/licenses/$PACKAGE \ 1.54 + $fs/usr/lib/cups/filter 1.55 + 1.56 + 1.57 + _pkg="$WOK/$PACKAGE/$SOURCE/Sources" 1.58 + 1.59 + cp -a $_pkg/cndrvcups-lb-$VERSION/libs/*.so* $fs/usr/lib 1.60 + cp -a $_pkg/cndrvcups-lb-$VERSION/data/C* $fs/usr/share/caepcm 1.61 + cp -a $_pkg/cndrvcups-lb-$VERSION/ppd/_pkg/usr/share/* $fs/usr/share/ 1.62 + cp -a $_pkg/cndrvcups-lb-$VERSION/pstoufr2cpca/_pkg/usr/lib/cups/filter $fs/usr/lib/cups/filter 1.63 + 1.64 + # gzip all ppd files 1.65 + find $fs/usr/share/cups/model -name "*.ppd" | xargs gzip -n9 1.66 + 1.67 + 1.68 + 1.69 + # non-free license 1.70 + cp -a $_pkg/cndrvcups-lb-$VERSION/LICENSE-ufr2-1.80E.txt $fs/usr/share/licenses/$PACKAGE 1.71 + 1.72 + cd $fs/usr/lib 1.73 + ln -sf libcanonufr2.so.1.0.0 liblibcanonufr2.so.1 1.74 + ln -sf libcanonufr2.so.1.0.0 libcanonufr2.so 1.75 + 1.76 + ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1 1.77 + ln -sf libufr2filter.so.1.0.0 libufr2filter.so 1.78 + 1.79 + 1.80 +} 1.81 + 1.82 +pre_install() 1.83 +{ 1.84 + echo "" 1.85 + echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2" 1.86 + echo "================================================================================" 1.87 + echo "You are installing a package with proprietary license." 1.88 + echo "You must accept the license." 1.89 + echo "================================================================================" 1.90 + echo "" 1.91 + 1.92 +} 1.93 + 1.94 +post_install() 1.95 +{ 1.96 + echo "" 1.97 + echo -e "\033[1m CANON PRINTING LICENSE INFORMATION:\033[0m $2" 1.98 + echo "================================================================================" 1.99 + echo "For installing this package, you have to accept the $PACKAGE license." 1.100 + echo "The license is stored in /usr/share/licenses/$PACKAGE " 1.101 + echo -n "Would you like to read the license (y/N) : "; read anser 1.102 + if [ "$anser" = "y" ]; then 1.103 + cat /usr/share/licenses/"$PACKAGE"/LICENSE | more 1.104 + echo "" 1.105 + fi 1.106 + echo "================================================================================" 1.107 + echo -n "Do you accept the license (y/N) : "; read anser 1.108 + if [ "$anser" = "N" ]; then 1.109 + echo "You did not accept the license, Removing the pkg." 1.110 + tazpkg remove "$PACKAGE" 1.111 + fi 1.112 + 1.113 +}