SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "gtklp"

# SliTaz package receipt.

PACKAGE="gtklp"
VERSION="1.3.4"
CATEGORY="utilities"
TAGS="print"
SHORT_DESC="Tools to use and administrate CUPS."
MAINTAINER="jozee@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://gtklp.sourceforge.net/"

TARBALL="$PACKAGE-$VERSION.src.tar.gz"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

DEPENDS="cups gtk+"
BUILD_DEPENDS="autoconf automake cups-dev file gtk+-dev libtool"

# What is the latest version available today?
current_version()
{
    wget -O - https://sourceforge.net/projects/gtklp/files/gtklp/ 2>/dev/null | \
    sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
    sed '/scope="row/!d;s|.*/gtklp/||;s|/.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i '/dummy/d' /usr/bin/gettextize    # dirty hack
    chmod +x autogen.sh 

    ./autogen.sh 2>&1 | grep -v AM_GNU_GETTEXT
    # Disable /root/missing script
    sed -i '/is-lightweight/{s/eval/! echo/}' configure

    ./configure --prefix=/usr &&
    make &&
    make DESTDIR=$DESTDIR install || return

    mkdir -p $DESTDIR/usr/share/applications
    cat > $DESTDIR/usr/share/applications/gtklp.desktop <<EOT
[Desktop Entry]
Name=Printer Administration
Comment=$SHORT_DESC
Categories=Application;System;
Icon=printer
Exec=gtklp
Type=Application
StartupNotify=true
Terminal=false
EOT
    cat > $DESTDIR/usr/share/applications/gtklpq.desktop <<EOT
[Desktop Entry]
Name=Printer Queue
Comment=$SHORT_DESC
Categories=Application;Utility;
Icon=printer
Exec=gtklpq
Type=Application
StartupNotify=true
Terminal=false
EOT
}
    
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/share

    cp -a $install/usr/bin            $fs/usr
    cp -a $install/usr/share/applications    $fs/usr/share
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)