SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "jwm"

# SliTaz package receipt.

PACKAGE="jwm"
VERSION="2.4.1"
CATEGORY="x-window"
TAGS="window-manager"
SHORT_DESC="A light Window Manager for the X window system."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://joewing.net/projects/jwm/"

TARBALL="$PACKAGE-$VERSION.tar.xz"
WGET_URL="${WEB_SITE}releases/$TARBALL"

SUGGESTED="jwm-lang"
DEPENDS="hsetroot imlib2 libjpeg libpng librsvg libxml2 slitaz-configs-base
    xorg-libX11 xorg-libXau xorg-libXdmcp xorg-libXext xorg-libXft
    xorg-libXinerama xorg-libXmu xorg-libXpm xorg-libXrender
    xorg-libXt xorg-xclock xorg-xload"
BUILD_DEPENDS="cairo-dev freetype-dev jpeg-dev libpng-dev librsvg-dev 
    libxml2-dev xorg-libX11-dev xorg-libXft-dev"

HOST_ARCH="i486 arm"

# Handle cross compilation
case "$ARCH" in
    arm)
        DEPENDS="$DEPENDS joe lynx ytree"
        ARCH_ARGS="--disable-nls" ;;
    i?86)
        DEPENDS="$DEPENDS compton nano" ;;
esac

# What is the latest version available today?
current_version()
{
    wget -O - $WEB_SITE 2>/dev/null | \
    sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    #[ -f done.resize-backgound.u ] || patch -p1 < $stuff/resize-backgound.u
    #touch done.resize-backgound.u

    ./configure                \
        --prefix=/usr            \
        --mandir=/usr/share/man        \
        --datadir=/usr/share        \
        --sysconfdir=/etc/xdg/jwm    \
        --enable-cairo=yes        \
        --enable-confirm=no        \
        --enable-nls=yes        \
        --enable-rpath=no        \
        --enable-rsvg=yes        \
        --enable-xft=yes        \
        $CONFIGURE_ARGS            \
        $ARCH_ARGS &&
    sed -i 's|mkdir_p = @mkdir_p@|mkdir_p = /bin/mkdir -p|' \
        po/Makefile &&
    make &&
    make install
}

testsuite()
{
    readelf -h $install/usr/bin/jwm
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/etc/xdg/jwm
    mkdir -p $fs/usr/share

    cook_copy_folders    bin

    # Simple and default configuration file.
    cp $stuff/simple.jwmrc    $fs/etc/xdg/jwm/simple.jwmrc
    cp $stuff/slitaz.jwmrc    $fs/etc/xdg/jwm/system.jwmrc

    cp -r $stuff/xsessions    $fs/usr/share
}

post_install()
{
    if [ -d "$1/etc/jwm" ]
      then
        echo "Removing old system wide configuration files: /etc/jwm"
        rm -rf    "$1/etc/jwm"
    fi

    # Adding WM to SLIM available sessions.
    res=$(cat "$1/etc/slim.conf" | grep ^session | sed s/"sessions. *"//)
    if ! echo "$res" | grep -q $PACKAGE
      then
        echo -n "Adding $PACKAGE to /etc/slim.conf..."
        sed -i "s/^sessions.*/sessions            ${res},$PACKAGE/" \
            "$1/etc/slim.conf"
        status
    fi
    true
}

post_remove()
{
    # Remove WM from SLIM available sessions.
    if grep -q $PACKAGE "$1/etc/slim.conf"
      then
        sed -i s/,$PACKAGE//    "$1/etc/slim.conf"
    fi
}
6063 packages and 233209 files in current database (Sat Dec 21 00:00:03 2024)