SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "novnc"

# SliTaz package receipt.

PACKAGE="novnc"
VERSION="0.5.1"
CATEGORY="network"
TAGS="vnc remote-desktop html5"
SHORT_DESC="VNC client in HTML5/javascript."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="MPL2"
WEB_SITE="https://github.com/novnc/noVNC"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://github.com/$PACKAGE/noVNC/archive/v$VERSION.tar.gz"

SUGGESTED="pyopenssl openssl"
DEPENDS="python python-numpy"
BUILD_DEPENDS="python python-pil openssl"

#HOST_ARCH="any"

current_version()
{
    wget -O - https://github.com/novnc/noVNC/releases 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's/bash/sh/;s/ps -p \([^ ]*\)/ps | grep "^ *\1 "/' \
        utils/launch.sh

    IMAGE=/usr/share/images/slitaz-background.jpg
    [ -s $IMAGE ] &&
    utils/img2js.py $IMAGE noVNC_logo > include/logo.js

    mkdir -p $DESTDIR
    cp -a *.html            $DESTDIR
    cp -a images            $DESTDIR
    cp -a utils            $DESTDIR
    cp -a include            $DESTDIR
}

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

post_install()
{
    which openssl > /dev/null &&
    openssl    req                    \
        -new                    \
        -x509                    \
        -keyout "$1/usr/share/novnc/self.pem"    \
        -out "$1/usr/share/novnc/self.pem"    \
        -days 3650                \
        -nodes <<EOT
$(. "$1/etc/locale.conf" ; echo ${LANG#*_})
$(cat "$1/etc/TZ")

$(cat "$1/etc/hostname")



EOT
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)