# Path: pisi/actionsapi/get.py
# class BinutilsError(pisi.actionsapi.Error):
#     def __init__(self, value=''):
# def curDIR():
# def curKERNEL():
# def curPYTHON():
# def curPERL():
# def ENV(environ):
# def pkgDIR():
# def workDIR():
# def installDIR():
# def lsbINFO():
# def srcNAME():
# def srcVERSION():
# def srcRELEASE():
# def srcTAG():
# def srcDIR():
# def ARCH():
# def HOST():
# def CHOST():
# def CFLAGS():
# def CXXFLAGS():
# def LDFLAGS():
# def makeJOBS():
# def buildTYPE():
# def docDIR():
# def sbinDIR():
# def infoDIR():
# def manDIR():
# def dataDIR():
# def confDIR():
# def localstateDIR():
# def libexecDIR():
# def defaultprefixDIR():
# def kdeDIR():
# def qtDIR():
# def AR():
# def AS():
# def CC():
# def CXX():
# def LD():
# def NM():
# def RANLIB():
# def F77():
# def GCJ():
# 
# Path: pisi/actionsapi/shelltools.py
# def can_access_file(filePath):
# def can_access_directory(destinationDirectory):
# def makedirs(destinationDirectory):
# def echo(destionationFile, content):
# def chmod(filePath, mode = 0755):
# def chown(filePath, uid = 'root', gid = 'root'):
# def sym(source, destination):
# def unlink(pattern):
# def unlinkDir(sourceDirectory):
# def move(source, destination):
# def copy(source, destination, sym = True):
# def copytree(source, destination, sym = True):
# def touch(filePath):
# def cd(directoryName = ''):
# def ls(source):
# def export(key, value):
# def isLink(filePath):
# def isFile(filePath):
# def isDirectory(filePath):
# def isEmpty(filePath):
# def realPath(filePath):
# def baseName(filePath):
# def dirName(filePath):
# def system(command):


from pisi.actionsapi import get
from pisi.actionsapi import cmaketools
from pisi.actionsapi import shelltools
iconsdir = "%s/share/icons" % prefix
applicationsdir = "%s/share/applications/%s" % (prefix, basename)
mandir = "/%s" % get.manDIR()
sharedir = "%s/share/%s" % (prefix, basename)
appsdir = "%s/apps" % sharedir
configdir = "%s/config" % sharedir
sysconfdir= "/etc"
servicesdir = "%s/services" % sharedir
servicetypesdir = "%s/servicetypes" % sharedir
includedir = "%s/include/%s" % (prefix, basename)
docdir = "/%s/%s" % (get.docDIR(), basename)
htmldir = "%s/html" % docdir
wallpapersdir = "%s/share/wallpapers" % prefix

def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
    ''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''

    shelltools.makedirs("build")
    shelltools.cd("build")

    cmaketools.configure("-DDATA_INSTALL_DIR:PATH=%s \
            -DINCLUDE_INSTALL_DIR:PATH=%s \
            -DCONFIG_INSTALL_DIR:PATH=%s \
            -DLIBEXEC_INSTALL_DIR:PATH=%s \
            -DSYSCONF_INSTALL_DIR:PATH=%s \
            -DHTML_INSTALL_DIR:PATH=%s \
            -DMAN_INSTALL_DIR:PATH=%s \
            -DCMAKE_SKIP_RPATH:BOOL=ON \
            -DLIB_INSTALL_DIR:PATH=%s %s" % (appsdir, includedir, configdir, libexecdir, sysconfdir, htmldir, mandir, libdir, parameters), installPrefix, sourceDir)


# Path: pisi/actionsapi/get.py
# class BinutilsError(pisi.actionsapi.Error):
#     def __init__(self, value=''):
# def curDIR():
# def curKERNEL():
# def curPYTHON():
# def curPERL():
# def ENV(environ):
# def pkgDIR():
# def workDIR():
# def installDIR():
# def lsbINFO():
# def srcNAME():
# def srcVERSION():
# def srcRELEASE():
# def srcTAG():
# def srcDIR():
# def ARCH():
# def HOST():
# def CHOST():
# def CFLAGS():
# def CXXFLAGS():
# def LDFLAGS():
# def makeJOBS():
# def buildTYPE():
# def docDIR():
# def sbinDIR():
# def infoDIR():
# def manDIR():
# def dataDIR():
# def confDIR():
# def localstateDIR():
# def libexecDIR():
# def defaultprefixDIR():
# def kdeDIR():
# def qtDIR():
# def AR():
# def AS():
# def CC():
# def CXX():
# def LD():
# def NM():
# def RANLIB():
# def F77():
# def GCJ():
# 
# Path: pisi/actionsapi/shelltools.py
# def can_access_file(filePath):
# def can_access_directory(destinationDirectory):
# def makedirs(destinationDirectory):
# def echo(destionationFile, content):
# def chmod(filePath, mode = 0755):
# def chown(filePath, uid = 'root', gid = 'root'):
# def sym(source, destination):
# def unlink(pattern):
# def unlinkDir(sourceDirectory):
# def move(source, destination):
# def copy(source, destination, sym = True):
# def copytree(source, destination, sym = True):
# def touch(filePath):
# def cd(directoryName = ''):
# def ls(source):
# def export(key, value):
# def isLink(filePath):
# def isFile(filePath):
# def isDirectory(filePath):
# def isEmpty(filePath):
# def realPath(filePath):
# def baseName(filePath):
# def dirName(filePath):
# def system(command):


# Path: pisi/actionsapi/kde4.py
from pisi.actionsapi import get
from pisi.actionsapi import cmaketools
from pisi.actionsapi import shelltools

iconsdir = "%s/share/icons" % prefix
applicationsdir = "%s/share/applications/%s" % (prefix, basename)
mandir = "/%s" % get.manDIR()
sharedir = "%s/share/%s" % (prefix, basename)
appsdir = "%s/apps" % sharedir
configdir = "%s/config" % sharedir
sysconfdir= "/etc"
servicesdir = "%s/services" % sharedir
servicetypesdir = "%s/servicetypes" % sharedir
includedir = "%s/include/%s" % (prefix, basename)
docdir = "/%s/%s" % (get.docDIR(), basename)
htmldir = "%s/html" % docdir
wallpapersdir = "%s/share/wallpapers" % prefix

def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
    ''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''

    shelltools.makedirs("build")
    shelltools.cd("build")

    cmaketools.configure("-DDATA_INSTALL_DIR:PATH=%s \
            -DINCLUDE_INSTALL_DIR:PATH=%s \
            -DCONFIG_INSTALL_DIR:PATH=%s \
            -DLIBEXEC_INSTALL_DIR:PATH=%s \
            -DSYSCONF_INSTALL_DIR:PATH=%s \
            -DHTML_INSTALL_DIR:PATH=%s \
            -DMAN_INSTALL_DIR:PATH=%s \
            -DCMAKE_SKIP_RPATH:BOOL=ON \
            -DLIB_INSTALL_DIR:PATH=%s %s" % (appsdir, includedir, configdir, libexecdir, sysconfdir, htmldir, mandir, libdir, parameters), installPrefix, sourceDir)


    shelltools.cd("..")