# $Id$ PNAME="novnc" PVER="1.0.0" PBUILD="r2" PCAT="net-misc" DESCRIPTION="." HOMEPAGE="https://github.com/novnc/noVNC/" DEPEND=">= net-www/apache2-2.4 >= net-misc/websockify-0.8" SRCFILE="v${PVER}.tar.gz" SRCDIR="${BUILDDIR}/noVNC-${PVER}" sminclude mtools SRC_URI=( https://github.com/novnc/noVNC/archive/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/novnc-apache.conf ) UP2SEPERATOR="v" UP2DATE="updatecmd https://github.com/novnc/noVNC/releases | highesttarball gz" src_prepare() { munpack ${SRCFILE} || die } src_install() { cd ${SRCDIR} minstalldir /usr/share/novnc/app || die minstalldir /usr/share/novnc/core || die minstalldir /usr/share/novnc/vendor || die # copy only minimal required files cp -R app/* ${BINDIR}/usr/share/novnc/app/ || die cp -R core/* ${BINDIR}/usr/share/novnc/core/ || die cp -R vendor/* ${BINDIR}/usr/share/novnc/vendor/ || die minstallfile ${SRCDIR}/vnc.html /usr/share/novnc/ || die minstallfile ${SRCDIR}/vnc_lite.html /usr/share/novnc/ || die # use vnc.html as default index mlink vnc.html /usr/share/novnc/index.html || die # fix permissions mchown -R root:root /usr/share/novnc || die find ${BINDIR}/usr/share/novnc -type d -exec chmod 0755 '{}' ';' || die find ${BINDIR}/usr/share/novnc -type f -exec chmod 0644 '{}' ';' || die # install apache config local APACHE_SYSCONFDIR=$(apxs -q sysconfdir) minstalldir ${APACHE_SYSCONFDIR} || die minstalldir ${APACHE_SYSCONFDIR}/modules.d || die minstallfile -s novnc-apache.conf ${APACHE_SYSCONFDIR}/modules.d/novnc.conf || die minstalldocs README.md LICENSE.txt }