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