SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "i3"

# SliTaz package receipt.

PACKAGE="i3"
VERSION="4.20.1"
CATEGORY="x-window"
SHORT_DESC="i3 tiling window manager."
MAINTAINER="ybringler@gmail.com"
LICENSE="BSD"
WEB_SITE="https://i3wm.org"

TARBALL="$PACKAGE-$VERSION.tar.xz"
WGET_URL="$WEB_SITE/downloads/$TARBALL"

SUGGESTED="i3status"
DEPENDS="dmenu gcc83-lib-base libev libxcb libxkbcommon libxml2
    startup-notification xcb-util xcb-util-cursor xcb-util-image 
    xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util-xrm 
    xorg-libX11 xorg-libXcursor yajl"
BUILD_DEPENDS="docbook-xml gcc83 libev-dev libxcb-dev libxkbcommon-dev 
    libxml2-dev meson pango-dev pcre-dev pkg-config
    startup-notification-dev xcb-util-cursor-dev xcb-util-dev
    xcb-util-image-dev xcb-util-keysyms-dev xcb-util-renderutil-dev
    xcb-util-wm-dev xcb-util-xrm-dev xorg-libX11-dev
    xorg-libXcursor-dev yajl"

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

# Rules to configure and make the package.
compile_rules()
{
    export    CC=gcc-83

    meson    _build        \
        --prefix=/usr &&
    ninja    -C _build &&
    ninja    -C _build install
}

# Rules to gen a SliTaz package suitable for Tazpkg.

genpkg_rules()
{
    mkdir -p $fs/usr/share

    cp -a $install/etc            $fs
    cp -a $install/usr/bin            $fs/usr
    cp -a $install/usr/share/applications    $fs/usr/share
    cp -a $install/usr/share/xsessions    $fs/usr/share
}

post_install()
{
    # Add 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
}
6047 packages and 209931 files in current database (Mon Jul 1 15:25:36 2024)