SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "ufr2"

# SliTaz package receipt.

PACKAGE="ufr2"
VERSION="2.20"
CATEGORY="system-tools"
MAINTAINER="jozee@slitaz.org"
SHORT_DESC="Canon URF2 driver with support for LBP, iR and MF series printers"
SOURCE="UFR_II_Printer_Driver_for_Linux_V220_uk_EN"
TARBALL="${SOURCE}.tar.gz"
WEB_SITE="http://www.canon.com.au/pps/colour/imagepress_c1_drivers.aspx"
WGET_URL="http://gdlp01.c-wss.com/gds/8/0100002708/03/$TARBALL"
TAGS="printing printer drivers"

DEPENDS="cups cairo cndrvcups-common cups"
BUILD_DEPENDS="autoconf automake cairo-dev gtk+-dev cndrvcups-common-dev cups-dev"

# Rules to configure and make the package.
compile_rules()
{    
    #src="$WOK/$PACKAGE/$SOURCE/Sources"
    cd $src
   
    [ -d cndrvcups-lb-$VERSION ] || tar xzf Sources/cndrvcups-lb-${VERSION}-1.tar.gz 
    
    cd $src/cndrvcups-lb-$VERSION/ppd &&     
    ./autogen.sh \
        --prefix=/usr \
        --enable-shared \
        --disable-static \
        --program-suffix="" \
        --program-prefix="" &&  
    make $MAKEFLAGS &&
    make DESTDIR=$DESTDIR install 
    
    cd $src/cndrvcups-lb-$VERSION/pstoufr2cpca     
    ./autogen.sh \
        --prefix=/usr   \
        --enable-progpath=/usr/bin \
        --libdir=/usr/lib \
        --program-suffix="" \
        --program-prefix="" &&  
    make $MAKEFLAGS &&
    make DESTDIR=$DESTDIR install     
}
    
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p \
        $fs/usr/lib \
        $fs/usr/share/caepcm \
        $fs/usr/share/licenses/$PACKAGE \
        $fs/usr/lib/cups/filter
    
    cp -a $src/cndrvcups-lb-$VERSION/libs/*.so* $fs/usr/lib    
    cp -a $src/cndrvcups-lb-$VERSION/data/C* $fs/usr/share/caepcm
    cp -a $install/usr/share/*  $fs/usr/share/
    cp -a $install/usr/lib/cups/filter $fs/usr/lib/cups/filter
    
    # gzip all ppd files
    find $fs/usr/share/cups/model -name "*.ppd" | xargs gzip -n9

    # non-free license
    cp -a $src/Documents/LICENSE-ufr2drv*.txt $fs/usr/share/licenses/$PACKAGE
    
    cd $fs/usr/lib
    ln -sf libcanonufr2.so.1.0.0  liblibcanonufr2.so.1
    ln -sf libcanonufr2.so.1.0.0  libcanonufr2.so
    ln -sf libufr2filter.so.1.0.0 libufr2filter.so.1
    ln -sf libufr2filter.so.1.0.0  libufr2filter.so 
}

pre_install()
{
    echo ""
    echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
    echo "================================================================================"
    echo "You are installing a package with proprietary license."
    echo "You must accept the license."
    echo "================================================================================"
    echo ""
}

post_install()
{
    echo ""
    echo -e "\033[1m CANON PRINTING LICENSE INFORMATION:\033[0m $2"
    echo "================================================================================"
    echo "For installing this package, you have to accept the $PACKAGE license."
    echo "The license is stored in /usr/share/licenses/$PACKAGE "    
    echo -n "Would you like to read the license (y/N) : "; read anser
    if [ "$anser" = "y" ]; then
        cat /usr/share/licenses/"$PACKAGE"/LICENSE | more    
        echo ""         
    fi
    echo "================================================================================"
     echo -n "Do you accept the license (y/N) : "; read anser
    if [ "$anser" = "N" ]; then
        echo "You did not accept the license, Removing the pkg."    
        tazpkg remove "$PACKAGE"        
    fi
}
3382 packages and 430813 files in stable database (Mon Mar 4 17:53:49 2019)