blob: e8ea11277af2041759333308b23ecbfc9bc5401e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# -*- 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)
|