tools/mkpkg: update mkpkg_xbmc script

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-04-26 21:24:06 +02:00
parent 70df3e8716
commit 58baf6f40e

View File

@ -19,50 +19,58 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="xbmc"
GIT_REPO="-b master git://github.com/xbmc/xbmc.git"
DEST_DIR="$PKG_NAME"
echo "getting sources..."
svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk xbmc-latest
if [ ! -d $DEST_DIR-latest ]; then
git clone $GIT_REPO $DEST_DIR-latest
fi
cd $DEST_DIR-latest
git pull
echo "getting version..."
cd xbmc-latest
SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\: //'`
echo $SVN_REV
GIT_REV=`git log -n1 --format=%h`
echo $GIT_REV
cd ..
echo "copying sources..."
rm -rf xbmc-$SVN_REV
cp -R xbmc-latest xbmc-$SVN_REV
echo "$SVN_REV" > xbmc-$SVN_REV/svn.version
rm -rf $PKG_NAME-$GIT_REV
cp -R $DEST_DIR-latest $PKG_NAME-$GIT_REV
echo "$GIT_REV" > $PKG_NAME-$GIT_REV/git.version
echo "cleaning sources..."
find xbmc-$SVN_REV -name .svn -exec rm -rf {} ";"
rm -rf $PKG_NAME-$GIT_REV/.git
echo "seperating theme..."
rm -rf xbmc-theme-Confluence-$SVN_REV
mv xbmc-$SVN_REV/addons/skin.confluence xbmc-theme-Confluence-$SVN_REV
rm -rf $PKG_NAME-theme-Confluence-$GIT_REV
mv $PKG_NAME-$GIT_REV/addons/skin.confluence $PKG_NAME-theme-Confluence-$GIT_REV
echo "cleaning sources..."
rm -rf xbmc-$SVN_REV/visualisations
rm -rf xbmc-$SVN_REV/lib/libSDL-*
rm -rf xbmc-$SVN_REV/lib/libcurl-*
rm -rf xbmc-$SVN_REV/project
rm -rf $PKG_NAME-$GIT_REV/visualisations
rm -rf $PKG_NAME-$GIT_REV/lib/libSDL-*
rm -rf $PKG_NAME-$GIT_REV/lib/libcurl-*
rm -rf $PKG_NAME-$GIT_REV/project
for i in "Changelog" "Fake\ Episode\ Maker" "MingwBuildEnvironment" \
"PackageMaker" "Translator" "XBMCLive" "XprPack" \
"HardwareConfigure" "Mach5" "osx" "UpdateThumbs.py" "XBMCTex"; do
rm -rf xbmc-$SVN_REV/tools/$i
rm -rf $PKG_NAME-$GIT_REV/tools/$i
done
for i in dll a lib so bat; do
find xbmc-$SVN_REV -name *.$i -exec rm -rf {} ";"
find $PKG_NAME-$GIT_REV -name *.$i -exec rm -rf {} ";"
done
# bundled win32 binaries
rm -r xbmc-$SVN_REV/xbmc/visualizations/XBMCProjectM/win32
rm -r $PKG_NAME-$GIT_REV/xbmc/visualizations/XBMCProjectM/win32
echo "packing sources..."
tar cvjf xbmc-$SVN_REV.tar.bz2 xbmc-$SVN_REV
tar cvjf xbmc-theme-Confluence-$SVN_REV.tar.bz2 xbmc-theme-Confluence-$SVN_REV
tar cvjf $PKG_NAME-$GIT_REV.tar.bz2 $PKG_NAME-$GIT_REV
tar cvjf $PKG_NAME-theme-Confluence-$GIT_REV.tar.bz2 $PKG_NAME-theme-Confluence-$GIT_REV
echo "remove temporary sourcedir..."
rm -rf xbmc-$SVN_REV
rm -rf xbmc-theme-Confluence-$SVN_REV
rm -rf $PKG_NAME-$GIT_REV
rm -rf $PKG_NAME-theme-Confluence-$GIT_REV