wok view awesome/receipt @ rev 25690

mmv: inserted current_version()
author Hans-G?nter Theisgen
date Mon Apr 15 15:20:24 2024 +0100 (6 months ago)
parents 5ea0ce1cecc0
children
line source
1 # SliTaz package receipt.
3 PACKAGE="awesome"
4 VERSION="4.3"
5 CATEGORY="x-window"
6 TAGS="window-manager"
7 SHORT_DESC="Highly configurable framework window manager."
8 MAINTAINER="mallory@sweetpeople.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://awesomewm.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="https://github.com/awesomeWM/$PACKAGE/releases/download/v$VERSION/$TARBALL"
15 DEPENDS="cairo dbus gdk-pixbuf lgi libxdg-basedir libxkbcommon lua
16 pango-typelib startup-notification xcb-util-cursor xcb-util-image
17 xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util-xrm"
18 BUILD_DEPENDS="cairo cairo-dev cmake dbus-dev fontconfig-dev freetype-dev
19 gdk-pixbuf-dev gperf imagemagick imlib2-dev lgi libev-dev libpng-dev
20 libltdl libxdg-basedir-dev libxkbcommon-dev lua-dev openexr pango-dev
21 pkg-config startup-notification-dev xcb-util-cursor-dev xcb-util-dev
22 xcb-util-image-dev xcb-util-keysyms-dev xcb-util-renderutil-dev
23 xcb-util-wm-dev xcb-util-xrm-dev xorg-libX11-dev"
25 # What is the latest version available today?
26 current_version()
27 {
28 wget -O - ${WGET_URL%/down*} 2>/dev/null | \
29 sed '/tag\//!d;s|.*tag/v*||;s|".*||;q'
30 }
32 # Rules to configure and make the package.
33 compile_rules()
34 {
35 export LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries -ldl"
36 export AWESOME_IGNORE_LGI=1
37 make \
38 CMAKE_ARGS=" -DCMAKE_INSTALL_PREFIX:PATH=/usr \
39 -DXDG_CONFIG_DIR=/etc/xdg \
40 -DCMAKE_BUILD_TYPE=RELEASE" &&
41 make install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/usr/share/lua
49 cp -a $install/* $fs
51 # move lua scripts to lua directory
52 mv $fs/usr/share/awesome/lib $fs/usr/share/lua/5.2
53 }
55 post_install()
56 {
57 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
58 # Adding WM to SLIM available sessions.
59 if ! echo "$res" | grep -q $PACKAGE
60 then
61 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" \
62 "$1/etc/slim.conf"
63 fi
64 }
66 post_remove()
67 {
68 # Remove WM from SLIM available sessions.
69 if grep -q $PACKAGE "$1/etc/slim.conf"
70 then
71 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
72 fi
73 }