wok view fluxbox/receipt @ rev 24385

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 07 11:38:23 2022 +0000 (2022-02-07)
parents 9e01bc6321ea
children 6b33f9da53d4
line source
1 # SliTaz package receipt.
3 PACKAGE="fluxbox"
4 VERSION="1.3.7"
5 CATEGORY="x-window"
6 SHORT_DESC="Fluxbox is a light and fast window manager for X."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="MIT"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.fluxbox.org/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 TAGS="window-manager"
14 DEPENDS="xorg fontconfig imlib2 hsetroot xorg-xcompmgr"
15 BUILD_DEPENDS="xorg-dev fontconfig-dev imlib2-dev"
17 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - https://sourceforge.net/projects/fluxbox/files/fluxbox/ 2>/dev/null | \
21 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
22 sed '/scope="row/!d;s|.*/fluxbox/||;s|/.*||;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 cd $src
29 ./configure $CONFIGURE_ARGS &&
30 make 2>&1 | grep -v defaults.cc: && make install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 mkdir -p $fs/usr/share/fluxbox/styles
37 cp -a $install/usr/bin $fs/usr
38 for f in apps keys overlay windowmenu init menu
39 do
40 cp -a $install/usr/share/fluxbox/$f $fs/usr/share/fluxbox
41 done
43 # 3 Default themes --> fluxbox-themes
44 for s in Shade Flux Results
45 do
46 cp -a $install/usr/share/fluxbox/styles/$s \
47 $fs/usr/share/fluxbox/styles
48 done
50 # Split tools --> fluxbox-tools
51 for t in fbsetroot fbsetbg fluxbox-generate_menu fluxbox-remote \
52 fluxbox-update_configs
53 do
54 rm $fs/usr/bin/$t
55 done
57 # XDG Xsessions
58 cp -a $stuff/xsessions $fs/usr/share
60 # Custom SliTaz integration
61 mkdir -p $fs/usr/share/slitaz/fluxbox
62 cp -a $stuff/fluxbox-session $fs/usr/bin
63 cp -a $stuff/startup $fs/usr/share/slitaz/fluxbox
64 cp -a $stuff/styles $fs/usr/share/fluxbox
65 # Overwrite
66 cp -f $stuff/menu $fs/usr/share/fluxbox
67 cp -f $stuff/init $fs/usr/share/fluxbox
68 }
70 post_install()
71 {
72 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
73 # Adding WM to SLIM available sessions.
74 if ! echo "$res" | grep -q $PACKAGE; then
75 echo -n "Adding $PACKAGE to /etc/slim.conf..."
76 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
77 status
78 fi
79 }
81 post_remove()
82 {
83 # Remove WM from SLIM available sessions.
84 if grep -q $PACKAGE "$1/etc/slim.conf"; then
85 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
86 fi
87 }