wok view ufr2/receipt @ rev 24746

ncursesw-dev: add pkg config files (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Mar 16 11:02:39 2022 +0000 (2022-03-16)
parents 18c66805dd1a
children 2b0142c9f248
line source
1 # SliTaz package receipt.
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 SOURCE="UFR_II_Printer_Driver_for_Linux_V220_uk_EN"
10 TARBALL="${SOURCE}.tar.gz"
11 WEB_SITE="https://web.archive.org/web/20091013040714/https://www.canon.com.au/pps/colour/imagepress_c1_drivers.aspx"
12 WGET_URL="http://gdlp01.c-wss.com/gds/8/0100002708/03/$TARBALL"
13 TAGS="printing printer driver"
15 DEPENDS="cups cairo cndrvcups-common cups"
16 BUILD_DEPENDS="autoconf automake cairo-dev gtk+-dev cndrvcups-common-dev cups-dev"
18 # What is the latest version available today?
19 current_version()
20 {
21 wget -O - https://github.com/vicamo/cndrvcups-lb/tags 2>/dev/null | \
22 sed '/archive.*tar/!d;s|.*/[a-z-]*\(.*\).tar.*|\1|;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 #src="$WOK/$PACKAGE/$SOURCE/Sources"
29 cd $src
31 [ -d cndrvcups-lb-$VERSION ] || tar xzf Sources/cndrvcups-lb-${VERSION}-1.tar.gz
33 cd $src/cndrvcups-lb-$VERSION/ppd &&
34 ./autogen.sh \
35 --prefix=/usr \
36 --enable-shared \
37 --disable-static \
38 --program-suffix="" \
39 --program-prefix="" &&
40 make $MAKEFLAGS &&
41 make DESTDIR=$DESTDIR install
43 cd $src/cndrvcups-lb-$VERSION/pstoufr2cpca
44 ./autogen.sh \
45 --prefix=/usr \
46 --enable-progpath=/usr/bin \
47 --libdir=/usr/lib \
48 --program-suffix="" \
49 --program-prefix="" &&
50 make $MAKEFLAGS &&
51 make DESTDIR=$DESTDIR install
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 mkdir -p \
58 $fs/usr/lib \
59 $fs/usr/share/caepcm \
60 $fs/usr/share/licenses/$PACKAGE \
61 $fs/usr/lib/cups/filter
63 cp -a $src/cndrvcups-lb-$VERSION/libs/*.so* $fs/usr/lib
64 cp -a $src/cndrvcups-lb-$VERSION/data/C* $fs/usr/share/caepcm
65 cp -a $install/usr/share/* $fs/usr/share/
66 cp -a $install/usr/lib/cups/filter $fs/usr/lib/cups/filter
68 # gzip all ppd files
69 find $fs/usr/share/cups/model -name "*.ppd" | xargs gzip -n9
71 # non-free license
72 cp -a $src/Documents/LICENSE-ufr2drv*.txt $fs/usr/share/licenses/$PACKAGE
74 cd $fs/usr/lib
75 ln -sf libcanonufr2.so.1.0.0 liblibcanonufr2.so.1
76 ln -sf libcanonufr2.so.1.0.0 libcanonufr2.so
77 ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1
78 ln -sf libufr2filter.so.1.0.0 libufr2filter.so
79 }
81 pre_install()
82 {
83 echo ""
84 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
85 echo "================================================================================"
86 echo "You are installing a package with proprietary license."
87 echo "You must accept the license."
88 echo "================================================================================"
89 echo ""
90 }
92 post_install()
93 {
94 echo ""
95 echo -e "\033[1m CANON PRINTING LICENSE INFORMATION:\033[0m $2"
96 echo "================================================================================"
97 echo "For installing this package, you have to accept the $PACKAGE license."
98 echo "The license is stored in /usr/share/licenses/$PACKAGE "
99 echo -n "Would you like to read the license (y/N) : "; read anser
100 if [ "$anser" = "y" ]; then
101 cat "$1/usr/share/licenses/$PACKAGE/LICENSE" | more
102 echo ""
103 fi
104 echo "================================================================================"
105 echo -n "Do you accept the license (y/N) : "; read anser
106 if [ "$anser" = "N" ]; then
107 echo "You did not accept the license, Removing the pkg."
108 chroot "$1/" tazpkg remove "$PACKAGE"
109 fi
110 }