wok-next annotate pybootchartgui/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents 0cbe4b1f2230
children
rev   line source
jozee@3218 1 # SliTaz package receipt.
jozee@3218 2
jozee@3218 3 PACKAGE="pybootchartgui"
jozee@3218 4 VERSION="r124"
jozee@3218 5 CATEGORY="misc"
al@21020 6 SHORT_DESC="Bootchart GUI in Python"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@15376 8 LICENSE="GPL3"
pascal@21146 9 WEB_SITE="https://github.com/kraj/poky/tree/master/scripts/pybootchartgui"
al@21057 10 HOST_ARCH="any"
al@21020 11
jozee@3218 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@20906 13 WGET_URL="$WEB_SITE/files/$TARBALL" # FIXME
jozee@3218 14
al@21020 15 genpkg_rules() {
al@21020 16 PY_VERSION=$(cat /var/lib/tazpkg/installed/python/receipt | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2)
jozee@3218 17 mkdir -p $fs/usr/lib/python$PY_VERSION $fs/usr/bin
al@21020 18 cp -a $src/pybootchartgui.py $fs/usr/lib/python$PY_VERSION
jozee@3218 19 cp -a $src/pybootchartgui $fs/usr/lib/python$PY_VERSION
al@21020 20 DEPENDS="python python-pygtk bootchart"
jozee@3218 21 }
jozee@3218 22
al@21020 23 post_install() {
pascal@18730 24 PY_VERSION=$(cat "$1/var/lib/tazpkg/installed/python/receipt" | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2)
al@21020 25 if [ -f "$1/usr/bin/pybootchartgui" ]; then
al@21020 26 rm "$1/usr/bin/pybootchartgui"
al@21020 27 fi
pascal@18732 28 ln -s /usr/lib/python$PY_VERSION/pybootchartgui.py "$1/usr/bin/pybootchartgui"
al@21020 29 if [ -f "$1/etc/bootchartd.conf" ]; then
pascal@18730 30 sed -i s/'AUTO_RENDER="no"'/'AUTO_RENDER="yes"'/ "$1/etc/bootchartd.conf"
jozee@4964 31 fi
jozee@3218 32 }
jozee@3218 33
al@21020 34 post_remove() {
al@21020 35 rm "$1/usr/bin/pybootchartgui"
al@21020 36 if [ -f "$1/etc/bootchartd.conf" ]; then
al@21020 37 sed -i s/'AUTO_RENDER="yes"'/'AUTO_RENDER="no"'/ "$1/etc/bootchartd.conf"
al@21020 38 fi
jozee@3218 39 }