Commit bcabc23f authored by Thibault Saunier's avatar Thibault Saunier

flatpak: Allow specifying what GStreamer version to use

Keep building against master by default
Reviewed-by: Alexandru Băluț's avatarAlex Băluț <alexandru.balut@gmail.com>
Differential Revision: https://phabricator.freedesktop.org/D1067
parent c0a6c84a
...@@ -5,20 +5,25 @@ import os ...@@ -5,20 +5,25 @@ import os
import subprocess import subprocess
import sys import sys
if __name__ == "__main__": if __name__ == "__main__":
if len(sys.argv) != 4: if len(sys.argv) != 5:
print("call with: %s <template_file> <outfile> <basedir>" % print("call with: %s <template_file> <outfile> <basedir> <gst-version> " %
sys.argv[0]) sys.argv[0])
print("-> Generating %s" % sys.argv[2])
basedir = sys.argv[3] basedir = sys.argv[3]
gst_version = sys.argv[4]
with open(sys.argv[1], "r") as tf: with open(sys.argv[1], "r") as tf:
template = json.load(tf) template = json.load(tf)
print("-> Generating %s against GStreamer %s" % (sys.argv[2], gst_version))
for module in template["modules"]: for module in template["modules"]:
if module["sources"][0]["type"] != "git": if module["sources"][0]["type"] != "git":
continue continue
if module["name"].startswith("gst"):
module["sources"][0]["branch"] = gst_version
repo = os.path.join(basedir, module["name"]) repo = os.path.join(basedir, module["name"])
if not os.path.exists(os.path.join(repo, ".git")): if not os.path.exists(os.path.join(repo, ".git")):
print("-> Module: %s using online repo: %s" % ( print("-> Module: %s using online repo: %s" % (
......
...@@ -38,6 +38,8 @@ SDK_REPO=http://sdk.gnome.org/repo/ ...@@ -38,6 +38,8 @@ SDK_REPO=http://sdk.gnome.org/repo/
# The name to give to the repository if it is not registered in flatpak yet # The name to give to the repository if it is not registered in flatpak yet
SDK_DEFAULT_REPO_NAME=gnome SDK_DEFAULT_REPO_NAME=gnome
GST_VERSION=master
# ------------------------------------------- # # ------------------------------------------- #
FLATPAK=flatpak FLATPAK=flatpak
...@@ -164,6 +166,10 @@ do ...@@ -164,6 +166,10 @@ do
COMMIT_BODY="${i#*=}" COMMIT_BODY="${i#*=}"
shift shift
;; ;;
--gst-version=*)
GST_VERSION="${i#*=}"
shift
;;
esac esac
done done
...@@ -363,7 +369,7 @@ then ...@@ -363,7 +369,7 @@ then
then then
# Update values in the json template # Update values in the json template
JSON=$SCRIPTDIR/$APP_BUILD_NAME.json JSON=$SCRIPTDIR/$APP_BUILD_NAME.json
$SCRIPTDIR/json-template-expander $SCRIPTDIR/$APPLICATION_NAME.template.json $JSON $LOCAL_REPOS_PATH $SCRIPTDIR/json-template-expander $SCRIPTDIR/$APPLICATION_NAME.template.json $JSON $LOCAL_REPOS_PATH $GST_VERSION
echo "-> Removing prefix $PREFIX" echo "-> Removing prefix $PREFIX"
rm -Rf $PREFIX rm -Rf $PREFIX
......
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
}, },
{ {
"name": "gst-python", "name": "gst-python",
"config-opts": ["--with-pygi-overrides-dir=/app/lib/python3.3/site-packages/gi/overrides/"], "config-opts": ["--with-pygi-overrides-dir=/app/lib/python3.4/site-packages/gi/overrides/"],
"sources": [ "sources": [
{ {
"type": "git", "type": "git",
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
"sources": [ "sources": [
{ {
"type": "git", "type": "git",
"url": "https://github.com/thiblahute/gst-transcoder.git" "url": "https://github.com/pitivi/gst-transcoder.git"
}, },
{ {
"type": "file", "type": "file",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment