SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "hardinfo"

# SliTaz package receipt.

PACKAGE="hardinfo"
VERSION="0.5.1"
CATEGORY="system-tools"
SHORT_DESC="A tool to get hardware informations and perform benchmarks."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://github.com/lpereira/hardinfo"
WGET_URL="https://github.com/lpereira/hardinfo/archive/refs/tags/release-0.5.1.tar.gz"

DEPENDS="gtk+ pciutils xorg-libXdamage"
BUILD_DEPENDS="gtk+ gtk+-dev"

# What is the latest version available today?
current_version()
{
    wget -O - $WEB_SITE/tags 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    cd $src/hardinfo2

    # Patch to be build with new stack
    # See https://slackbuilds.org/slackbuilds/15.0/system/hardinfo
    patch -p1 < $stuff/makefile.patch

    while read file; do
        [ -f done.$file ] && continue
        patch -p0 < $stuff/$file || return 1
        touch done.$file
    done <<EOT
languages.patch
os.patch
EOT
    sed -i 's|uname -m|echo i686|' configure
    ./configure \
        --prefix=/usr \
        $CONFIGURE_ARGS &&
    sed -i 's/^GTK_LIBS.*/& -lgmodule-2.0 -lm/' Makefile && make &&
    make DESTDIR=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr/lib/$PACKAGE $fs/usr/share/pixmaps
    cp -a $install/usr/bin $fs/usr
    cp -a $install/usr/lib/$PACKAGE/modules $fs/usr/lib/$PACKAGE
    cp -a $install/usr/share/$PACKAGE $fs/usr/share
    cd $fs/usr/share/pixmaps
    rm ../$PACKAGE/pixmaps/logo.xcf
    ln -s ../$PACKAGE/pixmaps/logo.png hardinfo.png
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)