2009-03-18 12:02:53 +00:00
|
|
|
|
#!/bin/sh
|
2011-01-09 22:32:01 +00:00
|
|
|
|
|
2011-01-09 20:26:03 +00:00
|
|
|
|
################################################################################
|
|
|
|
|
# This file is part of OpenELEC - http://www.openelec.tv
|
|
|
|
|
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
2011-01-09 22:11:13 +00:00
|
|
|
|
# Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv)
|
2011-01-09 20:26:03 +00:00
|
|
|
|
#
|
|
|
|
|
# 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
|
|
|
|
|
################################################################################
|
2009-03-18 12:02:53 +00:00
|
|
|
|
|
2010-07-21 16:54:45 +00:00
|
|
|
|
. config/options $1
|
2009-03-18 12:02:53 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
STAMP=$STAMPS_INSTALL/$1/install
|
|
|
|
|
|
2009-03-18 12:02:53 +00:00
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
|
echo "usage: $0 package_name"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
mkdir -p $STAMPS_INSTALL/$1
|
2009-03-18 12:02:53 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
if [ -f $STAMP -a $PKG_DIR/install -nt $STAMP ]; then
|
|
|
|
|
rm -f $STAMP
|
|
|
|
|
fi
|
2009-03-18 12:02:53 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
[ -f $STAMP -a $FORCE_INSTALL = "no" ] && exit 0
|
2009-03-18 12:02:53 +00:00
|
|
|
|
|
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 21:01:08 +00:00
|
|
|
|
if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then
|
|
|
|
|
echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0
|
|
|
|
|
echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0
|
2010-11-11 16:05:47 +00:00
|
|
|
|
fi
|
2010-10-19 19:26:14 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
if [ -d $PKG_DIR/init.d ]; then
|
2012-02-19 13:03:43 +00:00
|
|
|
|
mkdir -p $INSTALL_SYSTEM/etc/init.d
|
|
|
|
|
cp $PKG_DIR/init.d/* $INSTALL_SYSTEM/etc/init.d/
|
2010-11-11 16:05:47 +00:00
|
|
|
|
fi
|
2010-10-19 19:26:14 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
if [ -d $PKG_DIR/profile.d ]; then
|
2012-02-19 13:03:43 +00:00
|
|
|
|
mkdir -p $INSTALL_SYSTEM/etc/profile.d
|
|
|
|
|
cp $PKG_DIR/profile.d/*.conf $INSTALL_SYSTEM/etc/profile.d/
|
2010-11-11 16:05:47 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2011-02-13 19:45:23 +00:00
|
|
|
|
if [ -d $PKG_DIR/udev.d ]; then
|
2012-02-19 13:03:43 +00:00
|
|
|
|
mkdir -p $INSTALL_SYSTEM/lib/udev/rules.d
|
|
|
|
|
cp $PKG_DIR/udev.d/*.rules $INSTALL_SYSTEM/lib/udev/rules.d
|
2011-02-13 19:45:23 +00:00
|
|
|
|
fi
|
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
if [ -d $PKG_DIR/init.network ]; then
|
2012-02-19 13:03:43 +00:00
|
|
|
|
mkdir -p $INSTALL_SYSTEM/etc/init.d/network
|
|
|
|
|
cp $PKG_DIR/init.network/* $INSTALL_SYSTEM/etc/init.d/network/
|
2010-11-11 16:05:47 +00:00
|
|
|
|
fi
|
2010-10-19 19:26:14 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
$SCRIPTS/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 21:01:08 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
printf "%${INDENT}c INSTALL $1\n" >&$SILENT_OUT
|
|
|
|
|
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
|
2010-10-19 19:26:14 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
for p in $PKG_DEPENDS; do
|
|
|
|
|
$SCRIPTS/install $p
|
|
|
|
|
done
|
2010-10-11 13:55:29 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
if [ -f $PKG_DIR/install ]; then
|
|
|
|
|
$PKG_DIR/install $@ >&$VERBOSE_OUT
|
|
|
|
|
fi
|
2009-03-18 12:02:53 +00:00
|
|
|
|
|
2010-11-11 16:05:47 +00:00
|
|
|
|
for i in `sed -n "s/^\([^#].*\)=\".*$/\1/p" $PROJECT_DIR/$PROJECT/options | grep -v "#"`; do
|
|
|
|
|
eval val=\$$i
|
|
|
|
|
echo "STAMP_$i=\"$val"\" >> $STAMP
|
|
|
|
|
done
|