NAME="IPFire" # Software name
SNAME="ipfire" # Short name
VERSION="2.19" # Version number
-CORE="110" # Core Level (Filename)
-PAKFIRE_CORE="110" # Core Level (PAKFIRE)
+CORE="117" # Core Level (Filename)
+PAKFIRE_CORE="116" # Core Level (PAKFIRE)
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch
SLOGAN="www.ipfire.org" # Software slogan
CONFIG_ROOT=/var/ipfire # Configuration rootdir
KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
GIT_TAG=$(git tag | tail -1) # Git Tag
GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit
-TOOLCHAINVER=12
+
+TOOLCHAINVER=20171121
# New architecture variables
HOST_ARCH="$(uname -m)"
DIR_CHK=$BASEDIR/cache/check
mkdir $BASEDIR/log/ 2>/dev/null
-# Include funtions
-. tools/make-functions
-
+# Load configuration file
if [ -f .config ]; then
. .config
fi
+# Include funtions
+. tools/make-functions
+
+# Get the amount of memory in this build system
+HOST_MEM=$(system_memory)
+
if [ -n "${BUILD_ARCH}" ]; then
configure_build "${BUILD_ARCH}"
elif [ -n "${TARGET_ARCH}" ]; then
configure_build "default"
fi
-if [ -z $EDITOR ]; then
- for i in nano emacs vi; do
- EDITOR=$(which $i 2>/dev/null)
- if ! [ -z $EDITOR ]; then
- export EDITOR=$EDITOR
- break
- fi
- done
- [ -z $EDITOR ] && exiterror "You should have installed an editor."
-fi
-
-
prepareenv() {
############################################################################
# #
# Set LFS Directory
LFS=$BASEDIR/build
- # Check /tools symlink
- if [ -h /tools ]; then
- rm -f /tools
+ # Check ${TOOLS_DIR} symlink
+ if [ -h "${TOOLS_DIR}" ]; then
+ rm -f "${TOOLS_DIR}"
fi
- if [ ! -a /tools ]; then
- ln -s $BASEDIR/build/tools /
+
+ if [ ! -e "${TOOLS_DIR}" ]; then
+ ln -s "${BASEDIR}/build${TOOLS_DIR}" "${TOOLS_DIR}"
fi
- if [ ! -h /tools ]; then
- exiterror "Could not create /tools symbolic link."
+
+ if [ ! -h "${TOOLS_DIR}" ]; then
+ exiterror "Could not create ${TOOLS_DIR} symbolic link"
fi
# Setup environment
set +h
LC_ALL=POSIX
- if [ -z $MAKETUNING ]; then
- CPU_COUNT="$(getconf _NPROCESSORS_ONLN 2>/dev/null)"
- if [ -z "${CPU_COUNT}" ]; then
- CPU_COUNT=1
- fi
-
- MAKETUNING="-j$(( ${CPU_COUNT} * 2 + 1 ))"
- fi
export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
# Make some extra directories
- mkdir -p $BASEDIR/build/{tools,etc,usr/src} 2>/dev/null
+ mkdir -p "${BASEDIR}/build${TOOLS_DIR}" 2>/dev/null
+ mkdir -p $BASEDIR/build/{etc,usr/src} 2>/dev/null
mkdir -p $BASEDIR/build/{dev/{shm,pts},proc,sys}
mkdir -p $BASEDIR/{cache,ccache} 2>/dev/null
mkdir -p $BASEDIR/build/usr/src/{cache,config,doc,html,langs,lfs,log,src,ccache}
lfsmake2 file
lfsmake2 gcc
lfsmake2 sed
- lfsmake2 berkeley
lfsmake2 autoconf
lfsmake2 automake
+ lfsmake2 berkeley
lfsmake2 coreutils
lfsmake2 iana-etc
lfsmake2 m4
lfsmake2 udev
lfsmake2 vim
lfsmake2 xz
+ lfsmake2 paxctl
}
buildipfire() {
lfsmake2 nettle
lfsmake2 libevent
lfsmake2 libevent2
+ lfsmake2 libevent2-compat
lfsmake2 expat
+ lfsmake2 apr
+ lfsmake2 aprutil
lfsmake2 unbound
lfsmake2 gnutls
lfsmake2 bind
lfsmake2 libart
lfsmake2 gd
lfsmake2 popt
- lfsmake2 pcre
lfsmake2 slang
lfsmake2 newt
lfsmake2 libsmooth
lfsmake2 web-user-interface
lfsmake2 flag-icons
lfsmake2 jquery
+ lfsmake2 bootstrap
lfsmake2 arping
lfsmake2 beep
lfsmake2 dvdrtools
lfsmake2 python-ipaddress
lfsmake2 glib
lfsmake2 GeoIP
- lfsmake2 fwhits
lfsmake2 noip_updater
lfsmake2 ntp
lfsmake2 openssh
lfsmake2 fontconfig
lfsmake2 dejavu-fonts-ttf
+ lfsmake2 ubuntu-font-family
lfsmake2 freefont
lfsmake2 pixman
lfsmake2 cairo
lfsmake2 intltool
lfsmake2 libdaemon
lfsmake2 cups
- lfsmake2 ghostscript
lfsmake2 lcms2
+ lfsmake2 ghostscript
lfsmake2 qpdf
lfsmake2 poppler
lfsmake2 cups-filters
lfsmake2 gnu-netcat
lfsmake2 ncat
lfsmake2 nmap
- lfsmake2 ncftp
lfsmake2 etherwake
lfsmake2 bwm-ng
lfsmake2 sysstat
lfsmake2 icinga
lfsmake2 ebtables
lfsmake2 directfb
- lfsmake2 dfb++
lfsmake2 faad2
lfsmake2 ffmpeg
lfsmake2 vdr
lfsmake2 vdr_streamdev
- lfsmake2 vdr_vnsiserver5
lfsmake2 vdr_epgsearch
lfsmake2 vdr_dvbapi
lfsmake2 vdr_eepg
lfsmake2 cacti
lfsmake2 openvmtools
lfsmake2 nagiosql
- lfsmake2 iftop
lfsmake2 motion
lfsmake2 joe
lfsmake2 monit
lfsmake2 pound
lfsmake2 minicom
lfsmake2 ddrescue
- lfsmake2 imspector
lfsmake2 miniupnpd
lfsmake2 client175
lfsmake2 powertop
lfsmake2 dpfhack
lfsmake2 lcd4linux
lfsmake2 mtr
- lfsmake2 tcpick
lfsmake2 minidlna
lfsmake2 acpid
lfsmake2 fping
lfsmake2 owncloud
lfsmake2 bacula
lfsmake2 batctl
+ lfsmake2 perl-Font-TTF
+ lfsmake2 perl-IO-String
lfsmake2 perl-PDF-API2
lfsmake2 squid-accounting
lfsmake2 pigz
lfsmake2 libpciaccess
lfsmake2 libyajl
lfsmake2 libvirt
+ lfsmake2 python3-libvirt
lfsmake2 freeradius
lfsmake2 perl-common-sense
lfsmake2 perl-inotify2
lfsmake2 perl-Net-IP
+ lfsmake2 wio
+ lfsmake2 iftop
}
buildinstaller() {
export LOGFILE
lfsmake2 memtest
lfsmake2 installer
- lfsmake2 strip
+ lfsmake1 strip
}
buildpackages() {
while [ $# -gt 0 ]; do
case "${1}" in
--target=*)
- configure_target "${1#--target=}"
+ configure_build "${1#--target=}"
;;
-*)
exiterror "Unknown configuration option: ${1}"
clear
PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz 2> /dev/null | head -n 1`
#only restore on a clean disk
- if [ ! -e "${BASEDIR}/build/tools/.toolchain-successful" ]; then
+ if [ ! -e "${BASEDIR}/build${TOOLS_DIR}/.toolchain-successful" ]; then
if [ ! -n "$PACKAGE" ]; then
- beautify build_stage "Full toolchain compilation - Native GCC: `gcc --version | grep GCC | awk {'print $3'}`"
+ beautify build_stage "Full toolchain compilation"
prepareenv
buildtoolchain
else
rm -rf $BASEDIR/cdrom
rm -rf $BASEDIR/packages
rm -rf $BASEDIR/log
- if [ -h /tools ]; then
- rm -f /tools
+ if [ -h "${TOOLS_DIR}" ]; then
+ rm -f "${TOOLS_DIR}"
fi
rm -f $BASEDIR/ipfire-*
beautify message DONE
toolchain)
clear
prepareenv
- beautify build_stage "Toolchain compilation - Native GCC: `gcc --version | grep GCC | awk {'print $3'}`"
+ beautify build_stage "Toolchain compilation"
buildtoolchain
echo "`date -u '+%b %e %T'`: Create toolchain tar.gz for ${BUILD_ARCH}" | tee -a $LOGFILE
test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
cd $BASEDIR && tar -zc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz \
- build/tools build/bin/sh log >> $LOGFILE
+ build/${TOOLS_DIR} build/bin/sh log >> $LOGFILE
md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.gz \
> cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5
stdumount
echo "Toolchain is already downloaded. Exiting..."
fi
;;
-othersrc)
- prepareenv
- echo -ne "`date -u '+%b %e %T'`: Build sources iso for ${BUILD_ARCH}" | tee -a $LOGFILE
- chroot $LFS /tools/bin/env -i HOME=/root \
- TERM=$TERM PS1='\u:\w\$ ' \
- PATH=/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin \
- VERSION=$VERSION NAME="$NAME" SNAME="$SNAME" BUILD_ARCH="${BUILD_ARCH}" \
- /bin/bash -x -c "cd /usr/src/lfs && make -f sources-iso LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
- mv $LFS/install/images/ipfire-* $BASEDIR >> $LOGFILE 2>&1
- if [ $? -eq "0" ]; then
- beautify message DONE
- else
- beautify message FAIL
- fi
- stdumount
- ;;
uploadsrc)
PWD=`pwd`
if [ -z $IPFIRE_USER ]; then