summaryrefslogtreecommitdiff
path: root/media-tv/kodi/files/generate.sh
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2015-04-21 22:24:48 +0300
committerBlackNoxis <steven.darklight@gmail.com>2015-04-21 22:24:48 +0300
commitb70efef53cc9de063fe3974dd56d672a92e57a9f (patch)
treeafd40e71be8de842afd562eda001b21abc9019c3 /media-tv/kodi/files/generate.sh
parent0fc61a35b43840a592037ab8bf88af6142527e3c (diff)
parent9a2973bcf4baaf0fa7848cd93e45ea1b7cd1a110 (diff)
Merge branch 'master' of github.com:Rogentos/kogaion-desktop
Diffstat (limited to 'media-tv/kodi/files/generate.sh')
-rw-r--r--media-tv/kodi/files/generate.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/media-tv/kodi/files/generate.sh b/media-tv/kodi/files/generate.sh
new file mode 100644
index 00000000..2e5b67fb
--- /dev/null
+++ b/media-tv/kodi/files/generate.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+# Generate the various interface files that normally requires java.
+# This makes building the release versions much nicer.
+
+set -eux
+
+PV=$1
+PN=kodi
+P="${PN}-${PV}"
+DISTDIR="/usr/portage/distfiles"
+GITDIR="/usr/local/src/kodi/git"
+
+if [[ ${PV} != "9999" ]] ; then
+ rm -rf xbmc-*/
+ tar xf ${DISTDIR}/${P}.tar.gz
+ d=$(echo xbmc-*/)
+else
+ stamp=$(date --date="$(git log -n1 --pretty=format:%ci master)" -u +%Y%m%d)
+ P+="-${stamp}"
+ cd ${GITDIR}
+ d=.
+fi
+#cd ${d} && git init . && git add . && git commit -qmm && cd ..
+make -C ${d} -j -f codegenerator.mk
+tar="${DISTDIR}/${P}-generated-addons.tar.xz"
+tar cf - \
+ ${d}/xbmc/interfaces/python/generated/*.cpp \
+ ${d}/xbmc/interfaces/json-rpc/ServiceDescription.h \
+ | xz > "${tar}"
+if [[ ${PV} != "9999" ]] ; then
+ rm -rf xbmc-*/
+fi
+
+du -b "${tar}"