Merge pull request #115 from bauen1/make

Added Make bundle
This commit is contained in:
Ivan Davidov 2017-11-27 02:35:50 +02:00 committed by GitHub
commit 9dc8fc2261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 0 deletions

View File

@ -109,6 +109,12 @@ LINKS_SOURCE_URL=http://links.twibright.com/download/links-2.14.tar.bz2
#
LUA_SOURCE_URL=https://www.lua.org/ftp/lua-5.3.4.tar.gz
# You can find the latest make source bundles here:
#
# http://www.gnu.org/software/make
#
MAKE_SOURCE_URL=ftp://ftp.gnu.org/gnu/make/make-4.2.1.tar.bz2
# You can find the latest nano source bundles here:
#
# https://nano-editor.org/download.php
@ -253,6 +259,7 @@ COPY_SOURCE_ISO=true
# libevent - event notification library.
# links - text browser for the web.
# lua - scripting language.
# make - GNU make utility
# mll_utils - set of executable utilities (mll-*).
# nano - simple command-line text editor with on-screen shortcuts.git
# ncurses - "GUI-like" API that runs within a terminal emulator.

View File

@ -82,6 +82,8 @@ Currently available overlay bundles:
space. Use the "lua" command to run an interactive lua
interpreter.
* make - GNU make utility
* MLL Utils - Set of experimental shell scripts (mll-*.sh) which provide
additional functionality, e.g. installer and useful tools.

View File

@ -0,0 +1,41 @@
#!/bin/bash
SRC_DIR=$(pwd)
. ../../common.sh
# Grab everything after the '=' character.
DOWNLOAD_URL=$(grep -i MAKE_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 make source bundle file. The '-c' option allows the download to resume.
echo "Downloading make source bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local make source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted make.
echo "Removing make work area. This may take a while..."
rm -rf $WORK_DIR/overlay/make
mkdir $WORK_DIR/overlay/make
# Extract make to folder 'work/overlay/make'.
# Full path will be something like 'work/overlay/make/make-8.28'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/make
cd $SRC_DIR

View File

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

View File

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