From f463c38f07ced666461e336f3f4f01a7e56f3a90 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 11 Dec 2010 15:05:13 +0100 Subject: [PATCH] projects/*/options: add variable $DISTRONAME, add support to rename the distro Signed-off-by: Stephan Raue --- config/path | 2 +- projects/ATV/options | 3 +++ projects/ION/options | 3 +++ projects/generic/options | 3 +++ projects/intel/options | 3 +++ scripts/checkdeps | 2 +- scripts/image | 4 ++-- scripts/image_release | 10 +++++----- scripts/image_squashfs | 12 ++++++------ 9 files changed, 27 insertions(+), 15 deletions(-) diff --git a/config/path b/config/path index bbfa2a486a..acfd2f6757 100644 --- a/config/path +++ b/config/path @@ -37,7 +37,7 @@ HOST_NAME=`$SCRIPTS/configtools/config.guess` TARGET_NAME=$TARGET_FAMILY-openelec-linux-gnu OPENELEC_SRC=http://sources.openelec.tv/src/$OPENELEC_VERSION -BUILD=$BUILD_BASE.OpenELEC-$PROJECT.$TARGET_ARCH.$OPENELEC_VERSION +BUILD=$BUILD_BASE.$DISTRONAME-$PROJECT.$TARGET_ARCH.$OPENELEC_VERSION TARGET_IMG=$ROOT/$TARGET TARGET_ADDONS="$TARGET_IMG/$ADDONS/$ADDON_PATH" ADDON_BUILD="$BUILD/$ADDONS/$1" diff --git a/projects/ATV/options b/projects/ATV/options index 095407ac84..f12b8e57ac 100644 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -1,3 +1,6 @@ +# Name of the Distro to build (full name, without special charcters) + DISTRONAME="OpenELEC" + # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" diff --git a/projects/ION/options b/projects/ION/options index 339a195428..163b09cd57 100644 --- a/projects/ION/options +++ b/projects/ION/options @@ -1,3 +1,6 @@ +# Name of the Distro to build (full name, without special charcters) + DISTRONAME="OpenELEC" + # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" diff --git a/projects/generic/options b/projects/generic/options index 3ee114cbec..1158f80f96 100644 --- a/projects/generic/options +++ b/projects/generic/options @@ -1,3 +1,6 @@ +# Name of the Distro to build (full name, without special charcters) + DISTRONAME="OpenELEC" + # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" diff --git a/projects/intel/options b/projects/intel/options index 3daaccb1dd..628c876c6e 100644 --- a/projects/intel/options +++ b/projects/intel/options @@ -1,3 +1,6 @@ +# Name of the Distro to build (full name, without special charcters) + DISTRONAME="OpenELEC" + # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" diff --git a/scripts/checkdeps b/scripts/checkdeps index 74242b80b8..cabfd98f0a 100755 --- a/scripts/checkdeps +++ b/scripts/checkdeps @@ -43,7 +43,7 @@ while file=`getarg $i $files` && [ -n "$file" ]; do done if [ -n "$need" ]; then - echo "**** Your system lacks the following tools needed to $1 OpenELEC.tv ****" + echo "**** Your system lacks the following tools needed to $1 $DISTRONAME ****" echo $need [ -f /etc/lsb-release ] && . /etc/lsb-release diff --git a/scripts/image b/scripts/image index e91d522b52..76c40e530a 100755 --- a/scripts/image +++ b/scripts/image @@ -39,10 +39,10 @@ mkdir -p $INSTALL ln -s lib $INSTALL/usr/lib64 fi - echo "OpenELEC" > $INSTALL/etc/distribution + echo "$DISTRONAME" > $INSTALL/etc/distribution echo "$PROJECT.$TARGET_ARCH" > $INSTALL/etc/arch echo "$OPENELEC_VERSION" > $INSTALL/etc/version - echo "OpenELEC.tv - Date of build: $BUILD_DATE Build: $GIT_BUILD" > $INSTALL/etc/openelec-release + echo "$DISTRONAME - Date of build: $BUILD_DATE Build: $GIT_BUILD" > $INSTALL/etc/openelec-release echo "$TARGET_VERSION" > $INSTALL/etc/release # copy project related files to filesystem diff --git a/scripts/image_release b/scripts/image_release index 24e5697e62..6f4e23c3b4 100755 --- a/scripts/image_release +++ b/scripts/image_release @@ -6,7 +6,7 @@ $SCRIPTS/image_squashfs get_version -RELEASE_DIR="target/OpenELEC-$TARGET_VERSION" +RELEASE_DIR="target/$DISTRONAME-$TARGET_VERSION" # cleanup rm -rf $RELEASE_DIR @@ -23,8 +23,8 @@ RELEASE_DIR="target/OpenELEC-$TARGET_VERSION" cp $ROOT/licenses/* $RELEASE_DIR/licenses mkdir -p $RELEASE_DIR/target - cp $TARGET_IMG/OpenELEC-$TARGET_VERSION.system $RELEASE_DIR/target/SYSTEM - cp $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel $RELEASE_DIR/target/KERNEL + cp $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system $RELEASE_DIR/target/SYSTEM + cp $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.kernel $RELEASE_DIR/target/KERNEL # create md5sum's pushd $RELEASE_DIR > /dev/null 2>&1 @@ -36,10 +36,10 @@ RELEASE_DIR="target/OpenELEC-$TARGET_VERSION" mkdir -p $TARGET_IMG # remove an previous created release tarball - rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.tar.bz2 + rm -rf $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.tar.bz2 # create release tarball - tar cjf $TARGET_IMG/OpenELEC-$TARGET_VERSION.tar.bz2 -C target OpenELEC-$TARGET_VERSION + tar cjf $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.tar.bz2 -C target $DISTRONAME-$TARGET_VERSION # cleanup release dir rm -rf $RELEASE_DIR diff --git a/scripts/image_squashfs b/scripts/image_squashfs index 0a18bc4566..7ec943b523 100755 --- a/scripts/image_squashfs +++ b/scripts/image_squashfs @@ -13,12 +13,12 @@ $SCRIPTS/build fakeroot get_version mkdir -p $TARGET_IMG - rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel - cp -PR $BUILD/linux-*/arch/x86/boot/bzImage $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel + rm -rf $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.kernel + cp -PR $BUILD/linux-*/arch/x86/boot/bzImage $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.kernel - echo "rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.system" >> $FAKEROOT_SCRIPT -# echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/OpenELEC-$TARGET_VERSION.system -noappend -comp lzma" >> $FAKEROOT_SCRIPT - echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/OpenELEC-$TARGET_VERSION.system -noappend" >> $FAKEROOT_SCRIPT + echo "rm -rf $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system" >> $FAKEROOT_SCRIPT +# echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system -noappend -comp lzma" >> $FAKEROOT_SCRIPT + echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system -noappend" >> $FAKEROOT_SCRIPT $ROOT/$TOOLCHAIN/bin/fakeroot -- $FAKEROOT_SCRIPT - chmod 0644 $TARGET_IMG/OpenELEC-$TARGET_VERSION.system + chmod 0644 $TARGET_IMG/$DISTRONAME-$TARGET_VERSION.system rm -rf $FAKEROOT_SCRIPT