wok-next view jwm/receipt @ rev 20361

cream, kazehakase: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 23 18:14:17 2017 +0100 (2017-11-23)
parents 9e01bc6321ea
children dd145c435e4b
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.xz"
10 WEB_SITE="http://www.joewing.net/programs/jwm/"
11 WGET_URL="http://www.joewing.net/programs/jwm/releases/$TARBALL"
12 TAGS="window-manager"
13 HOST_ARCH="i486 arm"
15 DEPENDS="xorg-libX11 xorg-libXft xorg-libXrender xorg-libXpm xorg-libXext \
16 xorg-libXmu xorg-libXinerama xorg-libXau xorg-libXdmcp xorg-libXt libjpeg \
17 libpng slitaz-configs-base xorg-xload xorg-xclock imlib2 hsetroot"
18 BUILD_DEPENDS="xorg-libX11-dev xorg-libXft-dev jpeg-dev libpng-dev \
19 xorg-libXext-dev gettext"
21 # Handle cross compilation
22 case "$ARCH" in
23 arm)
24 DEPENDS="$DEPENDS joe lynx ytree"
25 ARCH_ARGS="--disable-nls" ;;
26 i?86)
27 DEPENDS="$DEPENDS compton nano" ;;
28 esac
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 #[ -f done.resize-backgound.u ] || patch -p1 < $stuff/resize-backgound.u
34 #touch done.resize-backgound.u
35 ./configure \
36 --prefix=/usr \
37 --mandir=/usr/share/man \
38 --sysconfdir=/etc/xdg/jwm \
39 --disable-fribidi \
40 --disable-rpath \
41 --disable-rsvg \
42 --disable-confirm \
43 $CONFIGURE_ARGS $ARCH_ARGS 2>/dev/null &&
44 make && make install
45 }
47 testsuite()
48 {
49 readelf -h $install/usr/bin/jwm
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/etc/xdg/jwm $fs/usr/share
56 cp -a $install/usr/bin $fs/usr/bin
57 # Simple and default config file.
58 cp $stuff/simple.jwmrc $fs/etc/xdg/jwm/simple.jwmrc
59 cp $stuff/slitaz.jwmrc $fs/etc/xdg/jwm/system.jwmrc
60 cp -r $stuff/xsessions $fs/usr/share
61 }
63 post_install()
64 {
65 if [ -d "$1/etc/jwm" ]; then
66 echo "Removing old system wide configs: /etc/jwm"
67 rm -rf "$1/etc/jwm"
68 fi
69 res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
70 # Adding WM to SLIM available sessions.
71 if ! echo "$res" | grep -q $PACKAGE; then
72 echo -n "Adding $PACKAGE to /etc/slim.conf..."
73 sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" "$1/etc/slim.conf"
74 status
75 fi
76 true
77 }
79 post_remove()
80 {
81 # Remove WM from SLIM available sessions.
82 if grep -q $PACKAGE "$1/etc/slim.conf"; then
83 sed -i s/,$PACKAGE// "$1/etc/slim.conf"
84 fi
85 }