# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python import shutil import os class Recipe(recipe.Recipe): name = 'gst-sdk-tutorials' version = '0.0.1' licenses = [License.LGPL] btype = BuildType.CUSTOM files_tutorials = ['share/gst-sdk/tutorials'] # Does not have rule for `make check` make_check = None def install(self): files_tutorials = [] for dirname, dirnames, filenames in os.walk(os.path.join(self.build_dir, 'gst-sdk')): dirname = dirname.replace(os.path.abspath(self.build_dir) + '/', '') if self.config.target_platform != Platform.WINDOWS: if dirname.startswith(os.path.join('gst-sdk', 'tutorials', 'vs2010')): continue if self.config.target_platform != Platform.DARWIN: if dirname.startswith(os.path.join('gst-sdk', 'tutorials', 'xcode')): continue for f in filenames: files_tutorials.append(os.path.join(dirname, f)) for f in files_tutorials: full_path = os.path.join(self.config.prefix, 'share', f) dirname = os.path.dirname(full_path) if not os.path.exists(dirname): os.makedirs(dirname) shutil.copy(os.path.join(self.build_dir, f), full_path)