SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "xsane"

# SliTaz package receipt.

PACKAGE="xsane"
VERSION="0.999"
CATEGORY="office"
SHORT_DESC="XSane - graphical scanning frontend."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://www.xsane.org/"
WGET_URL="https://gitlab.com/sane-project/frontend/xsane/-/archive/$VERSION/$TARBALL"

DEPENDS="sane-backends gtk+ tiff xorg-libXdamage lcms libv4l libltdl"
BUILD_DEPENDS="gtk+-dev sane-backends-dev lcms-dev "

current_version()
{
    wget -O - "${WGET_URL%/arch*}/tags?sort=updated_desc" 2>/dev/null | \
    sed '/tar.gz/!d;s|.*/xsane-\(.*\).tar.gz".*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    # Patch from archlinux
    # see https://gitlab.archlinux.org/archlinux/packaging/packages/xsane
    patch -p1 < $stuff/xsane-0.995-xdg-open.patch
    sed -i -e 's:png_ptr->jmpbuf:png_jmpbuf(png_ptr):' src/xsane-save.c
    patch -p1 < $stuff/0165-xsane-0.999-lcms2.patch
    patch -p1 < $stuff/0001-lcms2_configure.patch
    patch -Np1 < $stuff/xsane-preview-selection.patch

    ./configure \
        --prefix=/usr \
        --mandir=/usr/share/man \
        --disable-gimp \
        $CONFIGURE_ARGS &&
    make &&
    make DESTDIR=$DESTDIR install
}

# 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/sane $fs/usr/share
    rm -rf $fs/usr/share/sane/xsane/doc
    mv $install/usr/share/sane/xsane/doc $install/usr/share/doc
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)