From c9caae8aa6ffb32f0096f2e1c91968d8e71b2b60 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Tue, 20 Oct 2015 01:23:26 -0700 Subject: [PATCH] (jarvis) tools/mkpkg: add mkpkg_kodi / mkpkg_binary-addons for jarvis (master) --- ...ry-addons-Isengard => mkpkg_binary-addons} | 34 ++++++---- tools/mkpkg/mkpkg_kodi | 67 +++++++++++++++++++ tools/mkpkg/mkpkg_screensavers.rsxs | 43 ------------ tools/mkpkg/mkpkg_visualization.goom | 43 ------------ tools/mkpkg/mkpkg_visualization.projectm | 43 ------------ 5 files changed, 87 insertions(+), 143 deletions(-) rename tools/mkpkg/{mkpkg_binary-addons-Isengard => mkpkg_binary-addons} (76%) create mode 100755 tools/mkpkg/mkpkg_kodi delete mode 100755 tools/mkpkg/mkpkg_screensavers.rsxs delete mode 100755 tools/mkpkg/mkpkg_visualization.goom delete mode 100755 tools/mkpkg/mkpkg_visualization.projectm diff --git a/tools/mkpkg/mkpkg_binary-addons-Isengard b/tools/mkpkg/mkpkg_binary-addons similarity index 76% rename from tools/mkpkg/mkpkg_binary-addons-Isengard rename to tools/mkpkg/mkpkg_binary-addons index d38d7fc832..efa566e94b 100755 --- a/tools/mkpkg/mkpkg_binary-addons-Isengard +++ b/tools/mkpkg/mkpkg_binary-addons @@ -19,7 +19,7 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -KODI_DIR="kodi-Isengard.git" +KODI_DIR="kodi-master.git" git_clone() { # git_clone https://repo.url branch ./target_dir [githash] @@ -106,20 +106,26 @@ if [ -f ../../packages/mediacenter/kodi-platform/package.mk ] ; then fi # addons -for addon in $KODI_DIR/project/cmake/addons/addons/*.* ; do - ADDON=$(basename $addon) - REPO=$(cat $KODI_DIR/project/cmake/addons/addons/$ADDON/$ADDON.txt | awk '{print $2}') - GIT_HASH=$(cat $KODI_DIR/project/cmake/addons/addons/$ADDON/$ADDON.txt | awk '{print $3}') +for addontxt in $KODI_DIR/project/cmake/addons/bootstrap/repositories/*-addons.txt ; do + ADDONS=$(cat $addontxt | awk '{print $1}') + ADDONREPO=$(cat $addontxt | awk '{print $2}') + GIT_HASH=$(cat $addontxt | awk '{print $3}') + git_clone $ADDONREPO master $ADDONS.git $GIT_HASH + for addon in $ADDONS.git/*.*/ ; do + ADDON=$(basename $addon) + REPO=$(cat $addon/$ADDON.txt | awk '{print $2}') + GIT_HASH=$(cat $addon/$ADDON.txt | awk '{print $3}') - if ! grep -q all $addon/platforms.txt && ! grep -q linux $addon/platforms.txt ; then - continue - fi + if ! grep -q all $addon/platforms.txt && ! grep -q linux $addon/platforms.txt && ! grep -q ! $addon/platforms.txt; then + continue + fi - copy_and_package $REPO $ADDON $GIT_HASH + copy_and_package $REPO $ADDON $GIT_HASH - if [ -f ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk ] ; then - # update package.mk - RESOLVED_HASH=$(resolve_hash $PKG_NAME.git $GIT_HASH) - sed -i "s|PKG_VERSION=.*|PKG_VERSION=\"$RESOLVED_HASH\"|g" ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk - fi + if [ -f ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk ] ; then + # update package.mk + RESOLVED_HASH=$(resolve_hash $PKG_NAME.git $GIT_HASH) + sed -i "s|PKG_VERSION=.*|PKG_VERSION=\"$RESOLVED_HASH\"|g" ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk + fi + done done diff --git a/tools/mkpkg/mkpkg_kodi b/tools/mkpkg/mkpkg_kodi new file mode 100755 index 0000000000..250aaf40a3 --- /dev/null +++ b/tools/mkpkg/mkpkg_kodi @@ -0,0 +1,67 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="kodi" +PKG_VERSION="" +BRANCH="master" +GIT_REPO="git://github.com/xbmc/xbmc.git" +DEST_DIR="$PKG_NAME-$BRANCH" + +echo "getting sources..." + if [ ! -d $DEST_DIR.git ]; then + git clone $GIT_REPO -b $BRANCH $DEST_DIR.git + fi + + cd $DEST_DIR.git + git pull + +echo "getting version..." + GIT_HASH=`git log -n1 --format=%h` + VERSION_MAJOR=$(grep ^VERSION_MAJOR version.txt | cut -d" " -f2) + VERSION_MINOR=$(grep ^VERSION_MINOR version.txt | cut -d" " -f2) + VERSION_TAG=$(grep ^VERSION_TAG version.txt | cut -d" " -f2 | tr A-Z a-z) + PKG_VERSION="$VERSION_MAJOR.$VERSION_MINOR-$VERSION_TAG-$GIT_HASH" + # hack: empty version tag on release builds: + if [ "$VERSION_TAG" = "version_tag" ] ; then + PKG_VERSION="$VERSION_MAJOR.$VERSION_MINOR-$GIT_HASH" + fi + echo $PKG_VERSION + cd .. + +echo "copying sources..." + rm -rf $PKG_NAME-$PKG_VERSION + cp -R $DEST_DIR.git $PKG_NAME-$PKG_VERSION + echo "$GIT_HASH" > $PKG_NAME-$PKG_VERSION/VERSION + +echo "cleaning sources..." + rm -rf $PKG_NAME-$PKG_VERSION/.git + +echo "seperating theme..." + rm -rf $PKG_NAME-theme-Confluence-$PKG_VERSION + mv $PKG_NAME-$PKG_VERSION/addons/skin.confluence $PKG_NAME-theme-Confluence-$PKG_VERSION + +echo "packing sources..." + tar cvJf $PKG_NAME-$PKG_VERSION.tar.xz $PKG_NAME-$PKG_VERSION + tar cvJf $PKG_NAME-theme-Confluence-$PKG_VERSION.tar.xz $PKG_NAME-theme-Confluence-$PKG_VERSION + +echo "remove temporary sourcedir..." + rm -rf $PKG_NAME-$PKG_VERSION + rm -rf $PKG_NAME-theme-Confluence-$PKG_VERSION diff --git a/tools/mkpkg/mkpkg_screensavers.rsxs b/tools/mkpkg/mkpkg_screensavers.rsxs deleted file mode 100755 index 7413ba198b..0000000000 --- a/tools/mkpkg/mkpkg_screensavers.rsxs +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -echo "getting sources..." - if [ ! -d screensavers.rsxs.git ]; then - git clone https://github.com/notspiff/screensavers.rsxs.git screensavers.rsxs.git - fi - - cd screensavers.rsxs.git - git pull - GIT_REV=`git log -n1 --format=%h` - cd .. - -echo "copying sources..." - rm -rf screensavers.rsxs-$GIT_REV - cp -R screensavers.rsxs.git screensavers.rsxs-$GIT_REV - -echo "cleaning sources..." - rm -rf screensavers.rsxs-$GIT_REV/.git - -echo "packing sources..." - tar cvJf screensavers.rsxs-$GIT_REV.tar.xz screensavers.rsxs-$GIT_REV - -echo "remove temporary sourcedir..." - rm -rf screensavers.rsxs-$GIT_REV diff --git a/tools/mkpkg/mkpkg_visualization.goom b/tools/mkpkg/mkpkg_visualization.goom deleted file mode 100755 index e03298754d..0000000000 --- a/tools/mkpkg/mkpkg_visualization.goom +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -echo "getting sources..." - if [ ! -d visualization.goom.git ]; then - git clone https://github.com/notspiff/visualization.goom.git visualization.goom.git - fi - - cd visualization.goom.git - git pull - GIT_REV=`git log -n1 --format=%h` - cd .. - -echo "copying sources..." - rm -rf visualization.goom-$GIT_REV - cp -R visualization.goom.git visualization.goom-$GIT_REV - -echo "cleaning sources..." - rm -rf visualization.goom-$GIT_REV/.git - -echo "packing sources..." - tar cvJf visualization.goom-$GIT_REV.tar.xz visualization.goom-$GIT_REV - -echo "remove temporary sourcedir..." - rm -rf visualization.goom-$GIT_REV diff --git a/tools/mkpkg/mkpkg_visualization.projectm b/tools/mkpkg/mkpkg_visualization.projectm deleted file mode 100755 index 8aae31b53e..0000000000 --- a/tools/mkpkg/mkpkg_visualization.projectm +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -echo "getting sources..." - if [ ! -d visualization.projectm.git ]; then - git clone https://github.com/notspiff/visualization.projectm.git visualization.projectm.git - fi - - cd visualization.projectm.git - git pull - GIT_REV=`git log -n1 --format=%h` - cd .. - -echo "copying sources..." - rm -rf visualization.projectm-$GIT_REV - cp -R visualization.projectm.git visualization.projectm-$GIT_REV - -echo "cleaning sources..." - rm -rf visualization.projectm-$GIT_REV/.git - -echo "packing sources..." - tar cvJf visualization.projectm-$GIT_REV.tar.xz visualization.projectm-$GIT_REV - -echo "remove temporary sourcedir..." - rm -rf visualization.projectm-$GIT_REV