wok-next view jwm/receipt @ rev 21017

Some maintenance
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 16 16:46:05 2018 +0300 (2018-10-16)
parents d6378d455338
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="jwm"
4 VERSION="2.2.0"
5 CATEGORY="x-window"
6 SHORT_DESC="JWM is a light Window Manager for the X window system"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://joewing.net/programs/jwm/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="http://www.joewing.net/programs/jwm/releases/$TARBALL"
14 BUILD_DEPENDS="xorg-libX11-dev xorg-libXft-dev jpeg-dev libpng16-dev \
15 xorg-libXext-dev gettext"
17 compile_rules() {
18 case "$ARCH" in
19 arm*) ARCH_ARGS="--disable-nls";;
20 *) ARCH_ARGS="";;
21 esac
23 ./configure \
24 --sysconfdir=/etc/xdg/jwm \
25 --disable-fribidi \
26 --disable-rpath \
27 --disable-rsvg \
28 --disable-confirm \
29 $ARCH_ARGS \
30 $CONFIGURE_ARGS &&
31 make &&
32 make install || return 1
34 # Simple and default config file
35 install -Dm644 $stuff/simple.jwmrc $install/etc/xdg/jwm/simple.jwmrc
36 install -Dm644 $stuff/slitaz.jwmrc $install/etc/xdg/jwm/system.jwmrc
37 install -Dm644 $stuff/xsessions/jwm.desktop $install/usr/share/xsessions/jwm.desktop
38 }
40 testsuite() {
41 readelf -h $install/usr/bin/jwm
42 }
44 genpkg_rules() {
45 copy @std
46 DEPENDS="xorg-libX11 xorg-libXft xorg-libXrender xorg-libXpm xorg-libXext \
47 xorg-libXmu xorg-libXinerama xorg-libXau xorg-libXdmcp xorg-libXt libjpeg \
48 libpng16 slitaz-configs-base xorg-xload xorg-xclock imlib2 hsetroot"
49 case "$ARCH" in
50 arm*) DEPENDS="$DEPENDS joe lynx ytree";;
51 *) DEPENDS="$DEPENDS compton nano" ;;
52 esac
53 TAGS="window-manager"
54 }
56 post_install() {
57 if [ -d "$1/etc/jwm" ]; then
58 # Removing old system wide configs: /etc/jwm
59 rm -rf "$1/etc/jwm"
60 fi
61 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
62 # Adding WM to SLIM available sessions.
63 if ! echo "$res" | grep -q $PACKAGE; then
64 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
65 fi
66 true
67 }
69 post_remove() {
70 # Remove WM from SLIM available sessions.
71 if grep -q $PACKAGE "$1/etc/slim.conf"; then
72 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
73 fi
74 }