diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-17 15:59:08 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-22 08:35:45 +0200 |
commit | 35752f477afb56b959ef699a5db5c32855274347 (patch) | |
tree | 9bec7d2729d696749d712961932fb716d74934f8 /recipes/gst-android-1.0.recipe | |
parent | f42cf5a8438d317252ce70ba27defebbb76c9cdf (diff) |
gstreamer-1.0: Only store ndk-build integration in a single directory for 0.10 and 1.0
Diffstat (limited to 'recipes/gst-android-1.0.recipe')
-rw-r--r-- | recipes/gst-android-1.0.recipe | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/recipes/gst-android-1.0.recipe b/recipes/gst-android-1.0.recipe index 779849a9..efd6e48a 100644 --- a/recipes/gst-android-1.0.recipe +++ b/recipes/gst-android-1.0.recipe @@ -1,4 +1,6 @@ # -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python +import os +import shutil from cerbero.utils import shell from custom import list_gstreamer_1_0_plugins_by_category @@ -10,23 +12,32 @@ class Recipe(recipe.Recipe): btype = BuildType.CUSTOM files_devel = [ - 'share/gst-android/ndk-build-1.0/gstreamer_android.c.in', - 'share/gst-android/ndk-build-1.0/gstreamer.mk', - 'share/gst-android/ndk-build-1.0/gstreamer_prebuilt.mk', - 'share/gst-android/ndk-build-1.0/tools.mk', - 'share/gst-android/ndk-build-1.0/plugins.mk', - 'share/gst-android/ndk-build-1.0/GStreamer.java', - 'share/gst-android/ndk-build-1.0/tools/windows', - 'share/gst-android/ndk-build-1.0/fontconfig', + 'share/gst-android/ndk-build/gstreamer_android-1.0.c.in', + 'share/gst-android/ndk-build/gstreamer-1.0.mk', + 'share/gst-android/ndk-build/gstreamer_prebuilt.mk', + 'share/gst-android/ndk-build/tools.mk', + 'share/gst-android/ndk-build/plugins.mk', + 'share/gst-android/ndk-build/GStreamer.java', + 'share/gst-android/ndk-build/tools', + 'share/gst-android/ndk-build/fontconfig', ] def install(self): - ndk_build_dir = os.path.join(self.config.prefix, 'share', 'gst-android', 'ndk-build-1.0') - shell.copy_dir(os.path.join(self.config.data_dir, 'ndk-build-1.0'), - ndk_build_dir) + ndk_build_dir_dst = os.path.join(self.config.prefix, 'share', 'gst-android', 'ndk-build') + if not os.path.exists(ndk_build_dir_dst): + os.makedirs(ndk_build_dir_dst) + ndk_build_dir_src = os.path.join(self.config.data_dir, 'ndk-build') + for f in self.files_devel: + fname = os.path.basename(f) + s = os.path.join(ndk_build_dir_src, fname) + d = os.path.join(ndk_build_dir_dst, fname) + if os.path.isfile(s): + shutil.copy(s, d) + else: + shell.copy_dir(s, d) plugins, replacements = list_gstreamer_1_0_plugins_by_category(self.config) - f = open(os.path.join(ndk_build_dir, 'plugins.mk'), 'w') + f = open(os.path.join(ndk_build_dir_dst, 'plugins.mk'), 'w') for c, p in plugins.iteritems(): p = ' '.join(p) for k,v in replacements.iteritems(): |