wok view pekwm/receipt @ rev 25442
Update some wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Sep 02 16:30:36 2022 +0000 (2022-09-02) |
parents | 35b57cb1532a |
children | 0262035dc1e7 |
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 current_version()
20 {
21 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
22 sed '/archive.*tar/!d;s|.*/release-\(.*\).tar.*|\1|;q'
23 }
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 mkdir _build
29 cd _build
30 cmake .. \
31 -D CMAKE_INSTALL_PREFIX=/usr &&
32 make &&
33 make install DESTDIR=$DESTDIR
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 mkdir -p $fs/usr/share
41 cp -a $install/etc $fs
42 cp -a $install/usr/bin $fs/usr
43 cp -a $install/usr/share/pekwm $fs/usr/share
45 # Custom configuration files and scripts
46 cp -a $stuff/etc $fs
47 cp -a $stuff/scripts $fs/usr/share/pekwm
49 # Set permissions
50 chown -R root.root $fs
51 chmod +x $fs/etc/pekwm/start
52 chmod +x $fs/usr/share/pekwm/scripts/*
53 chmod 0755 $fs/usr/bin/pekwm
54 }
56 post_install()
57 {
58 # Pekwm searches for default font path (100dpi folder) for xserver to render
59 # menus; either manually set it in .xinitrc or fake 100dpi folder fonts
60 # by linking to ttf-dejavu
61 if [ ! -d "$1/usr/share/fonts/X11/100dpi/" ]
62 then
63 mkdir -p "$1/usr/share/fonts/X11/100dpi"
64 cd "$1/usr/share/fonts/X11/100dpi"
65 ln -s ../../truetype/ttf-dejavu/* .
66 fi
68 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
69 # Adding window manager to SLIM available sessions.
70 if ! echo "$res" | grep -q $PACKAGE
71 then
72 echo
73 echo -n "Adding $PACKAGE to /etc/slim.conf..."
74 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" \
75 "$1/etc/slim.conf"
76 status
77 fi
78 }
80 post_remove()
81 {
82 # Remove window manager from SLIM available sessions.
83 if grep -q $PACKAGE "$1/etc/slim.conf"
84 then
85 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
86 fi
87 }