wok annotate i3/receipt @ rev 25454

oldrunner: add apple2 keys mapping
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 22 07:58:57 2022 +0000 (2022-09-22)
parents 83b97236db32
children
rev   line source
pascal@13231 1 # SliTaz package receipt.
pascal@13231 2
pascal@13231 3 PACKAGE="i3"
Hans-G?nter@24652 4 VERSION="4.20.1"
pascal@13231 5 CATEGORY="x-window"
Hans-G?nter@24050 6 SHORT_DESC="i3 tiling window manager."
pascal@16048 7 MAINTAINER="ybringler@gmail.com"
pascal@15600 8 LICENSE="BSD"
pascal@20671 9 WEB_SITE="https://i3wm.org"
Hans-G?nter@24050 10
Hans-G?nter@24050 11 TARBALL="$PACKAGE-$VERSION.tar.xz"
pascal@13231 12 WGET_URL="$WEB_SITE/downloads/$TARBALL"
pascal@15600 13
Hans-G?nter@24652 14 SUGGESTED="i3status"
Hans-G?nter@24652 15 DEPENDS="dmenu gcc83-lib-base libev libxcb libxkbcommon libxml2
Hans-G?nter@24050 16 startup-notification xcb-util xcb-util-cursor xcb-util-image
Hans-G?nter@24050 17 xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util-xrm
Hans-G?nter@24050 18 xorg-libX11 xorg-libXcursor yajl"
Hans-G?nter@24050 19 BUILD_DEPENDS="docbook-xml gcc83 libev-dev libxcb-dev libxkbcommon-dev
Hans-G?nter@24652 20 libxml2-dev meson pango-dev pcre-dev pkg-config
Hans-G?nter@24652 21 startup-notification-dev xcb-util-cursor-dev xcb-util-dev
Hans-G?nter@24652 22 xcb-util-image-dev xcb-util-keysyms-dev xcb-util-renderutil-dev
Hans-G?nter@24652 23 xcb-util-wm-dev xcb-util-xrm-dev xorg-libX11-dev
Hans-G?nter@24652 24 xorg-libXcursor-dev yajl"
pascal@13231 25
pascal@24427 26 # What is the latest version available today?
pascal@24427 27 current_version()
pascal@24427 28 {
pascal@24427 29 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24427 30 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24427 31 }
pascal@24427 32
pascal@13231 33 # Rules to configure and make the package.
pascal@13231 34 compile_rules()
pascal@13231 35 {
Hans-G?nter@24050 36 export CC=gcc-83
Hans-G?nter@24652 37
Hans-G?nter@24652 38 meson _build \
Hans-G?nter@24050 39 --prefix=/usr &&
Hans-G?nter@24652 40 ninja -C _build &&
Hans-G?nter@24652 41 ninja -C _build install
pascal@13231 42 }
pascal@13231 43
pascal@13231 44 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@13231 45
pascal@13231 46 genpkg_rules()
pascal@13231 47 {
Hans-G?nter@24050 48 mkdir -p $fs/usr/share
Hans-G?nter@24050 49
Hans-G?nter@24050 50 cp -a $install/etc $fs
Hans-G?nter@24050 51 cp -a $install/usr/bin $fs/usr
Hans-G?nter@24050 52 cp -a $install/usr/share/applications $fs/usr/share
Hans-G?nter@24050 53 cp -a $install/usr/share/xsessions $fs/usr/share
pascal@13231 54 }
Hans-G?nter@24050 55
Hans-G?nter@24050 56 post_install()
Hans-G?nter@24050 57 {
Hans-G?nter@24050 58 # Add WM to SLIM available sessions.
Hans-G?nter@24050 59 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
Hans-G?nter@24050 60 if ! echo "$res" | grep -q $PACKAGE
Hans-G?nter@24050 61 then
Hans-G?nter@24050 62 echo -n "Adding $PACKAGE to /etc/slim.conf..."
Hans-G?nter@24050 63 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" \
Hans-G?nter@24050 64 "$1/etc/slim.conf"
Hans-G?nter@24050 65 status
Hans-G?nter@24050 66 fi
Hans-G?nter@24050 67 true
Hans-G?nter@24050 68 }
Hans-G?nter@24050 69
Hans-G?nter@24050 70 post_remove()
Hans-G?nter@24050 71 {
Hans-G?nter@24050 72 # Remove WM from SLIM available sessions.
Hans-G?nter@24050 73 if grep -q $PACKAGE "$1/etc/slim.conf"
Hans-G?nter@24050 74 then
Hans-G?nter@24050 75 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
Hans-G?nter@24050 76 fi
Hans-G?nter@24050 77 }