wok-6.x annotate spectrwm/receipt @ rev 25413

updated wkhtmltopdf (0.12.5 -> 0.12.6)
author Hans-G?nter Theisgen
date Thu Aug 04 08:30:32 2022 +0100 (2022-08-04)
parents 5ea0ce1cecc0
children
rev   line source
al@18177 1 # SliTaz package receipt.
al@18177 2
al@18177 3 PACKAGE="spectrwm"
Hans-G?nter@25318 4 VERSION="3.4.1"
al@18177 5 CATEGORY="x-window"
Hans-G?nter@21936 6 TAGS="tile window-manager"
Hans-G?nter@21936 7 SHORT_DESC="Small dynamic tiling window manager for X11."
al@18177 8 MAINTAINER="al.bobylev@gmail.com"
Hans-G?nter@25318 9 LICENSE="ISC"
pascal@20679 10 WEB_SITE="https://github.com/conformal/spectrwm"
Hans-G?nter@21936 11
Hans-G?nter@21936 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@21936 13 WGET_URL="$WEB_SITE/archive/SPECTRWM_${VERSION//./_}.tar.gz"
al@18177 14
Hans-G?nter@25318 15 DEPENDS="dmenu freetype libxml2 xcb-util xcb-util-keysyms
Hans-G?nter@25318 16 xcb-util-wm xlockmore xorg-libXcursor xorg-libXft"
Hans-G?nter@25318 17 BUILD_DEPENDS="cacerts freetype-dev libxml2-dev xcb-util-dev
Hans-G?nter@25318 18 xcb-util-keysyms-dev xcb-util-wm-dev xorg-libX11-dev
Hans-G?nter@25318 19 xorg-libXcursor-dev xorg-libXft-dev xorg-libXrandr-dev
Hans-G?nter@25318 20 xorg-libXt-dev"
Hans-G?nter@21936 21
Hans-G?nter@21936 22 CONFIG_FILES="/etc/spectrwm.conf"
al@18177 23
pascal@24055 24 current_version()
pascal@24055 25 {
pascal@24055 26 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
pascal@24055 27 sed '/archive.*tar/!d;s|.*/SPECTRWM_\(.*\).tar.*|\1|;s|_|.|g;q'
pascal@24055 28 }
pascal@24055 29
al@18177 30 # Rules to configure and make the package.
al@18177 31 compile_rules()
al@18177 32 {
Hans-G?nter@25318 33 cd linux
Hans-G?nter@25318 34 make PREFIX=/usr &&
Hans-G?nter@25318 35 make install \
Hans-G?nter@25318 36 PREFIX=/usr \
Hans-G?nter@25318 37 DESTDIR=$install
al@18177 38 }
al@18177 39
al@18177 40 # Rules to gen a SliTaz package suitable for Tazpkg.
al@18177 41 genpkg_rules()
al@18177 42 {
al@18177 43 mkdir -p $fs/etc
Hans-G?nter@21936 44
Hans-G?nter@25318 45 cp -a $install/* $fs
Hans-G?nter@23661 46
Hans-G?nter@23661 47 # copy configuration files (few more exist in $src)
Hans-G?nter@23661 48 cp $src/spectrwm.conf $fs/etc
Hans-G?nter@23661 49 cp $src/spectrwm_us.conf $fs/etc
Hans-G?nter@21936 50
al@18177 51 # "switch on" keyboard mapping
al@18177 52 sed -i 's|# keyboard_mapping.*|keyboard_mapping = /etc/spectrwm_us.conf|' \
Hans-G?nter@25318 53 $fs/etc/spectrwm.conf
Hans-G?nter@25318 54
Hans-G?nter@25318 55 # set bar_font
Hans-G?nter@25318 56 sed -i 's|# bar_font\t|bar_font\t|' \
Hans-G?nter@25318 57 $fs/etc/spectrwm.conf
al@18177 58 }
Hans-G?nter@25318 59
Hans-G?nter@25318 60 post_install()
Hans-G?nter@25318 61 {
Hans-G?nter@25318 62 # Adding spectrwm to SLIM available sessions.
Hans-G?nter@25318 63 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
Hans-G?nter@25318 64 if ! echo "$res" | grep -q $PACKAGE
Hans-G?nter@25318 65 then
Hans-G?nter@25318 66 echo -n "Adding $PACKAGE to /etc/slim.conf..."
Hans-G?nter@25318 67 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" \
Hans-G?nter@25318 68 "$1/etc/slim.conf"
Hans-G?nter@25318 69 status
Hans-G?nter@25318 70 fi
Hans-G?nter@25318 71 true
Hans-G?nter@25318 72 }
Hans-G?nter@25318 73
Hans-G?nter@25318 74 post_remove()
Hans-G?nter@25318 75 {
Hans-G?nter@25318 76 # Remove spectrwm from SLIM available sessions.
Hans-G?nter@25318 77 if grep -q $PACKAGE "$1/etc/slim.conf"
Hans-G?nter@25318 78 then
Hans-G?nter@25318 79 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
Hans-G?nter@25318 80 fi
Hans-G?nter@25318 81 }