wok view dwm/receipt @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (23 months ago)
parents bfabe25c21ff
children
line source
1 # SliTaz package receipt.
3 PACKAGE="dwm"
4 VERSION="6.3"
5 CATEGORY="x-window"
6 TAGS="window-manager"
7 SHORT_DESC="Very light dynamic window manager for X."
8 MAINTAINER="pankso@slitaz.org"
9 LICENSE="MIT"
10 WEB_SITE="https://dwm.suckless.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.gz"
13 WGET_URL="https://dl.suckless.org/dwm/$TARBALL"
15 DEPENDS="xorg-libX11 xorg-xsetroot"
16 BUILD_DEPENDS="xorg-libX11-dev xorg-libXinerama-dev xorg-xineramaproto
17 xorg-xproto"
19 HOST_ARCH="i486 arm"
21 # What is the latest version available today?
22 current_version()
23 {
24 wget -O - ${WGET_URL%/*} 2>/dev/null | \
25 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 # From blue to grey and have lighter grey
32 sed -i s/'#0066ff'/'#222222'/g config.def.h
33 sed -i s/'#cccccc'/'#f1efeb'/g config.def.h
35 # 6 tag-mask
36 sed -i s/', "7", "8", "9"'// config.def.h
38 # Firefox on current tag-mask
39 sed -i s/'1 << 8,'/'0, '/ config.def.h
41 # [Shift]+[Alt]+[Enter]
42 sed -i s/uxterm/xterm/ config.def.h
44 make CC=${HOST_SYSTEM}-gcc
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $fs/usr/bin
52 cp -a $src/dwm $fs/usr/bin
53 cp -a $stuff/dwm-session $fs/usr/bin
54 chown 0.0 $fs/usr/bin/*
55 }
57 post_install()
58 {
59 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
60 # Adding dwm to SLIM available sessions.
61 if ! echo "$res" | grep -q $PACKAGE
62 then
63 echo
64 echo -n "Adding $PACKAGE to /etc/slim.conf..."
65 sed -i "s/^sessions.*/sessions ${res},dwm/" /etc/slim.conf
66 status
67 fi
68 }
70 post_remove()
71 {
72 # Remove dwm from SLIM available sessions.
73 if grep -q dwm "$1/etc/slim.conf"
74 then
75 sed -i s/,dwm// "$1/etc/slim.conf"
76 fi
77 }