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