From e219410a6d7ba3d6eb018978b67ce50b7c0d670f Mon Sep 17 00:00:00 2001 From: Colossus Date: Fri, 22 Apr 2011 01:35:45 +0200 Subject: [PATCH 1/5] call "/etc/pm/sleep.d/50_tvheadend resume" instead "/usr/bin/tvheadend -C -s -f -u root -g root" (directly), because on a twin tuner card tvheadend is starting two times. --- packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules b/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules index 441b76235b..ea762e222b 100644 --- a/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules +++ b/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules @@ -24,7 +24,7 @@ SUBSYSTEM!="dvb", GOTO="end" ENV{DVB_DEVICE_TYPE}!="frontend", GOTO="end" # Start TVHeadend if dvb frontend is starting -ACTION=="add", RUN+="/usr/bin/tvheadend -C -s -f -u root -g root" +ACTION=="add", RUN+="/etc/pm/sleep.d/50_tvheadend resume" ACTION=="remove", RUN+="/usr/bin/killall tvheadend" LABEL="end" From 03e40adf293364e626c5855aea9d8044bac37b38 Mon Sep 17 00:00:00 2001 From: Colossus Date: Fri, 22 Apr 2011 02:26:11 +0200 Subject: [PATCH 2/5] fix for tvheadend startup for dvb cards with more than one tuner, because tvheadend is starting multiple times --- packages/multimedia/hts-tvheadend/install | 3 +++ .../hts-tvheadend/udev.d/76-tvheadend.rules | 2 +- .../hts-tvheadend/udev/tvheadend_startup | 25 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 packages/multimedia/hts-tvheadend/udev/tvheadend_startup diff --git a/packages/multimedia/hts-tvheadend/install b/packages/multimedia/hts-tvheadend/install index 2eae408e3c..3b2b285d22 100755 --- a/packages/multimedia/hts-tvheadend/install +++ b/packages/multimedia/hts-tvheadend/install @@ -27,3 +27,6 @@ mkdir -p $INSTALL/usr/bin mkdir -p $INSTALL/etc/pm/sleep.d cp $PKG_DIR/sleep.d/* $INSTALL/etc/pm/sleep.d + +mkdir -p $INSTALL/lib/udev + cp $PKG_DIR/udev/* $INSTALL/lib/udev diff --git a/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules b/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules index ea762e222b..8e00208484 100644 --- a/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules +++ b/packages/multimedia/hts-tvheadend/udev.d/76-tvheadend.rules @@ -24,7 +24,7 @@ SUBSYSTEM!="dvb", GOTO="end" ENV{DVB_DEVICE_TYPE}!="frontend", GOTO="end" # Start TVHeadend if dvb frontend is starting -ACTION=="add", RUN+="/etc/pm/sleep.d/50_tvheadend resume" +ACTION=="add", RUN+="/lib/udev/tvheadend_startup" ACTION=="remove", RUN+="/usr/bin/killall tvheadend" LABEL="end" diff --git a/packages/multimedia/hts-tvheadend/udev/tvheadend_startup b/packages/multimedia/hts-tvheadend/udev/tvheadend_startup new file mode 100755 index 0000000000..132e5848a7 --- /dev/null +++ b/packages/multimedia/hts-tvheadend/udev/tvheadend_startup @@ -0,0 +1,25 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +if [ ! $(pidof tvheadend) ];then + tvheadend -C -s -f -u root -g root +fi \ No newline at end of file From 07893553fa64d71d3fb456a659239cd43cabc021 Mon Sep 17 00:00:00 2001 From: Colossus Date: Fri, 22 Apr 2011 17:47:36 +0200 Subject: [PATCH 3/5] delete obsolete folder --- .../hts-tvheadend/udev/tvheadend_startup | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100755 packages/multimedia/hts-tvheadend/udev/tvheadend_startup diff --git a/packages/multimedia/hts-tvheadend/udev/tvheadend_startup b/packages/multimedia/hts-tvheadend/udev/tvheadend_startup deleted file mode 100755 index 132e5848a7..0000000000 --- a/packages/multimedia/hts-tvheadend/udev/tvheadend_startup +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -if [ ! $(pidof tvheadend) ];then - tvheadend -C -s -f -u root -g root -fi \ No newline at end of file From bf1ca6d8842fcc6bc8c62f8df5640a5e4183ed88 Mon Sep 17 00:00:00 2001 From: Colossus Date: Sun, 24 Apr 2011 02:36:31 +0200 Subject: [PATCH 4/5] add mkpg script's for git repository from opdenkamp (ppa & master / xbmc-pvr) and tvheadend --- tools/mkpkg/mkpkg_tvheadend | 60 +++++++++++++++++ tools/mkpkg/mkpkg_xbmc-pvr-git | 115 +++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) create mode 100755 tools/mkpkg/mkpkg_tvheadend create mode 100755 tools/mkpkg/mkpkg_xbmc-pvr-git diff --git a/tools/mkpkg/mkpkg_tvheadend b/tools/mkpkg/mkpkg_tvheadend new file mode 100755 index 0000000000..5fde37a539 --- /dev/null +++ b/tools/mkpkg/mkpkg_tvheadend @@ -0,0 +1,60 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +MKPKG_CURRENTPATH=$(pwd) +MKPKG_TMP="$MKPKG_CURRENTPATH/mkpkg-temp" + +mkdir -p $MKPKG_TMP +cd $MKPKG_TMP + +echo "deleteing old revisions..." + ls $MKPKG_TMP | \ + while read I; do + if [ -f "${I}" ] ; then + case "${I}" in + tvheadend.tar.bz2) rm "${I}";; + esac + elif [ -d "${I}" ] ; then + case "${I}" in + tvheadend) rm -Rf "${I}";; + esac + fi + done + +echo "getting sources if needed (or update only)" + if [ ! -d tvheadend ]; then + git clone git://github.com/andoma/tvheadend.git tvheadend + fi + +echo "updateing revision..." + cd tvheadend + git pull + cd $MKPKG_TMP + +echo "getting version..." + cd tvheadend + REV=$(git rev-parse --short HEAD) + cd $MKPKG_TMP + +echo "packing sources..." + tar cvjf tvheadend-$REV.tar.bz2 tvheadend + +cd $MKPKG_CURRENTPATH \ No newline at end of file diff --git a/tools/mkpkg/mkpkg_xbmc-pvr-git b/tools/mkpkg/mkpkg_xbmc-pvr-git new file mode 100755 index 0000000000..ea66b8bdab --- /dev/null +++ b/tools/mkpkg/mkpkg_xbmc-pvr-git @@ -0,0 +1,115 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 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, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +if [ -z "$VERSION" ] ; then + echo "Please specify the git version: ppa | master" + echo "(ppa recommed)" + echo "Example usage: VERSION=ppa mkpkg_xbmc-pvr-git" + exit 1 +fi + +MKPKG_CURRENTPATH=$(pwd) +MKPKG_TMP="$MKPKG_CURRENTPATH/mkpkg-temp" + +mkdir -p $MKPKG_TMP +cd $MKPKG_TMP + +echo "deleteing old revisions..." + ls $MKPKG_TMP | \ + while read I; do + if [ -f "${I}" ] ; then + case "${I}" in + xbmc*.tar.bz2) rm "${I}";; + esac + elif [ -d "${I}" ] ; then + case "${I}" in + xbmc-pvr.master) rm -Rf "${I}";; + xbmc-pvr.ppa) rm -Rf "${I}";; + esac + fi + done + +echo "getting sources if needed (or update only)" + if [ ! -d xbmc-pvr ]; then + git clone git://github.com/opdenkamp/xbmc.git xbmc-pvr + fi + +echo "updateing revision... $VERSION" + cd xbmc-pvr + git pull + cd $MKPKG_TMP + +echo "create repo xbmc-pvr -> xbmc-pvr.$VERSION" + cp -R xbmc-pvr xbmc-pvr.$VERSION + +if [ $VERSION != "master" ] ; then + cd xbmc-pvr.$VERSION + git checkout pvr-$VERSION + cd $MKPKG_TMP +fi + +echo "getting version..." + cd xbmc-pvr.$VERSION + REV=$(git rev-parse --short HEAD) + cd $MKPKG_TMP + +echo "cleaning sources..." + find xbmc-pvr.$VERSION -name .git -exec rm -rf {} ";" + + rm -rf xbmc-pvr.$VERSION/project + + for i in "Changelog" "Fake\ Episode\ Maker" \ + "PackageMaker" "Translator" "XprPack" \ + "HardwareConfigure" "osx" "UpdateThumbs.py" "XBMCTex"; do + rm -rf xbmc-pvr.$VERSION/tools/$i + done + + for i in dll a lib so bat; do + find xbmc-pvr.$VERSION -name *.$i -exec rm -rf {} ";" + done + + # remove bundled libraries (including zlib and OSX), saves space and forces using external versions + for i in cximage-6.0/zlib libid3tag/zlib zlib + do + rm -rf xbmc-pvr.$VERSION/xbmc/lib/$i + done + + # bundled win32 binaries + rm -r xbmc-pvr.$VERSION/xbmc/visualizations/XBMCProjectM/win32 + + # remove various headers + rm xbmc-pvr.$VERSION/xbmc/filesystem/zlib.h + +echo "move xbmc-pvr.$VERSION to move xbmc-pvr.$VERSION-$REV" +mv xbmc-pvr.$VERSION xbmc-pvr.$VERSION-$REV + +echo "split xbmc-pvr.$VERSION-$REV theme and make xbmc-pvr-$VERSION-$REV.tar.gz" + + tar cvjf xbmc-pvr-$VERSION-theme-Confluence-$REV.tar.bz2 -C xbmc-pvr.$VERSION-$REV/addons/ ./skin.confluence + rm -rf xbmc-pvr-$VERSION-$REV/addons/skin.confluence + +echo "packing sources..." + tar cvjf xbmc-pvr-$VERSION-$REV.tar.bz2 xbmc-pvr.$VERSION-$REV + +echo "CLEANUP" + rm -Rf xbmc-pvr.$VERSION-$REV + +cd $MKPKG_CURRENTPATH \ No newline at end of file From 81dda2a7c1ccd0d785b0102fe6a6b493752be316 Mon Sep 17 00:00:00 2001 From: Colossus Date: Sun, 24 Apr 2011 15:00:01 +0200 Subject: [PATCH 5/5] make package scripts for getting git sources from opdenkamp & tvheadend --- .gitignore | 3 +++ tools/mkpkg/mkpkg_tvheadend | 22 +++++++++------------- tools/mkpkg/mkpkg_xbmc-pvr-git | 30 +++++++++--------------------- 3 files changed, 21 insertions(+), 34 deletions(-) diff --git a/.gitignore b/.gitignore index 0e55a33021..5aa92491ef 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,8 @@ target/ tools/mkpkg/* !tools/mkpkg/mkpkg_* +# mkpkg temp +mkpkg-temp + # private working directory .work/ diff --git a/tools/mkpkg/mkpkg_tvheadend b/tools/mkpkg/mkpkg_tvheadend index 5fde37a539..358a559993 100755 --- a/tools/mkpkg/mkpkg_tvheadend +++ b/tools/mkpkg/mkpkg_tvheadend @@ -24,20 +24,10 @@ MKPKG_TMP="$MKPKG_CURRENTPATH/mkpkg-temp" mkdir -p $MKPKG_TMP cd $MKPKG_TMP +mkdir -p dest echo "deleteing old revisions..." - ls $MKPKG_TMP | \ - while read I; do - if [ -f "${I}" ] ; then - case "${I}" in - tvheadend.tar.bz2) rm "${I}";; - esac - elif [ -d "${I}" ] ; then - case "${I}" in - tvheadend) rm -Rf "${I}";; - esac - fi - done + rm -Rf dest/tvheadend* echo "getting sources if needed (or update only)" if [ ! -d tvheadend ]; then @@ -53,8 +43,14 @@ echo "getting version..." cd tvheadend REV=$(git rev-parse --short HEAD) cd $MKPKG_TMP + +echo "create repo for packaging tvheadend -> tvheadend-$REV" + cp -R tvheadend tvheadend-$REV echo "packing sources..." - tar cvjf tvheadend-$REV.tar.bz2 tvheadend + tar cvjf dest/tvheadend-$REV.tar.bz2 --exclude ".git" --exclude ".gitignore" tvheadend-$REV + +echo "CLEANUP" + rm -Rf tvheadend-$REV cd $MKPKG_CURRENTPATH \ No newline at end of file diff --git a/tools/mkpkg/mkpkg_xbmc-pvr-git b/tools/mkpkg/mkpkg_xbmc-pvr-git index ea66b8bdab..f40fab843f 100755 --- a/tools/mkpkg/mkpkg_xbmc-pvr-git +++ b/tools/mkpkg/mkpkg_xbmc-pvr-git @@ -31,21 +31,10 @@ MKPKG_TMP="$MKPKG_CURRENTPATH/mkpkg-temp" mkdir -p $MKPKG_TMP cd $MKPKG_TMP +mkdir -p dest echo "deleteing old revisions..." - ls $MKPKG_TMP | \ - while read I; do - if [ -f "${I}" ] ; then - case "${I}" in - xbmc*.tar.bz2) rm "${I}";; - esac - elif [ -d "${I}" ] ; then - case "${I}" in - xbmc-pvr.master) rm -Rf "${I}";; - xbmc-pvr.ppa) rm -Rf "${I}";; - esac - fi - done + rm -Rf dest/xbmc*$VERSION* echo "getting sources if needed (or update only)" if [ ! -d xbmc-pvr ]; then @@ -98,18 +87,17 @@ echo "cleaning sources..." # remove various headers rm xbmc-pvr.$VERSION/xbmc/filesystem/zlib.h -echo "move xbmc-pvr.$VERSION to move xbmc-pvr.$VERSION-$REV" -mv xbmc-pvr.$VERSION xbmc-pvr.$VERSION-$REV echo "split xbmc-pvr.$VERSION-$REV theme and make xbmc-pvr-$VERSION-$REV.tar.gz" - - tar cvjf xbmc-pvr-$VERSION-theme-Confluence-$REV.tar.bz2 -C xbmc-pvr.$VERSION-$REV/addons/ ./skin.confluence - rm -rf xbmc-pvr-$VERSION-$REV/addons/skin.confluence + mv xbmc-pvr.$VERSION/addons/skin.confluence xbmc-pvr-$VERSION-theme-Confluence-$REV + tar cvjf dest/xbmc-pvr-$VERSION-theme-Confluence-$REV.tar.bz2 xbmc-pvr-$VERSION-theme-Confluence-$REV + rm -rf xbmc-pvr-$VERSION-theme-Confluence-$REV echo "packing sources..." - tar cvjf xbmc-pvr-$VERSION-$REV.tar.bz2 xbmc-pvr.$VERSION-$REV + mv xbmc-pvr.$VERSION xbmc-pvr-$VERSION-$REV + tar cvjf dest/xbmc-pvr-$VERSION-$REV.tar.bz2 xbmc-pvr-$VERSION-$REV echo "CLEANUP" - rm -Rf xbmc-pvr.$VERSION-$REV - + rm -Rf xbmc-pvr-$VERSION-$REV + cd $MKPKG_CURRENTPATH \ No newline at end of file