SUMMARY = "vrpmdv-web recipe"
DESCRIPTION = "Recipe to add vrpmdv-setup-page to it's location."
LICENSE = "CLOSED"
# LICENSE_FLAGS = "commercial"

# inherit allarch perlnative cmake pkgconfig 
inherit perlnative

DEPENDS += "perl"
DEPENDS += "boost"


# SRC_URI += " \
#    file://rt_service/CMakeLists.txt \
#    file://rt_service/rt_service.cpp \
# "


SRC_URI+="git://gitea.malehr.de/markus.lehr/vrpmdv-py-rtservice.git;protocol=https;branch=master;user=makus.lehr:gQsZ2Qht346yQG;destsuffix=vrpmdv-py-rtservice;name=vrpmdv-py-rtservice"
SRCREV_vrpmdv-py-rtservice="45380e38b1c0abd7244bd36dd504fb736669a384"


SRC_URI+="git://gitea.malehr.de/markus.lehr/vrpmdv-web.git;protocol=https;branch=master;user=makus.lehr:gQsZ2Qht346yQG;name=vrpmdv-web"
SRCREV_vrpmdv-web="26506799898e8aa8cf0647f01583d6893609656d"

# S = "${WORKDIR}/rt_service"
# B = "${WORKDIR}/rt_service/build"



DESTINATION = "/var/www/vrpmdv-web.local"

FILES:${PN} += "${DESTINATION}"

# do_configure(){
#     set(CMAKE_C_COMPILER_WORKS 1)
# }

# do_compile() {
#
# }

do_install () {
    install -d ${D}${DESTINATION}
    install -d ${D}${DESTINATION}/extensions
    install -d ${D}${DESTINATION}/extensions/rt_service
    
    install -d ${D}${DESTINATION}/build
    install -d ${D}${DESTINATION}/build/assets
    install -m 0644 ${WORKDIR}/git/vrpmdvserver/*.py ${D}/${DESTINATION} 
    install -m 0644 ${WORKDIR}/vrpmdv-py-rtservice/*.so ${D}/${DESTINATION}/extensions/rt_service
    
    install -m 0644 ${WORKDIR}/git/vrpmdvserver/webbuild/index.html ${D}/${DESTINATION}/build
    install -m 0644 ${WORKDIR}/git/vrpmdvserver/webbuild/favicon.ico ${D}/${DESTINATION}/build        
    install -m 0644 ${WORKDIR}/git/vrpmdvserver/webbuild/assets/*.js ${D}/${DESTINATION}/build/assets     
}

# BBCLASSEXTEND =+ "native nativesdk"
# BBCLASSEXTEND =+ "multilib:multilib_name"
RDEPENDS:${PN} += " perl"
RDEPENDS:${PN} += " boost-python"
RDEPENDS:${PN} += " boost"


