2009-03-18 13:02:53 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-07-21 18:54:45 +02:00
|
|
|
. config/options $1
|
2009-03-18 13:02:53 +01:00
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "usage: $0 package_name"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
$SCRIPTS/get $1
|
|
|
|
|
|
|
|
mkdir -p $BUILD
|
|
|
|
|
|
|
|
[ ! -d $SOURCES/$1 -a ! -d $PKG_DIR/sources ] && exit 0
|
|
|
|
|
|
|
|
mkdir -p $STAMPS/$1
|
|
|
|
STAMP=$STAMPS/$1/unpack
|
|
|
|
|
|
|
|
[ -f $STAMP -a -f $PKG_DIR/need_unpack ] && $PKG_DIR/need_unpack $@
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
|
2009-03-18 13:02:53 +01:00
|
|
|
for patch in $PKG_DIR/patches/*; do
|
|
|
|
if [ $patch -nt $STAMP ]; then
|
|
|
|
rm -f $STAMP
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
|
2009-03-18 13:02:53 +01:00
|
|
|
[ -f $STAMP ] && exit 0
|
|
|
|
|
|
|
|
printf "%${INDENT}c UNPACK $1\n" >&$SILENT_OUT
|
|
|
|
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
|
|
|
|
|
|
|
|
rm -rf $BUILD/$1[-_][0-9]*
|
|
|
|
rm -rf $BUILD/$1[-_]r[0-9]*
|
|
|
|
rm -rf $BUILD/$1[-_]cvs*
|
|
|
|
rm -rf $BUILD/$1[-_]svn*
|
|
|
|
rm -rf $BUILD/$1[-_]git*
|
|
|
|
|
2010-11-19 13:35:11 +01:00
|
|
|
if [ -n "$PKG_URL" ]; then
|
2009-03-18 13:02:53 +01:00
|
|
|
$SCRIPTS/extract $1 "$1*.tar.bz2" $BUILD
|
|
|
|
$SCRIPTS/extract $1 "$1*.tar.gz" $BUILD
|
|
|
|
$SCRIPTS/extract $1 "$1*.tgz" $BUILD
|
2010-07-18 00:47:00 +02:00
|
|
|
$SCRIPTS/extract $1 "$1*.7z" $BUILD
|
2009-03-18 13:02:53 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d $PKG_DIR/sources ]; then
|
|
|
|
[ ! -d $BUILD/$1* ] && mkdir -p $BUILD/$1
|
|
|
|
cp -PRf $PKG_DIR/sources/* $BUILD/$1*/
|
|
|
|
fi
|
|
|
|
|
2010-11-25 18:31:01 +01:00
|
|
|
[ -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION}`
|
|
|
|
[ -d $BUILD/${PKG_NAME}${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}${PKG_VERSION}`
|
|
|
|
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
for i in $PKG_DIR/patches/$PKG_NAME-$PKG_VERSION*.patch ; do
|
2009-03-18 13:02:53 +01:00
|
|
|
if [ -f $i ]; then
|
|
|
|
PATCH=`basename $i`
|
2009-05-31 23:34:46 +02:00
|
|
|
PT=`echo $PATCH | sed 's/.*\.\(.*\)$/\1/'`
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
if [ "$PT" != "patch" -a "$PT" != "$TARGET_ARCH" ]; then
|
2009-03-18 13:02:53 +01:00
|
|
|
echo "## Skipping patch: $i"
|
|
|
|
continue;
|
|
|
|
else
|
|
|
|
echo "## Applying patch: $i"
|
2010-11-25 18:31:01 +01:00
|
|
|
cat $i | patch -d `echo $PKG_BUILD | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT
|
2009-03-18 13:02:53 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2010-11-25 18:31:01 +01:00
|
|
|
$SCRIPTS/fixconfigtools $PKG_BUILD
|
2009-03-18 13:02:53 +01:00
|
|
|
|
|
|
|
[ -f $PKG_DIR/unpack ] && $PKG_DIR/unpack $@ >&$VERBOSE_OUT
|
|
|
|
|
|
|
|
rm -f $STAMPS/$1/build
|
buildsystem: big rework & cleanup - PART-1: split functions from 'config/path' to an seperate file 'config/functions', rework and cleanup some build scripts, remove references to $TARGET_PLATFORM, add support for more then one downloadurl for $PKG_URL (partially done), remove support for: $PKG_DIR/arch, $PKG_DIR/platform, $PKG_DIR/url files, remove support for *.diff patches, create download-stampfiles in sources/$PKG_NAME, create md5 files after download, add support to download all sources at once with './scripts/get'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
2010-11-19 22:01:08 +01:00
|
|
|
|
2009-12-19 01:35:31 +01:00
|
|
|
for i in `sed -n "s/^\([^#].*\)=\".*$/\1/p" $PROJECT_DIR/$PROJECT/options | grep -v "#"`; do
|
2009-03-18 13:02:53 +01:00
|
|
|
eval val=\$$i
|
|
|
|
echo "STAMP_$i=\"$val"\" >> $STAMP
|
|
|
|
done
|