wok-next view pybootchartgui/receipt @ rev 21057

Deal with HOST_ARCH="any"
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Dec 03 14:47:30 2018 +0200 (2018-12-03)
parents d5aab818505e
children 865a6b5d55a0
line source
1 # SliTaz package receipt.
3 PACKAGE="pybootchartgui"
4 VERSION="r124"
5 CATEGORY="misc"
6 SHORT_DESC="Bootchart GUI in Python"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://code.google.com/archive/p/pybootchartgui/"
10 HOST_ARCH="any"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="$WEB_SITE/files/$TARBALL" # FIXME
15 genpkg_rules() {
16 PY_VERSION=$(cat /var/lib/tazpkg/installed/python/receipt | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2)
17 mkdir -p $fs/usr/lib/python$PY_VERSION $fs/usr/bin
18 cp -a $src/pybootchartgui.py $fs/usr/lib/python$PY_VERSION
19 cp -a $src/pybootchartgui $fs/usr/lib/python$PY_VERSION
20 DEPENDS="python python-pygtk bootchart"
21 }
23 post_install() {
24 PY_VERSION=$(cat "$1/var/lib/tazpkg/installed/python/receipt" | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2)
25 if [ -f "$1/usr/bin/pybootchartgui" ]; then
26 rm "$1/usr/bin/pybootchartgui"
27 fi
28 ln -s /usr/lib/python$PY_VERSION/pybootchartgui.py "$1/usr/bin/pybootchartgui"
29 if [ -f "$1/etc/bootchartd.conf" ]; then
30 sed -i s/'AUTO_RENDER="no"'/'AUTO_RENDER="yes"'/ "$1/etc/bootchartd.conf"
31 fi
32 }
34 post_remove() {
35 rm "$1/usr/bin/pybootchartgui"
36 if [ -f "$1/etc/bootchartd.conf" ]; then
37 sed -i s/'AUTO_RENDER="yes"'/'AUTO_RENDER="no"'/ "$1/etc/bootchartd.conf"
38 fi
39 }