from conans import ConanFile, CMake, tools
import os

# These are the things that you will have to define
# 
# Package name
package_name = "framework"

# List all the libraries that will be part of this package
provided_libraries = []

# List all the packages that you require to build.
required_packages = []

# List all the system libraries that are required for linking
required_system_libraries = [ ]
#
# End of the things that you will have to define

class OsalConan(ConanFile):
    name = package_name

    generators = "make", "virtualrunenv"
    settings = []
    scm = {"revision": "0b1d11c2b153fee190fb900561e2c2d6067c146b",
           "type": "git",
           "url": "https://gitea.roels.info/stefan/framework.git"}


    def set_version(self):
        git = tools.Git(folder=self.recipe_folder)
        version = git.get_tag()
        if version is None:
            version = git.get_branch()
        self.version = version

    def copy_list(self, list, pattern, dst,keep_path=True):
        for pat in pattern:
            for dir in list:
                self.copy(pat, dst=dst, src=dir, keep_path=keep_path)

    def package(self):
        self.copy('*',src='make', dst='make', keep_path=True)

    def package_id(self):
        self.info.header_only()

