summaryrefslogtreecommitdiff
path: root/tools/build-release.sh
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-11-15 12:01:45 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2012-11-15 13:40:33 +0100
commit2f448e0419c492393187f04cc6d58b898d286f5d (patch)
tree744212b35d67ed929e911ae93a138ae6abe52d8b /tools/build-release.sh
parent282d96f8885b1f9e71189a927f53412df05a352f (diff)
Update cerbero's config to work properly in the chroot
Diffstat (limited to 'tools/build-release.sh')
-rw-r--r--tools/build-release.sh30
1 files changed, 26 insertions, 4 deletions
diff --git a/tools/build-release.sh b/tools/build-release.sh
index d5a83c2..3bfbab0 100644
--- a/tools/build-release.sh
+++ b/tools/build-release.sh
@@ -21,8 +21,25 @@ die() {
sh $BASEDIR/bootstrap-$DISTRO_FAMILY.sh $CHROOT_PREFIX $DISTRO $DISTRO_VERSION $ARCH $USER
-cerbero_distro=`echo $DISTRO_FAMILY | awk '{print toupper($0)}'`
-cerbero_distro_version=`echo "$DISTRO"_"$DISTRO_VERSION" | awk '{print toupper($0)}'`
+if test $DISTRO_FAMILY = "redhat"; then
+ CHROOT_PATH=$CHROOT_PATH/root
+fi
+
+cerbero_distro=Distro.`echo $DISTRO_FAMILY | awk '{print toupper($0)}'`
+cerbero_distro_version=DistroVersion.`echo "$DISTRO"_"$DISTRO_VERSION" | awk '{print toupper($0)}'`
+
+if test $ARCH = "i386" || test $ARCH = "x86"; then
+ cerbero_arch=X86
+elif test $ARCH = "x86_64"; then
+ cerbero_arch=X86_64
+else
+ die "Architecture $ARCH not supported"
+fi
+
+cerbero_arch=Architecture.$cerbero_arch
+cerbero_target_arch=$cerbero_arch
+cerbero_host=$ARCH-pc-linux-gnu
+cerbero_build=$ARCH-pc-linux-gnu
cp /etc/resolv.conf $CHROOT_PATH/etc/resolv.conf
cp /etc/hosts $CHROOT_PATH/etc/hosts
@@ -62,8 +79,13 @@ cp -rf .git $CHROOT_PATH/home/$USER/git/cerbero-0.1.0/
echo "generating $CHROOT_PATH/home/$USER/.cerbero/cerbero.cdc from template"
mkdir -p $CHROOT_PATH/home/$USER/.cerbero
cp -f tools/cerbero.cbc.template $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
-echo "distro = Distro.$cerbero_distro" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
-echo "distro_version = DistroVersion.$cerbero_distro_version" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
+echo "distro = $cerbero_distro" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
+echo "distro_version = $cerbero_distro_version" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
+echo "arch = $cerbero_arch" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
+echo "target_arch = $cerbero_target_arch" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
+echo "host = \"$cerbero_host\"" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
+echo "build = \"$cerbero_build\"" >> $CHROOT_PATH/home/$USER/.cerbero/cerbero.cbc
+
sudo mkdir -p $CHROOT_PATH/opt/gstreamer-sdk
echo "fixing permissions"