wok view ufr2/receipt @ rev 25556

created recipes for nted and nted-lang
author Hans-G?nter Theisgen
date Sat Apr 22 14:54:15 2023 +0100 (19 months ago)
parents b7f1bd1b9ac7
children
line source
1 # SliTaz package receipt.
3 PACKAGE="ufr2"
4 VERSION="2.40-2"
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="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="https://github.com/vicamo/cndrvcups-lb"
12 WGET_URL="https://github.com/vicamo/cndrvcups-lb/archive/refs/tags/canon-$VERSION.tar.gz"
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 cd $src/ppd &&
29 ./autogen.sh \
30 --prefix=/usr \
31 --enable-shared \
32 --disable-static \
33 --program-suffix="" \
34 --program-prefix="" &&
35 make $MAKEFLAGS &&
36 make DESTDIR=$DESTDIR install
38 cd $src/pstoufr2cpca
39 ./autogen.sh \
40 --prefix=/usr \
41 --enable-progpath=/usr/bin \
42 --libdir=/usr/lib \
43 --program-suffix="" \
44 --program-prefix="" &&
45 make $MAKEFLAGS &&
46 make DESTDIR=$DESTDIR install
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p \
53 $fs/usr/lib \
54 $fs/usr/share/caepcm \
55 $fs/usr/share/licenses/$PACKAGE \
56 $fs/usr/lib/cups/filter
58 cp -a $src/libs/*.so* $fs/usr/lib
59 cp -a $src/data/C* $fs/usr/share/caepcm
60 cp -a $install/usr/share/* $fs/usr/share/
61 cp -a $install/usr/lib/cups/filter $fs/usr/lib/cups/filter
63 # gzip all ppd files
64 find $fs/usr/share/cups/model -name "*.ppd" | xargs gzip -n9
66 # non-free license
67 cp -a $src/LICENSE-ufr2-${VERSION%-*}E.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
72 ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1
73 ln -sf libufr2filter.so.1.0.0 libufr2filter.so
74 }
76 pre_install()
77 {
78 echo ""
79 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
80 echo "================================================================================"
81 echo "You are installing a package with proprietary license."
82 echo "You must accept the license."
83 echo "================================================================================"
84 echo ""
85 }
87 post_install()
88 {
89 echo ""
90 echo -e "\033[1m CANON PRINTING LICENSE INFORMATION:\033[0m $2"
91 echo "================================================================================"
92 echo "For installing this package, you have to accept the $PACKAGE license."
93 echo "The license is stored in /usr/share/licenses/$PACKAGE "
94 echo -n "Would you like to read the license (y/N) : "; read anser
95 if [ "$anser" = "y" ]; then
96 cat "$1/usr/share/licenses/$PACKAGE/LICENSE" | more
97 echo ""
98 fi
99 echo "================================================================================"
100 echo -n "Do you accept the license (y/N) : "; read anser
101 if [ "$anser" = "N" ]; then
102 echo "You did not accept the license, Removing the pkg."
103 chroot "$1/" tazpkg remove "$PACKAGE"
104 fi
105 }