#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file https://www.gnu.org/licenses/gpl-3.0.txt

from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import qt6
from pisi.actionsapi import get

#WorkDir = "vokoscreenNG-%s/src" % get.srcVERSION()

def setup():
    shelltools.makedirs("vokoscreenNG")
    shelltools.cd("vokoscreenNG")
    #shelltools.cd("cd src")
    pisitools.cxxflags.add("-Wno-deprecated-declarations")
    # qt6.configure("../src/vokoscreenNG.pro")
    shelltools.system("qmake-qt6 PREFIX=/usr ../src/vokoscreenNG.pro")

def build():
    shelltools.cd("vokoscreenNG")
    # qt6.make("PREFIX=/usr")
    shelltools.system("make")

def install():
    shelltools.cd("vokoscreenNG")
    # qt6.install("INSTALL_ROOT=%s" % get.installDIR())
    shelltools.system("make install INSTALL_ROOT=%s" % get.installDIR())
    #pisitools.dobin("vokoscreenNG")
    #pisitools.insinto("/usr/share/applications", "src/applications/vokoscreenNG.desktop", "vokoscreenNG.desktop")
    #pisitools.insinto("/usr/share/pixmaps", "src/applications/vokoscreenNG.png", "vokoscreenNG.png")
    
    shelltools.cd("..")
    pisitools.dodoc("COPYING")


