wok-next annotate ufr2/receipt @ rev 21020

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