wok view pekwm/receipt @ rev 25601

Update some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 16 18:06:38 2023 +0000 (10 months ago)
parents d521a8fdb812
children
line source
1 # SliTaz package receipt.
3 PACKAGE="pekwm"
4 VERSION="0.2.1"
5 CATEGORY="x-window"
6 TAGS="window-manager"
7 SHORT_DESC="Very light, configurable and themable window manager for X."
8 MAINTAINER="jozee@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://www.pekwm.se/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://github.com/pekdon/$PACKAGE/archive/release-$VERSION.tar.gz"
15 SUGGESTED="hsetroot lxpanel tint2 wbar wmctrl xdotool xorg-xev xorg-xprop"
16 DEPENDS="xorg-libX11 xorg-libXft xorg-libXinerama xorg-libXpm xorg-libXrandr"
17 BUILD_DEPENDS="cmake xorg-dev xorg-dev-proto zlib-dev"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
23 sed '/tag\//!d;s|.*tag/[a-z-]*||;s|".*||;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 mkdir _build
30 cd _build
31 cmake .. \
32 -D CMAKE_INSTALL_PREFIX=/usr &&
33 make &&
34 make install DESTDIR=$DESTDIR
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/share
42 cp -a $install/etc $fs
43 cp -a $install/usr/bin $fs/usr
44 cp -a $install/usr/share/pekwm $fs/usr/share
46 # Custom configuration files and scripts
47 cp -a $stuff/etc $fs
48 cp -a $stuff/scripts $fs/usr/share/pekwm
50 # Set permissions
51 chown -R root.root $fs
52 chmod +x $fs/etc/pekwm/start
53 chmod +x $fs/usr/share/pekwm/scripts/*
54 chmod 0755 $fs/usr/bin/pekwm
55 }
57 post_install()
58 {
59 # Pekwm searches for default font path (100dpi folder) for xserver to render
60 # menus; either manually set it in .xinitrc or fake 100dpi folder fonts
61 # by linking to ttf-dejavu
62 if [ ! -d "$1/usr/share/fonts/X11/100dpi/" ]
63 then
64 mkdir -p "$1/usr/share/fonts/X11/100dpi"
65 cd "$1/usr/share/fonts/X11/100dpi"
66 ln -s ../../truetype/ttf-dejavu/* .
67 fi
69 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
70 # Adding window manager to SLIM available sessions.
71 if ! echo "$res" | grep -q $PACKAGE
72 then
73 echo
74 echo -n "Adding $PACKAGE to /etc/slim.conf..."
75 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" \
76 "$1/etc/slim.conf"
77 status
78 fi
79 }
81 post_remove()
82 {
83 # Remove window manager from SLIM available sessions.
84 if grep -q $PACKAGE "$1/etc/slim.conf"
85 then
86 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
87 fi
88 }