SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "ufr2"

# SliTaz package receipt.

PACKAGE="ufr2"
VERSION="2.40-2"
CATEGORY="system-tools"
SHORT_DESC="Canon URF2 driver with support for LBP, iR and MF series printers"
MAINTAINER="jozee@slitaz.org"
LICENSE="GPL2"
SOURCE="UFR_II_Printer_Driver_for_Linux_V220_uk_EN"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://github.com/vicamo/cndrvcups-lb"
WGET_URL="https://github.com/vicamo/cndrvcups-lb/archive/refs/tags/canon-$VERSION.tar.gz"
TAGS="printing printer driver"

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

# What is the latest version available today?
current_version()
{
    wget -O - https://github.com/vicamo/cndrvcups-lb/tags 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/[a-z-]*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{    
    cd $src/ppd &&
    ./autogen.sh \
        --prefix=/usr \
        --enable-shared \
        --disable-static \
        --program-suffix="" \
        --program-prefix="" &&  
    make $MAKEFLAGS &&
    make DESTDIR=$DESTDIR install 
    
    cd $src/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/libs/*.so* $fs/usr/lib    
    cp -a $src/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/LICENSE-ufr2-${VERSION%-*}E.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 "$1/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."    
        chroot "$1/" tazpkg remove "$PACKAGE"        
    fi
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)