wok view tmux-mem-cpu-load/receipt @ rev 25503

f3: include extra programs
author Hans-G?nter Theisgen
date Fri Jan 27 10:37:43 2023 +0100 (15 months ago)
parents 5ea0ce1cecc0
children 0262035dc1e7
line source
1 # SliTaz package receipt.
3 PACKAGE="tmux-mem-cpu-load"
4 VERSION="3.6.0"
5 CATEGORY="utilities"
6 SHORT_DESC="CPU, RAM, and load monitor for use with tmux."
7 MAINTAINER="paul@slitaz.org"
8 LICENSE="Apache"
9 WEB_SITE="https://github.com/tmux/tmux/wiki"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://github.com/thewtex/$PACKAGE/archive/v$VERSION.tar.gz"
14 DEPENDS="tmux"
15 BUILD_DEPENDS="cmake python"
17 current_version()
18 {
19 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
20 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
21 }
23 # Rules to configure and make the package.
24 compile_rules()
25 {
26 mkdir _build &&
27 cd _build &&
28 cmake .. \
29 -D CMAKE_INSTALL_PREFIX=/usr &&
30 make &&
31 make install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr
38 mkdir -p $fs/etc/skel
40 cp -a $install/usr/bin $fs/usr
41 cat >> $fs/etc/skel/.tmux.conf << EOT
42 # tmux-mem-cpu-load
43 set -g status-interval 2
44 set -g status-right "#[fg=black,bg=green]#(tmux-mem-cpu-load 2)#[default]"
45 EOT
46 }
48 post_install()
49 {
50 for i in $(ls "$1/home" 2> /dev/null)
51 do
52 grep -qs "tmux-mem-cpu-load" "$1/home/$i/.tmux.conf" &&
53 continue
54 echo -n "Checking for .tmux.conf for $i ..."
55 cp -a "$1/etc/skel/.tmux.conf" "$1/home/$i/"
56 chroot "$1/" chown $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.tmux.conf"
57 status
58 done
59 }