wok-stable rev 4553

Add foomatic-db-nonfree
author Rohit Joshi <jozee@slitaz.org>
date Fri Dec 04 13:25:37 2009 +0000 (2009-12-04)
parents 65ea1241ee48
children a0d93e8f5edf
files foomatic-db-nonfree/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/foomatic-db-nonfree/receipt	Fri Dec 04 13:25:37 2009 +0000
     1.3 @@ -0,0 +1,73 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="foomatic-db-nonfree"
     1.7 +VERSION="current" 
     1.8 +CATEGORY="system-tools"
     1.9 +SHORT_DESC="database engine generates PPD files from the data in Foomatic's XML database"
    1.10 +MAINTAINER="jozee@slitaz.org"
    1.11 +DEPENDS="perl libxml2 foomatic-db"
    1.12 +BUILD_DEPENDS="ghostscript-dev cups-dev perl libxml2-dev"
    1.13 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.14 +WEB_SITE="http://www.linuxprinting.org/foomatic.html"
    1.15 +WGET_URL="http://www.openprinting.org/download/foomatic/$TARBALL"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +compile_rules()
    1.19 +{
    1.20 +	mv $WOK/$PACKAGE/$PACKAGE* $WOK/$PACKAGE/$PACKAGE-$VERSION
    1.21 +	cd $src
    1.22 +	./configure \
    1.23 +		--prefix=/usr \
    1.24 +		--sysconfdir=/etc \
    1.25 +		$CONFIGURE_ARGS &&
    1.26 +	make &&
    1.27 +	make DESTDIR=$PWD/_pkg  install
    1.28 +	
    1.29 +}
    1.30 +
    1.31 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.32 +genpkg_rules()
    1.33 +{
    1.34 +	mkdir -p $fs/usr/share/licenses/$PACKAGE/
    1.35 +	cp -a $_pkg/usr/share/foomatic $fs/usr/share
    1.36 +	
    1.37 +	# gzip all ppd files
    1.38 +	find $fs/usr/share/foomatic/db/source -name "*.ppd" | xargs gzip -n9
    1.39 +	
    1.40 +	# include non-free license
    1.41 +	cp -a $src/COPYING $fs/usr/share/licenses/$PACKAGE/
    1.42 +	
    1.43 +}
    1.44 +
    1.45 +pre_install()
    1.46 +{
    1.47 +	echo ""
    1.48 +	echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
    1.49 +	echo "================================================================================"
    1.50 +	echo "You are installing a package with proprietary license."
    1.51 +	echo "You must accept the license."
    1.52 +    echo "================================================================================"
    1.53 +    echo ""
    1.54 +	
    1.55 +}
    1.56 +
    1.57 +post_install()
    1.58 +{
    1.59 +	echo ""
    1.60 +	echo -e "\033[1m FOOMATIC NON-FREE PRINTING LICENSE INFORMATION:\033[0m $2"
    1.61 +	echo "================================================================================"
    1.62 +	echo "For installing this package, you have to accept the $PACKAGE license."
    1.63 +    echo "The license is stored in /usr/share/licenses/$PACKAGE "    
    1.64 +    echo -n "Would you like to read the license (y/N) : "; read anser
    1.65 +    if [ "$anser" = "y" ]; then
    1.66 +		cat /usr/share/licenses/"$PACKAGE"/COPYING | more	
    1.67 +		echo "" 		
    1.68 +	fi
    1.69 +	echo "================================================================================"
    1.70 +	 echo -n "Do you accept the license (y/N) : "; read anser
    1.71 +    if [ "$anser" = "N" ]; then
    1.72 +		echo "You did not accept the license, Removing the pkg."	
    1.73 +		tazpkg remove "$PACKAGE"		
    1.74 +	fi
    1.75 +
    1.76 +}