Added dialog bundle

This commit is contained in:
bauen1 2017-11-14 15:38:23 +01:00
parent d62fdcc76b
commit a70f4bd170
No known key found for this signature in database
GPG Key ID: FF0AAF5E0812BA9C
4 changed files with 95 additions and 1 deletions

View File

@ -110,7 +110,11 @@ UTIL_LINUX_SOURCE_URL=https://www.kernel.org/pub/linux/utils/util-linux/v2.31/ut
#
ZLIB_SOURCE_URL=http://zlib.net/zlib-1.2.11.tar.xz
# You can find the latest dialog source bundles here:
#
# http://invisible-island.net/dialog/
#
DIALOG_SOURCE_URL=ftp://ftp.invisible-island.net/dialog/dialog-1.3-20170509.tgz
####################################################
# #

View File

@ -0,0 +1,40 @@
#!/bin/sh
SRC_DIR=$(pwd)
. ../../common.sh
# Grab everything after the '=' character.
DOWNLOAD_URL=$(grep -i DIALOG_SOURCE_URL $MAIN_SRC_DIR/.config | cut -f2 -d'=')
# Grab everything after the last '/' character.
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
# Read the 'USE_LOCAL_SOURCE' property from '.config'
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE $MAIN_SRC_DIR/.config | cut -f2 -d'=')"
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
USE_LOCAL_SOURCE="false"
fi
cd $MAIN_SRC_DIR/source/overlay
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
# Downloading dialog source bundle file. The '-c' option allows the download to resume.
echo "Downloading dialog source bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local dialog source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted dialog.
echo "Removing dialog work area. This may take a while..."
rm -rf $WORK_DIR/overlay/dialog
mkdir $WORK_DIR/overlay/dialog
# Extract dialog to folder 'work/overlay/dialog'.
# Full path will be something like 'work/overlay/dialog/dialog-1.3-20170509'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/dialog
cd $SRC_DIR

View File

@ -0,0 +1,41 @@
#!/bin/bash
SRC_DIR=$(pwd)
. ../../common.sh
cd $WORK_DIR/overlay/dialog
DESTDIR="$PWD/dialog_installed"
# Change to the dialog source directory which ls finds, e.g. 'dialog-1.3-20170509'.
cd $(ls -d dialog-*)
echo "Preparing dialog work area. This may take a while..."
make -j $NUM_JOBS clean
rm -rf $DESTDIR
# Configure dialog
echo "Configuring dialog..."
CFLAGS="$CFLAGS" ./configure \
--prefix=/usr \
--with-ncursesw
echo "Building dialog..."
make -j $NUM_JOBS
echo "Installing dialog..."
make -j $NUM_JOBS install DESTDIR=$DESTDIR
echo "Reducing dialog size..."
strip -g $DESTDIR/usr/bin/*
ROOTFS="$WORK_DIR/src/minimal_overlay/rootfs"
cp -r $DESTDIR/usr/* $ROOTFS
echo "dialog has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,9 @@
#!/bin/sh
SRC_DIR=$(pwd)
./01_get.sh
./02_build.sh
cd $SRC_DIR