wok annotate foomatic-db-nonfree/receipt @ rev 25050
Up memtest-efi* (6.00b2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 04 20:41:29 2022 +0000 (2022-06-04) |
parents | bfabe25c21ff |
children | 196372051572 |
rev | line source |
---|---|
jozee@4553 | 1 # SliTaz package receipt. |
jozee@4553 | 2 |
jozee@4553 | 3 PACKAGE="foomatic-db-nonfree" |
slaxemulator@7265 | 4 VERSION="20101114" |
jozee@4553 | 5 CATEGORY="system-tools" |
jozee@4553 | 6 SHORT_DESC="database engine generates PPD files from the data in Foomatic's XML database" |
jozee@4553 | 7 MAINTAINER="jozee@slitaz.org" |
pascal@15593 | 8 LICENSE="other" |
jozee@4553 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
jozee@4553 | 10 WEB_SITE="http://www.linuxprinting.org/foomatic.html" |
pascal@24972 | 11 WGET_URL="https://www.openprinting.org/download/foomatic/$TARBALL" |
jozee@4936 | 12 TAGS="printer driver printing" |
jozee@4553 | 13 |
pascal@15073 | 14 DEPENDS="perl libxml2 foomatic-db" |
pascal@15073 | 15 BUILD_DEPENDS="ghostscript-dev cups-dev perl libxml2-dev" |
pascal@15073 | 16 |
pascal@24439 | 17 # What is the latest version available today? |
pascal@24439 | 18 current_version() |
pascal@24439 | 19 { |
pascal@24439 | 20 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24439 | 21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24439 | 22 } |
pascal@24439 | 23 |
jozee@4553 | 24 # Rules to configure and make the package. |
jozee@4553 | 25 compile_rules() |
jozee@4553 | 26 { |
jozee@4553 | 27 cd $src |
jozee@4553 | 28 ./configure \ |
jozee@4553 | 29 --prefix=/usr \ |
jozee@4553 | 30 --sysconfdir=/etc \ |
jozee@4553 | 31 $CONFIGURE_ARGS && |
jozee@4553 | 32 make && |
pascal@15073 | 33 make DESTDIR=$DESTDIR install |
jozee@4553 | 34 |
jozee@4553 | 35 } |
jozee@4553 | 36 |
jozee@4553 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@4553 | 38 genpkg_rules() |
jozee@4553 | 39 { |
jozee@4553 | 40 mkdir -p $fs/usr/share/licenses/$PACKAGE/ |
pascal@15073 | 41 cp -a $install/usr/share/foomatic $fs/usr/share |
jozee@4553 | 42 |
jozee@4553 | 43 # gzip all ppd files |
jozee@4553 | 44 find $fs/usr/share/foomatic/db/source -name "*.ppd" | xargs gzip -n9 |
jozee@4553 | 45 |
jozee@4553 | 46 # include non-free license |
jozee@4553 | 47 cp -a $src/COPYING $fs/usr/share/licenses/$PACKAGE/ |
jozee@4553 | 48 |
jozee@4553 | 49 } |
jozee@4553 | 50 |
jozee@4553 | 51 pre_install() |
jozee@4553 | 52 { |
jozee@4553 | 53 echo "" |
jozee@4553 | 54 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2" |
jozee@4553 | 55 echo "================================================================================" |
jozee@4553 | 56 echo "You are installing a package with proprietary license." |
jozee@4553 | 57 echo "You must accept the license." |
jozee@4553 | 58 echo "================================================================================" |
jozee@4553 | 59 echo "" |
jozee@4553 | 60 |
jozee@4553 | 61 } |
jozee@4553 | 62 |
jozee@4553 | 63 post_install() |
jozee@4553 | 64 { |
jozee@4553 | 65 echo "" |
jozee@4553 | 66 echo -e "\033[1m FOOMATIC NON-FREE PRINTING LICENSE INFORMATION:\033[0m $2" |
jozee@4553 | 67 echo "================================================================================" |
jozee@4553 | 68 echo "For installing this package, you have to accept the $PACKAGE license." |
jozee@4553 | 69 echo "The license is stored in /usr/share/licenses/$PACKAGE " |
jozee@4553 | 70 echo -n "Would you like to read the license (y/N) : "; read anser |
jozee@4553 | 71 if [ "$anser" = "y" ]; then |
pascal@18730 | 72 more < "$1/usr/share/licenses/$PACKAGE/COPYING" |
jozee@4553 | 73 echo "" |
jozee@4553 | 74 fi |
jozee@4553 | 75 echo "================================================================================" |
jozee@4553 | 76 echo -n "Do you accept the license (y/N) : "; read anser |
jozee@4553 | 77 if [ "$anser" = "N" ]; then |
jozee@4553 | 78 echo "You did not accept the license, Removing the pkg." |
pascal@17552 | 79 chroot "$1/" tazpkg remove "$PACKAGE" |
jozee@4553 | 80 fi |
jozee@4553 | 81 } |