wok-next annotate jwm/receipt @ rev 20534

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