SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "pybootchartgui"

# SliTaz package receipt.

PACKAGE="pybootchartgui"
VERSION="r124"
CATEGORY="misc"
SHORT_DESC="bootchart GUI in python"
MAINTAINER="jozee@slitaz.org"
LICENSE="GPL3"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://github.com/kraj/poky/tree/master/scripts/pybootchartgui"
WGET_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/$PACKAGE/$TARBALL"

DEPENDS="python pygtk bootchart"

# What is the latest version available today?
current_version()
{
    wget -O - https://github.com/kraj/poky/commits/master 2>/dev/null | \
    sed '/Commits on/!d;s|.*on |"|;s|<.*|"|;q' | xargs date +%Y%m%d -d
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    PY_VERSION=`cat /var/lib/tazpkg/installed/python/receipt | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2`
    mkdir -p $fs/usr/lib/python$PY_VERSION $fs/usr/bin
    cp -a $src/pybootchartgui.py $fs/usr/lib/python$PY_VERSION
    cp -a $src/pybootchartgui $fs/usr/lib/python$PY_VERSION
    
    
}

post_install()
{
    PY_VERSION=$(cat "$1/var/lib/tazpkg/installed/python/receipt" | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2)
    if [ -f  "$1/usr/bin/pybootchartgui" ] ; then rm "$1/usr/bin/pybootchartgui" ; fi
    ln -s /usr/lib/python$PY_VERSION/pybootchartgui.py "$1/usr/bin/pybootchartgui"
    if [ -f "$1/etc/bootchartd.conf" ] ; then
        sed -i s/'AUTO_RENDER="no"'/'AUTO_RENDER="yes"'/ "$1/etc/bootchartd.conf"
    fi
}

post_remove()
{
      rm "$1/usr/bin/pybootchartgui"
     if [ -f "$1/etc/bootchartd.conf" ] ; then 
         sed -i s/'AUTO_RENDER="yes"'/'AUTO_RENDER="no"'/ "$1/etc/bootchartd.conf"
     fi
}
6047 packages and 206162 files in current database (Tue Jun 18 11:34:18 2024)