wok annotate jwm/receipt @ rev 24433

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 12 18:42:31 2022 +0000 (2022-02-12)
parents 3f1e8cc50b2b
children fba451138c89
rev   line source
pankso@25 1 # SliTaz package receipt.
pankso@25 2
pankso@25 3 PACKAGE="jwm"
Hans-G?nter@21088 4 VERSION="2.3.7"
pankso@25 5 CATEGORY="x-window"
Hans-G?nter@21088 6 TAGS="window-manager"
Hans-G?nter@21088 7 SHORT_DESC="A light Window Manager for the X window system."
pankso@25 8 MAINTAINER="pankso@slitaz.org"
pascal@15215 9 LICENSE="GPL2"
Hans-G?nter@21088 10 WEB_SITE="http://joewing.net/projects/jwm/"
Hans-G?nter@21088 11
pankso@15940 12 TARBALL="$PACKAGE-$VERSION.tar.xz"
Hans-G?nter@21088 13 WGET_URL="${WEB_SITE}releases/$TARBALL"
Hans-G?nter@21088 14
Hans-G?nter@21088 15 DEPENDS="hsetroot imlib2 libjpeg libpng slitaz-configs-base \
Hans-G?nter@21088 16 xorg-libX11 xorg-libXau xorg-libXdmcp xorg-libXext xorg-libXft \
Hans-G?nter@21088 17 xorg-libXinerama xorg-libXmu xorg-libXpm xorg-libXrender \
Hans-G?nter@21088 18 xorg-libXt xorg-xclock xorg-xload"
Hans-G?nter@21088 19 BUILD_DEPENDS="jpeg-dev libpng-dev xorg-libX11-dev xorg-libXft-dev"
pankso@16067 20 HOST_ARCH="i486 arm"
pankso@25 21
pankso@16067 22 # Handle cross compilation
pankso@16067 23 case "$ARCH" in
pankso@16081 24 arm)
pankso@16081 25 DEPENDS="$DEPENDS joe lynx ytree"
pankso@16081 26 ARCH_ARGS="--disable-nls" ;;
pankso@16081 27 i?86)
pankso@16081 28 DEPENDS="$DEPENDS compton nano" ;;
pankso@16067 29 esac
pankso@12019 30
pascal@24433 31 # What is the latest version available today?
pascal@24433 32 current_version()
pascal@24433 33 {
pascal@24433 34 wget -O - $WEB_SITE 2>/dev/null | \
pascal@24433 35 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24433 36 }
pascal@24433 37
pankso@25 38 # Rules to configure and make the package.
pankso@25 39 compile_rules()
pankso@25 40 {
pankso@15940 41 #[ -f done.resize-backgound.u ] || patch -p1 < $stuff/resize-backgound.u
pankso@15940 42 #touch done.resize-backgound.u
Hans-G?nter@21088 43 ./configure \
Hans-G?nter@21088 44 --prefix=/usr \
Hans-G?nter@21088 45 --mandir=/usr/share/man \
Hans-G?nter@21088 46 --sysconfdir=/etc/xdg/jwm \
Hans-G?nter@21088 47 --disable-fribidi \
Hans-G?nter@21088 48 --disable-rpath \
Hans-G?nter@21088 49 --disable-rsvg \
Hans-G?nter@21088 50 --disable-confirm \
pankso@16067 51 $CONFIGURE_ARGS $ARCH_ARGS 2>/dev/null &&
Hans-G?nter@21088 52 make -j 1 &&
Hans-G?nter@21088 53 make install
pankso@25 54 }
pankso@25 55
pankso@16067 56 testsuite()
pankso@16067 57 {
pankso@16067 58 readelf -h $install/usr/bin/jwm
pankso@16067 59 }
pankso@16067 60
pankso@25 61 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@25 62 genpkg_rules()
pankso@25 63 {
Hans-G?nter@21088 64 mkdir -p $fs/etc/xdg/jwm
Hans-G?nter@21088 65 mkdir -p $fs/usr/share
Hans-G?nter@21088 66
pankso@15940 67 cp -a $install/usr/bin $fs/usr/bin
Hans-G?nter@21088 68
pankso@12019 69 # Simple and default config file.
pankso@12407 70 cp $stuff/simple.jwmrc $fs/etc/xdg/jwm/simple.jwmrc
pankso@12407 71 cp $stuff/slitaz.jwmrc $fs/etc/xdg/jwm/system.jwmrc
Hans-G?nter@21088 72
pankso@12407 73 cp -r $stuff/xsessions $fs/usr/share
pankso@25 74 }
pankso@12308 75
pankso@12308 76 post_install()
pankso@12308 77 {
pankso@12407 78 if [ -d "$1/etc/jwm" ]; then
pascal@18730 79 echo "Removing old system wide configs: /etc/jwm"
pascal@18730 80 rm -rf "$1/etc/jwm"
pankso@12407 81 fi
Hans-G?nter@21088 82
Hans-G?nter@21088 83 # Adding WM to SLIM available sessions.
pascal@18730 84 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
pankso@12308 85 if ! echo "$res" | grep -q $PACKAGE; then
pankso@12308 86 echo -n "Adding $PACKAGE to /etc/slim.conf..."
pascal@18730 87 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
pankso@12308 88 status
pankso@12308 89 fi
pascal@18707 90 true
pankso@12308 91 }
pankso@12308 92
pankso@12308 93 post_remove()
pankso@12308 94 {
pankso@12308 95 # Remove WM from SLIM available sessions.
pascal@18730 96 if grep -q $PACKAGE "$1/etc/slim.conf"; then
pascal@18730 97 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
pankso@12308 98 fi
pankso@12308 99 }