# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit webapp DESCRIPTION="Virtual whiteboard for sketching hand-drawn like diagrams" HOMEPAGE="https://excalidraw.com/ https://github.com/excalidraw/excalidraw" SRC_URI="https://github.com/excalidraw/excalidraw/archive/refs/tags/v${PV}.tar.gz" LICENSE="MIT" KEYWORDS="~amd64" IUSE="" BDEPEND=" >=net-libs/nodejs-14 || ( >=sys-apps/yarn-2.4.2 ${S}/.env echo '' > ${S}/.env.production } src_compile() { einfo einfo Fetching npm packages with yarn einfo yarn einfo einfo Building ${PN} einfo yarn build app --production=true } pkg_setup() { webapp_pkg_setup } src_install() { webapp_src_preinst insinto "${MY_HTDOCSDIR}" doins -r ${S}/build/* webapp_src_install } #pkg_postinst() { # local mydir="${ROOT%/}/${VHOST_ROOT}/${MY_HTDOCSBASE}/${PN}" # if [ ! -e $mydir/config.json ]; then # einfo Please copy config.sample.json to config.json # einfo in $mydir and tune it to your needs # fi # webapp_pkg_postinst #}