wok view tmux-mem-cpu-load/receipt @ rev 25601
Update some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jul 16 18:06:38 2023 +0000 (15 months ago) |
parents | a73375793791 |
children |
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 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
21 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 mkdir _build &&
28 cd _build &&
29 cmake .. \
30 -D CMAKE_INSTALL_PREFIX=/usr &&
31 make &&
32 make install
33 }
35 # Rules to gen a SliTaz package suitable for Tazpkg.
36 genpkg_rules()
37 {
38 mkdir -p $fs/usr
39 mkdir -p $fs/etc/skel
41 cp -a $install/usr/bin $fs/usr
42 cat >> $fs/etc/skel/.tmux.conf << EOT
43 # tmux-mem-cpu-load
44 set -g status-interval 2
45 set -g status-right "#[fg=black,bg=green]#(tmux-mem-cpu-load 2)#[default]"
46 EOT
47 }
49 post_install()
50 {
51 for i in $(ls "$1/home" 2> /dev/null)
52 do
53 grep -qs "tmux-mem-cpu-load" "$1/home/$i/.tmux.conf" &&
54 continue
55 echo -n "Checking for .tmux.conf for $i ..."
56 cp -a "$1/etc/skel/.tmux.conf" "$1/home/$i/"
57 chroot "$1/" chown $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.tmux.conf"
58 status
59 done
60 }