wok-6.x view ufr2/receipt @ rev 4898
putty: fix compile_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 10 10:28:33 2010 +0100 (2010-02-10) |
parents | |
children | 3115c291f303 |
line source
1 # SliTaz package receipt.
3 PACKAGE="ufr2"
4 VERSION="1.80"
5 CATEGORY="system-tools"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="Canon URF2 driver with support for LBP, iR and MF series printers"
8 WEB_SITE="http://www.canon.com.au/pps/colour/imagepress_c1_drivers.aspx"
9 DEPENDS="cups cairo cndrvcups-common"
10 BUILD_DEPENDS="autoconf automake cairo-dev gtk+-dev cndrvcups-common-dev"
11 SOURCE="ufr2linuxv180"
12 TARBALL="${SOURCE}.zip"
13 WGET_URL="http://www.service.canon.com.au/drivers/files/$TARBALL"
14 TAGS=""
16 # Rules to configure and make the package.
18 compile_rules() {
20 src="$WOK/$PACKAGE/$SOURCE/Sources"
21 cd $src
23 [ -d cndrvcups-lb-$VERSION ] || tar xzf cndrvcups-lb-${VERSION}-1.tar.gz
25 cd $src/cndrvcups-lb-$VERSION/ppd &&
26 ./autogen.sh --prefix=/usr \
27 --enable-shared \
28 --disable-static \
29 --program-suffix="" \
30 --program-prefix="" &&
31 make &&
32 make DESTDIR=$PWD/_pkg install
34 cd $src/cndrvcups-lb-$VERSION/pstoufr2cpca
35 ./autogen.sh --prefix=/usr \
36 --enable-progpath=/usr/bin \
37 --libdir=/usr/lib \
38 --program-suffix="" \
39 --program-prefix="" &&
40 make &&
41 make DESTDIR=$PWD/_pkg install
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 mkdir -p $fs/usr/lib \
49 $fs/usr/share/caepcm \
50 $fs/usr/share/licenses/$PACKAGE \
51 $fs/usr/lib/cups/filter
54 _pkg="$WOK/$PACKAGE/$SOURCE/Sources"
56 cp -a $_pkg/cndrvcups-lb-$VERSION/libs/*.so* $fs/usr/lib
57 cp -a $_pkg/cndrvcups-lb-$VERSION/data/C* $fs/usr/share/caepcm
58 cp -a $_pkg/cndrvcups-lb-$VERSION/ppd/_pkg/usr/share/* $fs/usr/share/
59 cp -a $_pkg/cndrvcups-lb-$VERSION/pstoufr2cpca/_pkg/usr/lib/cups/filter $fs/usr/lib/cups/filter
61 # gzip all ppd files
62 find $fs/usr/share/cups/model -name "*.ppd" | xargs gzip -n9
66 # non-free license
67 cp -a $_pkg/cndrvcups-lb-$VERSION/LICENSE-ufr2-1.80E.txt $fs/usr/share/licenses/$PACKAGE
69 cd $fs/usr/lib
70 ln -sf libcanonufr2.so.1.0.0 liblibcanonufr2.so.1
71 ln -sf libcanonufr2.so.1.0.0 libcanonufr2.so
73 ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1
74 ln -sf libufr2filter.so.1.0.0 libufr2filter.so
77 }
79 pre_install()
80 {
81 echo ""
82 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
83 echo "================================================================================"
84 echo "You are installing a package with proprietary license."
85 echo "You must accept the license."
86 echo "================================================================================"
87 echo ""
89 }
91 post_install()
92 {
93 echo ""
94 echo -e "\033[1m CANON PRINTING LICENSE INFORMATION:\033[0m $2"
95 echo "================================================================================"
96 echo "For installing this package, you have to accept the $PACKAGE license."
97 echo "The license is stored in /usr/share/licenses/$PACKAGE "
98 echo -n "Would you like to read the license (y/N) : "; read anser
99 if [ "$anser" = "y" ]; then
100 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
101 echo ""
102 fi
103 echo "================================================================================"
104 echo -n "Do you accept the license (y/N) : "; read anser
105 if [ "$anser" = "N" ]; then
106 echo "You did not accept the license, Removing the pkg."
107 tazpkg remove "$PACKAGE"
108 fi
110 }