summaryrefslogtreecommitdiff
path: root/tools
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
parent282d96f8885b1f9e71189a927f53412df05a352f (diff)
Update cerbero's config to work properly in the chroot
Diffstat (limited to 'tools')
-rw-r--r--tools/build-release.sh30
-rw-r--r--tools/cerbero.cbc.template3
2 files changed, 27 insertions, 6 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"
diff --git a/tools/cerbero.cbc.template b/tools/cerbero.cbc.template
index dad1699..989276f 100644
--- a/tools/cerbero.cbc.template
+++ b/tools/cerbero.cbc.template
@@ -1,7 +1,6 @@
import os
-from cerbero.config import Platform, Architecture, Distro
+from cerbero.config import Platform, Architecture, Distro, DistroVersion
packages_prefix = 'gstreamer-sdk'
packager = 'GStreamer SDK packagers <packages@gstreamer.com>'
prefix = "/opt/gstreamer-sdk"
-