SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "openbox-theme-chrommo"

# SliTaz package receipt.

PACKAGE="openbox-theme-chrommo"
VERSION="20150601"
CATEGORY="customization"
SHORT_DESC="Chrommo - theme for Openbox 3"
MAINTAINER="al.bobylev@gmail.com"
LICENSE="PublicDomain"
WEB_SITE="https://github.com/SliTaz-official/hackdorte-artwork/tree/master/themes"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="https://download.tuxfamily.org/slitaz/sources/packages-cooking/${TARBALL:0:1}/$TARBALL"
TAGS="hackdorte openbox"
HOST_ARCH="any"

DEPENDS="openbox"
BUILD_DEPENDS=""

# Rules to configure and make the package.
compile_rules()
{
    mkdir -p $install/usr/share/themes/Chrommo
    cp -a $src/chrommo/* $install/usr/share/themes/Chrommo
    chmod a-x $install/usr/share/themes/Chrommo/openbox-3/themerc
    chown -R root:root $install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    cp -a $install/* $fs
}

post_install()
{
    # Set Openbox theme
    for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
        [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Chrommo<|' $i
    done
    [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
}

pre_remove()
{
    # Restore Openbox theme (SliTaz)
    for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do
        [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i
    done
    [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure
}
5935 packages and 845883 files in cooking database (Sun Jun 30 00:45:24 2024)