diff --git a/bldpkg b/bldpkg
index 207114f..28b0336 100755
--- a/bldpkg
+++ b/bldpkg
@@ -1,53 +1,33 @@
#!/bin/bash
# Part of the SMLinux distribution
-# pktsurf.in
+# http://git.pktsurf.in
# Exit on any error
set -e
-# Store the source directory the build file was initiated from inside $SRCDIR
+# Store the source directory path the build was initiated from
SRCDIR="$PWD"
-# get relative directory name from SRCDIR
+# Get relative directory name from SRCDIR
SRCDIRRPATH="$(basename $SRCDIR)"
-# Generate sha512sums in the build file
-genchecksum() {
- echo "Discarding old SHA512SUMS from $SRCDIRRPATH.SMBuild"
- sed -E -i \
- -e '/^SHA512SUMS=".*"$/d' \
- -e '/^SHA512SUMS="/,/"$/d' \
- -e "/^SHA512SUMS='.*'\$/d" \
- -e "/^SHA512sums='/,/'\$/d" \
- "$SRCDIRRPATH".SMBuild
-
- echo "Adding new SHA512SUMS in $SRCDIRRPATH.SMBuild..."
- printf 'SHA512SUMS="\n' >> "$SRCDIRRPATH".SMBuild
-
- # File types
- FILES=( *.tar.* *.zip *.t?z *.patch *.diff *.c *.h )
-
- # Checksum digest to be used along with arguments
- CHECKSUMBINARY="sha512sum"
-
- for FILE in ${FILES[@]} ; do
- if [ -f "$FILE" ] ; then
- $CHECKSUMBINARY $FILE >> "$SRCDIRRPATH".SMBuild
- fi
- done
- printf '"' >> "$SRCDIRRPATH".SMBuild
- echo "You may now run bldpkg again without any arguments"
- exit 0
-}
-
+# Load all functions from files inside /etc/bldpkg.d
+for f in /etc/bldpkg.d/* ; do
+ source $f
+done
+# If the first argument is "genchecksum", invoke the genchecksum function.
+# Else if the first argument is filename, then get the build extension of that file and source it, else throw an error
+# Else if no argument is given, get the basename of the directory and look for a matching package build file name.
+# If a package build file is found, source that file and that will initiate the build.
if [ -n "$1" ] && [ "$1" = "genchecksum" ] ; then
genchecksum
elif [ -n "$1" ] ; then
- if [ -f "$1" ]; then
+ EXTENSION="${1##*.}"
+ if [ -f "$1" ] && [ "$EXTENSION" == "SMBuild" ] ; then
source "$1"
else
- echo "File not found!"
+ echo "Invalid file!"
exit 1
fi
elif [ -z $1 ] && [ -f "$SRCDIRRPATH".SMBuild ]; then
@@ -57,234 +37,201 @@ else
exit 1
fi
-#type -t prepbdir
-
-# Then source the conf file holding all values
-. ${BUILDVARS:-/etc/bldpkg.conf}
-# This file is executed by bldpkg.conf and assists in preparing a complete build environment.
-
-# Execute everything inside this condition so that stuff isn't executed and put into the build environment
-# unnecessarily when the section build file runs. This happens mostly during autobuilds.
-# Get APP and VERSION from the build file
-if [ -n "$APP" ] && [ -n "$VERSION" ]; then
+# If any of the following variables are not set, abort.
+if [ -z "$APP" ] || [ -z "$VERSION" ] || [ -z "$BUILD" ] || [ -z "$DESC" ] || [ -z "$REQUIRES" ] ; then
+ echo "One or more required variables not set. Aborting."
+ exit 1
+fi
- # Display the package and its version we are building
- echo "[INFO] Building package $APP version $VERSION ..."
- sleep 0.5
+# Display the package and its version we are building
+echo "[INFO] Building package $APP version $VERSION ..."
+sleep 0.5
- # Create the $SM_PARENTTEMP directory. This directory is used for everything related to the build process outside
- #the source directory $SRCDIR
- mkdir -p $SM_PARENTTMP
-
- # If $SM_HTMLOUTPUT is set to 1, echo $APP, $VERSION and $BUILD as file names inside the parent build directory.
- # This will output into an HTML file so that the basic status of the build process (whether started, stopped,
- # interrupted or failed) can be viewed in the web browser.
- if [ -n "$SM_HTMLOUTPUT" ] && [ "$SM_HTMLOUTPUT" = "1" ] ; then
- echo $APP > $SM_PARENTTMP/$APP.APP
- echo $VERSION > $SM_PARENTTMP/$APP.VERSION
- echo $BUILD > $SM_PARENTTMP/$APP.BUILD
- fi
-
- # Store the source directory the build file was initiated from inside $SRCDIR
- #SRCDIR="$PWD"
-
- # Function to match specifically match arrays inside a value. This function will be used later on to perform package
- # and directory matches using certain conditions. Note: "${ARRAY[@]}" =~ "${VARIABLE}" isn't fool-proof.
- inarray() {
- local n=$1 h
- shift
- for h ;
- do
- [[ $n = "$h" ]] && return
- done
- return 1
- }
-
- for f in /etc/bldpkg.d/* ; do
- source $f
- done
-
- # Time when the build commenced. Note: elapsed time is logged by the runtime function way below. This output goes
- # into package build summary.
- SM_COMMENCEDATE="$(date '+%a, %d %b %Y, %T')"
-
- if [ -n "$SM_HTMLOUTPUT" ] && [ "$SM_HTMLOUTPUT" = "1" ] ; then
- if [ -n "$SM_AUTOBUILD" ] ; then
- cat << EOF >> $SM_PARENTTMP/BUILDMONITOR
-$SM_COMMENCEDATE | Building package # $CURRENTPKGNUMBER / $TOTALPKGNUMBER: $APP $VERSION
-EOF
- else
- cat << EOF >> $SM_PARENTTMP/BUILDMONITOR
-$SM_COMMENCEDATE | Building package $APP $VERSION
-EOF
- fi
-
- touch $SM_PARENTTMP/BUILDING
- fi
-
- # Validate compressor and set extension
- validatecompressors
-
- # Validate tmpfs
- validatetmpfs
-
- # Validate system swap if SM_SWAPCHECK is defined and set to 1
- validateswap
-
- # Set the temporary directory for building the package. Also define package staging directory. This is where package
- # files that get "installed" go into, for example 'make install DESTDIR=$PKG' or 'DESTDIR="$PKG" ninja install'.
-
- # If SM_USETMPFS is set to 1, SM_TMPFSDIR is defined and SM_TMPFSCHECKFAILED variable is unset, determine if the
- # $APP is in the exception list and whether to build inside or outside the TMPFS directory.
- if [ "$SM_USETMPFS" = "1" ] && [ -n "$SM_TMPFSDIR" ] && \
- [ -z "$SM_TMPFSCHECKFAILED" ] ; then
-
- # If $APP is in the TMPFS exception list inside /etc/bldpkg.conf, compile it *OUTSIDE* the TMPFS directory, i.e
- # the non-TMPFS directory, else compile it *INSIDE* the TMPFS directory. This if/else is solely for deciding
- # whether $APP is in the exception list or not.
- if inarray "${APP}" "${SM_TMPFSEXCEPTIONLIST[@]}" ; then
-
- # We DO NOT compile inside tmpfsdir
- SM_TMPFSENABLEDFORTHISPACKAGE=0
-
- # In the absence of tmpfs, we use the normal directory
- SM_TMP="$SM_NONTMPFSDIR/$APP.src"
- PKG=${PKG:-$SM_NONTMPFSDIR/package-$APP}
- else
- # We compile inside tmpfsdir. Set the TMPFSENABLEDFORTHISPACKAGE variable here to inform build summary function at the bottom
- SM_TMPFSENABLEDFORTHISPACKAGE=1
-
- # Disable ccache
- SM_CCACHE=0
-
- # Override SM_PRESERVEBUILDDIR and SM_PRESERVEPACKAGEDIR to remove both build and package directories
- SM_PRESERVEBUILDDIR=0
- SM_PRESERVEPACKAGEDIR=0
-
- # Get the directory from the SM_TMPFSDIR variable for extracting the source
- SM_TMP="$SM_TMPFSDIR/$APP.src"
- PKG=${PKG:-$SM_TMPFSDIR/package-$APP}
- fi
- else
- # If SM_USETMPFS is disabled, we compile in the non-TMPFS directory
- SM_TMP="$SM_NONTMPFSDIR/$APP.src"
- PKG=${PKG:-$SM_NONTMPFSDIR/package-$APP}
- fi
-
-
- # Validate and export $SM_CPUTHREADS as MAKEFLAGS variable
- if [ -n "$SM_CPUTHREADS" ]; then
- # export the user-defined number
- MAKEFLAGS="$SM_CPUTHREADS"
- export MAKEFLAGS
- else
- # Or fetch the number from nproc
- MAKEFLAGS="$(nproc --all)"
- export MAKEFLAGS
- fi
-
- # Invoke validatecompilers function
- validatecompilers
-
- # Apply CPU-specific compiler variables defined inside bldpkg.conf
- # https://github.com/sakaki-/gentoo-on-rpi-64bit/blob/master/reference/compile_run_benchmarks.sh
- # https://www.raspberrypi.org/forums/viewtopic.php?t=11629
- # noarch is set inside initfs, pkgtools, GTK themes and some other stuff.
-
- # If $ARCH has not been exported by autobuild or not set in the individual build files that have ARCH=noarch, we set our own
- # $HOSTTYPE is only set in the bash shell.
- [ -z "$ARCH" ] && ARCH="$HOSTTYPE"
-
- if [ "$ARCH" = "noarch" ]; then
- CFLAGS=""
- export CFLAGS
-
- elif [ "$ARCH" = "aarch64" ]; then
- HOSTDIST="$SM_AARCH64HOSTDIST"
- BUILDDIST="$SM_AARCH64BUILDDIST"
- if [ -n "$SM_DEBUG" ]; then
- CFLAGS="$(echo $SM_GCCDEBUG $SM_AARCH64CFLAGS)"
- else
- CFLAGS="$SM_AARCH64CFLAGS"
- fi
- CXXFLAGS="$CFLAGS"
- export HOSTDIST BUILDDIST CFLAGS CXXFLAGS
-
- elif [ "$ARCH" = "x86_64" ]; then
- BUILDDIST="$SM_X8664BUILDDIST"
- if [ -n "$SM_DEBUG" ]; then
- CFLAGS="$(echo $SM_GCCDEBUG $SM_X8664CFLAGS)"
- else
- CFLAGS="$SM_X8664CFLAGS"
- fi
- CXXFLAGS="$CFLAGS"
- export BUILDDIST CFLAGS CXXFLAGS
-
- else
- echo "[ERROR] Sorry! '$ARCH' CPU architecture not supported by SMLinux! Aborting!"
- exit 1
- fi
-
- # Function to do a preliminary package dependency check
- checkdependencies
-
- # If $SM_NOAUTOCONFSITE is unset in an individual package build file, export CONFIG_SITE variable into the build
- # environment for a package's configure script to pickup. Most autoconf-compatible configure scripts will
- # automatically pick up this variable from the environment and speed up the initial configure process.
- if [ -z "$SM_NOAUTOCONFSITE" ] ; then
- if [ -n "$SM_CONFIGSITE" ]; then
- CONFIG_SITE="$SM_CONFIGSITE"
- if [ -e "$CONFIG_SITE" ]; then
- export CONFIG_SITE
- fi
- fi
- fi
-
- # Check if SM_VERIFYCHECKSUMS is set and enabled to 1 and determine whether to continue building or abort if checksums fail
- if [ -n "$SM_VERIFYCHECKSUMS" ] && [ "$SM_VERIFYCHECKSUMS" = "1" ] ; then
- echo "[INFO] Verifying source checksums..."
- if [ -f "$SRCDIR/$APP.CHKSUM512" ] && \
- [ -f "$SRCDIR/$APP.CHKSUM512.sig" ] ; then
- # Verify the checksum file using our tool mkchecksums
- if [ -x /bin/mkchecksums ] ; then
- /bin/mkchecksums -vv
- else
- echo "/bin/mkchecksums script not found! Aborting!"
- exit 1
- fi
- else
- echo "[ERROR] Checksum files not found! Exiting!"
- exit 1
- fi
- fi
-
- # Condition to reuse the AUTOBUILDTEMP file if set from autobuild or make a new temporary file
- if [ -n "$SM_AUTOBUILDTEMP" ]; then
- SM_TEMPFILE="$SM_AUTOBUILDTEMP"
- else
- SM_TEMPFILE="$(mktemp $SM_PARENTTMP/SMBUILD.XXXXXX)"
- fi
-
- # https://unix.stackexchange.com/questions/462392/bash-the-function-is-executed-twice
- # https://stackoverflow.com/questions/9256644/identifying-received-signal-name-in-bash/9256709
- # We use two traps to identify the signals, EXIT and INT. EXIT will invoke 'prepbuildsummary' function on any exit
- # status >= 0. The script fail status is determined by the above SM_PKGSTATUS or any premature compile failure.
- # The 'interrruptsummary' function is invoked when the user sends CTRL-C aka SIGINT. The SIGINT trap does not work
- # for auto builds, it has been added in the section build file too.
-
- trap "prepbuildsummary" EXIT
- trap "interruptsummary" INT
-
+# Then source the configuration file holding all values
+if [ -f /etc/bldpkg.conf ] ; then
+ . /etc/bldpkg.conf
+else
+ echo "/etc/bldpkg.conf not found! Aborting!"
fi
-#if [ -z $1 ] ; then
-# echo "Please provide a build file or an argument."
-# exit 1
-#else
-# source $1
-#fi
+# Create the $SM_PARENTTEMP directory. This directory is used for everything related to the build process outside
+#the source directory $SRCDIR
+mkdir -p $SM_PARENTTMP
+
+# If $SM_HTMLOUTPUT is set to 1, echo $APP, $VERSION and $BUILD as file names inside the parent build directory.
+# This will output into an HTML file so that the basic status of the build process (whether started, stopped,
+# interrupted or failed) can be viewed in the web browser.
+if [ -n "$SM_HTMLOUTPUT" ] && [ "$SM_HTMLOUTPUT" = "1" ] ; then
+ echo $APP > $SM_PARENTTMP/$APP.APP
+ echo $VERSION > $SM_PARENTTMP/$APP.VERSION
+ echo $BUILD > $SM_PARENTTMP/$APP.BUILD
+fi
+
+# Function to specifically match arrays inside a value. This function will be used later on to perform package
+# and directory matches using certain conditions. Note: "${ARRAY[@]}" =~ "${VARIABLE}" isn't fool-proof.
+inarray() {
+ local n=$1 h
+ shift
+ for h ;
+ do
+ [[ $n = "$h" ]] && return
+ done
+ return 1
+}
+
+# Time when the build commenced. Note: elapsed time is logged by the runtime function way below. This output goes
+# into package build summary.
+SM_COMMENCEDATE="$(date '+%a, %d %b %Y, %T')"
+
+if [ -n "$SM_HTMLOUTPUT" ] && [ "$SM_HTMLOUTPUT" = "1" ] ; then
+ if [ -n "$SM_AUTOBUILD" ] ; then
+ cat << EOF >> $SM_PARENTTMP/BUILDMONITOR
+$SM_COMMENCEDATE | Building package # $CURRENTPKGNUMBER / $TOTALPKGNUMBER: $APP $VERSION
+EOF
+ else
+ cat << EOF >> $SM_PARENTTMP/BUILDMONITOR
+$SM_COMMENCEDATE | Building package $APP $VERSION
+EOF
+ fi
+
+ touch $SM_PARENTTMP/BUILDING
+fi
+
+# Validate compressor and set extension
+validatecompressors
+
+# Validate tmpfs
+validatetmpfs
+
+# Validate system swap if SM_SWAPCHECK is defined and set to 1
+validateswap
+
+# Set the temporary directory for building the package. Also define package staging directory. This is where package
+# files that get "installed" go into, for example 'make install DESTDIR=$PKG' or 'DESTDIR="$PKG" ninja install'.
+
+# If SM_USETMPFS is set to 1, SM_TMPFSDIR is defined and SM_TMPFSCHECKFAILED variable is unset, determine if the
+# $APP is in the exception list and whether to build inside or outside the TMPFS directory.
+if [ "$SM_USETMPFS" = "1" ] && [ -n "$SM_TMPFSDIR" ] && \
+ [ -z "$SM_TMPFSCHECKFAILED" ] ; then
+
+ # If $APP is in the TMPFS exception list inside /etc/bldpkg.conf, compile it *OUTSIDE* the TMPFS directory, i.e
+ # the non-TMPFS directory, else compile it *INSIDE* the TMPFS directory. This if/else is solely for deciding
+ # whether $APP is in the exception list or not.
+ if inarray "${APP}" "${SM_TMPFSEXCEPTIONLIST[@]}" ; then
+
+ # We DO NOT compile inside tmpfsdir
+ SM_TMPFSENABLEDFORTHISPACKAGE=0
+
+ # In the absence of tmpfs, we use the normal directory
+ SM_TMP="$SM_NONTMPFSDIR/$APP.src"
+ PKG=${PKG:-$SM_NONTMPFSDIR/package-$APP}
+ else
+ # We compile inside tmpfsdir. Set the TMPFSENABLEDFORTHISPACKAGE variable here to inform build summary function at the bottom
+ SM_TMPFSENABLEDFORTHISPACKAGE=1
+
+ # Disable ccache
+ SM_CCACHE=0
+
+ # Override SM_PRESERVEBUILDDIR and SM_PRESERVEPACKAGEDIR to remove both build and package directories
+ SM_PRESERVEBUILDDIR=0
+ SM_PRESERVEPACKAGEDIR=0
+
+ # Get the directory from the SM_TMPFSDIR variable for extracting the source
+ SM_TMP="$SM_TMPFSDIR/$APP.src"
+ PKG=${PKG:-$SM_TMPFSDIR/package-$APP}
+ fi
+else
+ # If SM_USETMPFS is disabled, we compile in the non-TMPFS directory
+ SM_TMP="$SM_NONTMPFSDIR/$APP.src"
+ PKG=${PKG:-$SM_NONTMPFSDIR/package-$APP}
+fi
+
+
+# Validate and export $SM_CPUTHREADS as MAKEFLAGS variable
+if [ -n "$SM_CPUTHREADS" ]; then
+ # export the user-defined number
+ MAKEFLAGS="$SM_CPUTHREADS"
+ export MAKEFLAGS
+else
+ # Or fetch the number from nproc
+ MAKEFLAGS="$(nproc --all)"
+ export MAKEFLAGS
+fi
+
+# Invoke validatecompilers function
+validatecompilers
+
+# Apply CPU-specific compiler variables defined inside bldpkg.conf
+# https://github.com/sakaki-/gentoo-on-rpi-64bit/blob/master/reference/compile_run_benchmarks.sh
+# https://www.raspberrypi.org/forums/viewtopic.php?t=11629
+# noarch is set inside initfs, pkgtools, GTK themes and some other stuff.
+
+# If $ARCH has not been exported by autobuild or not set in the individual build files that have ARCH=noarch, we set our own
+# $HOSTTYPE is only set in the bash shell.
+[ -z "$ARCH" ] && ARCH="$HOSTTYPE"
+
+if [ "$ARCH" = "noarch" ]; then
+ CFLAGS=""
+ export CFLAGS
+
+elif [ "$ARCH" = "aarch64" ]; then
+ HOSTDIST="$SM_AARCH64HOSTDIST"
+ BUILDDIST="$SM_AARCH64BUILDDIST"
+ if [ -n "$SM_DEBUG" ]; then
+ CFLAGS="$(echo $SM_GCCDEBUG $SM_AARCH64CFLAGS)"
+ else
+ CFLAGS="$SM_AARCH64CFLAGS"
+ fi
+ CXXFLAGS="$CFLAGS"
+ export HOSTDIST BUILDDIST CFLAGS CXXFLAGS
+
+elif [ "$ARCH" = "x86_64" ]; then
+ BUILDDIST="$SM_X8664BUILDDIST"
+ if [ -n "$SM_DEBUG" ]; then
+ CFLAGS="$(echo $SM_GCCDEBUG $SM_X8664CFLAGS)"
+ else
+ CFLAGS="$SM_X8664CFLAGS"
+ fi
+ CXXFLAGS="$CFLAGS"
+ export BUILDDIST CFLAGS CXXFLAGS
+
+else
+ echo "[ERROR] Sorry! '$ARCH' CPU architecture not supported by SMLinux! Aborting!"
+ exit 1
+fi
+
+# Function to do a preliminary package dependency check
+checkdependencies
+
+# If $SM_NOAUTOCONFSITE is unset in an individual package build file, export CONFIG_SITE variable into the build
+# environment for a package's configure script to pickup. Most autoconf-compatible configure scripts will
+# automatically pick up this variable from the environment and speed up the initial configure process.
+if [ -z "$SM_NOAUTOCONFSITE" ] ; then
+ if [ -n "$SM_CONFIGSITE" ]; then
+ CONFIG_SITE="$SM_CONFIGSITE"
+ if [ -e "$CONFIG_SITE" ]; then
+ export CONFIG_SITE
+ fi
+ fi
+fi
+
+# Condition to reuse the AUTOBUILDTEMP file if set from autobuild or make a new temporary file
+if [ -n "$SM_AUTOBUILDTEMP" ]; then
+ SM_TEMPFILE="$SM_AUTOBUILDTEMP"
+else
+ SM_TEMPFILE="$(mktemp $SM_PARENTTMP/SMBUILD.XXXXXX)"
+fi
+
+# https://unix.stackexchange.com/questions/462392/bash-the-function-is-executed-twice
+# https://stackoverflow.com/questions/9256644/identifying-received-signal-name-in-bash/9256709
+# We use two traps to identify the signals, EXIT and INT. EXIT will invoke 'prepbuildsummary' function on any exit
+# status >= 0. The script fail status is determined by the above SM_PKGSTATUS or any premature compile failure.
+# The 'interrruptsummary' function is invoked when the user sends CTRL-C aka SIGINT. The SIGINT trap does not work
+# for auto builds, it has been added in the section build file too.
+
+trap "prepbuildsummary" EXIT
+trap "interruptsummary" INT
verifychecksums
-#build 2>&1 | tee -a "$APP".SMBuild.log.txt
build
diff --git a/bldpkg.d/genchecksum b/bldpkg.d/genchecksum
new file mode 100755
index 0000000..2605d3b
--- /dev/null
+++ b/bldpkg.d/genchecksum
@@ -0,0 +1,29 @@
+# Generate sha512sums in the build file
+genchecksum() {
+ echo "Discarding old SHA512SUMS from $SRCDIRRPATH.SMBuild"
+ sed -E -i \
+ -e '/^SHA512SUMS=".*"$/d' \
+ -e '/^SHA512SUMS="/,/"$/d' \
+ -e "/^SHA512SUMS='.*'\$/d" \
+ -e "/^SHA512sums='/,/'\$/d" \
+ "$SRCDIRRPATH".SMBuild
+
+ echo "Adding new SHA512SUMS in $SRCDIRRPATH.SMBuild..."
+ printf 'SHA512SUMS="\n' >> "$SRCDIRRPATH".SMBuild
+
+ # File types
+ FILES=( *.tar.* *.zip *.t?z *.patch *.diff *.c *.h )
+
+ # Checksum digest to be used along with arguments
+ CHECKSUMBINARY="sha512sum"
+
+ for FILE in ${FILES[@]} ; do
+ if [ -f "$FILE" ] ; then
+ $CHECKSUMBINARY $FILE >> "$SRCDIRRPATH".SMBuild
+ fi
+ done
+ printf '"' >> "$SRCDIRRPATH".SMBuild
+ echo "You may now run bldpkg again without any arguments"
+ exit 0
+}
+
diff --git a/bldpkg.d/mkandenterbuilddir b/bldpkg.d/mkandenterbuilddir
index 5137cef..b454c0b 100755
--- a/bldpkg.d/mkandenterbuilddir
+++ b/bldpkg.d/mkandenterbuilddir
@@ -1,7 +1,7 @@
# Function to remove old package directories and make new ones.
# To be invoked inside a package build file.
mkandenterbuilddir() {
- # $TMP, $PKG and $PKGDEST are set in bldpkg.conf.
+ # $TMP, $PKG and $PKGDEST are set in buildvars.conf.
PKGDOCS="$PKG/doc/$APP-$VERSION"
# Remove any old $PKG staging directory left by any previous build.
# We are about to rm -rf something, so trying a bit hard not to delete
diff --git a/bldpkg.d/promptuser b/bldpkg.d/promptuser
index 0634f5e..4e0a2ff 100755
--- a/bldpkg.d/promptuser
+++ b/bldpkg.d/promptuser
@@ -7,7 +7,7 @@ promptuser() {
while true ; do
echo
echo "[NOTIFY] '"$APP"' has been built and SM_EXTRACTPROMPT is enabled in"
- echo "[NOTIFY] bldpkg.conf file. Would you like to extract and examine contents"
+ echo "[NOTIFY] buildvars.conf file. Would you like to extract and examine contents"
echo "[NOTIFY] of its package installer in a 'test' directory within the"
echo "[NOTIFY] current source directory"
echo "[NOTIFY] ($SRCDIR) ?"
@@ -37,7 +37,7 @@ be overwritten. (y/N) " yn
echo
echo "[NOTIFY] '"$APP"' successfully built and SM_INSTALLPROMPT is \
-enabled in the bldpkg.conf file."
+enabled in the buildvars.conf file."
read -r -p "[NOTIFY] Would you like to install/upgrade it? (y/N) " yn
case $yn in
diff --git a/bldpkg.d/validatecompilers b/bldpkg.d/validatecompilers
index bef5244..da5489d 100755
--- a/bldpkg.d/validatecompilers
+++ b/bldpkg.d/validatecompilers
@@ -6,7 +6,7 @@ validatecompilers() {
if [ ! -x "$SM_DISTCCBINPATH" ]; then
echo "[ERROR] Oops! Distcc binary was not found but building with it"
echo "[ERROR] was requested! Either ensure distcc is in your "'$PATH'" or"
- echo "[ERROR] disable this option in bldpkg file. bldpkg file"
+ echo "[ERROR] disable this option in buildvars file. buildvars file"
echo "[ERROR] is located in $BUILDVARS ! Aborting!"
exit 1
fi
@@ -18,7 +18,7 @@ validatecompilers() {
elif [ ! -d "$SM_DISTCCSYMPATH" ] ; then
echo "[ERROR] $SM_DISTCCSYMPATH directory containing symlinks to distcc"
echo "[ERROR] does not exist! Kindly create it and create symlinks"
- echo "[ERROR] based on instructions in bldpkg.conf! Aborting!"
+ echo "[ERROR] based on instructions in buildvars.conf! Aborting!"
exit 1
fi
@@ -83,7 +83,7 @@ validatecompilers() {
if [ ! -x "$SM_CCACHEBINPATH" ] ; then
echo "[ERROR] Oops! ccache binary was not found but building with it"
echo "[ERROR] was requested! Either ensure ccache is in your "'$PATH'" or"
- echo "[ERROR] disable this option in bldpkg.conf. bldpkg.conf"
+ echo "[ERROR] disable this option in buildvars.conf. buildvars.conf"
echo "[ERROR] file is located in $BUILDVARS . Aborting!"
exit 1
fi
@@ -94,7 +94,7 @@ validatecompilers() {
elif [ ! -d "$SM_CCACHESYMPATH" ] ; then
echo "[ERROR] $SM_CCACHESYMPATH directory containing symlinks to ccache"
echo "[ERROR] does not exist! Kindly create it and create symlinks"
- echo "[ERROR] based on instructions in bldpkg.conf. Aborting!"
+ echo "[ERROR] based on instructions in buildvars.conf. Aborting!"
exit 1
fi
@@ -157,7 +157,7 @@ validatecompilers() {
if [ ! -x "$SM_SCCACHEBINPATH" ] ; then
echo "[ERROR] Oops! sccache binary was not found but building with it"
echo "[ERROR] was requested! Either ensure sccache is in your "'$PATH'" or"
- echo "[ERROR] disable this option in bldpkg.conf. bldpkg.conf"
+ echo "[ERROR] disable this option in buildvars.conf. buildvars.conf"
echo "[ERROR] file is located in $BUILDVARS . Aborting!"
exit 1
fi
@@ -168,7 +168,7 @@ validatecompilers() {
elif [ ! -d "$SM_SCCACHEPATH" ] ; then
echo "[ERROR] $SM_SCCACHEPATH directory containing symlinks to ccache"
echo "[ERROR] does not exist! Kindly create it and create symlinks"
- echo "[ERROR] based on instructions in bldpkg.conf. Aborting!"
+ echo "[ERROR] based on instructions in buildvars.conf. Aborting!"
exit 1
fi
diff --git a/bldpkg.d/validatecompressors b/bldpkg.d/validatecompressors
index 8ca892e..e0917c9 100755
--- a/bldpkg.d/validatecompressors
+++ b/bldpkg.d/validatecompressors
@@ -1,5 +1,5 @@
validatecompressors() {
-# Validate package extension set in bldpkg.conf
+# Validate package extension set in buildvars.conf
SM_VALIDPKGEXTENSIONS=( "tgz" "tbz" "tlz" "txz" )
if ! inarray "${PKGEXT}" "${SM_VALIDPKGEXTENSIONS[@]}" ; then
echo "[ERROR] $PKGEXT is not a valid package extension for an SMLinux"
@@ -7,7 +7,7 @@ validatecompressors() {
exit 1
fi
- # Figure out the compression tool to be used based on the $PKGEXT variable set in bldpkg.conf. At the same time,
+ # Figure out the compression tool to be used based on the $PKGEXT variable set in buildvars.conf. At the same time,
# export the compressor options set for makepkg to import from the build environment.
case "$PKGEXT" in
tgz) COMPRESSOR=gzip
diff --git a/bldpkg.d/validateswap b/bldpkg.d/validateswap
index 7744ebd..799df16 100755
--- a/bldpkg.d/validateswap
+++ b/bldpkg.d/validateswap
@@ -4,7 +4,7 @@ validateswap() {
if inarray "${APP}" "${SM_PACKAGESREQUIRINGSWAP[@]}" ; then
# Here we determine available system swap size needed to compile exceptional packages that pull in a lot of RAM.
- # Those packages are listed under the SM_PACKAGESREQUIRINGSWAP array in /etc/bldpkg.conf. Check whether swap
+ # Those packages are listed under the SM_PACKAGESREQUIRINGSWAP array in /etc/buildvars.conf. Check whether swap
#is available on the system and if it is, determine its size. If its size is >= SM_SWAPSIZE, we are all good.
#If it's less than SM_SWAPSIZE, we exit with a status 1.