Removed llvm-runtimes from tmpfsexceptionlist array, added scanelf to rqfiles array in bldpkg.conf
Discarded log script Added several fixes and build system checks to mksm
This commit is contained in:
parent
308652e8f6
commit
5f5313c63d
3 changed files with 26 additions and 22 deletions
|
@ -152,7 +152,7 @@ checkdependencies=0
|
||||||
tmpfsexceptionlist=( mozjs nodejs firefox wxwidgets palemoon qemu dovecot gdb gnumeric \
|
tmpfsexceptionlist=( mozjs nodejs firefox wxwidgets palemoon qemu dovecot gdb gnumeric \
|
||||||
gtk+2 gtk+3 guile llvm mariadb mesa mesa-demos mupdf perl postfix python2 \
|
gtk+2 gtk+3 guile llvm mariadb mesa mesa-demos mupdf perl postfix python2 \
|
||||||
python3 rtorrent spice python-lxml kernel libreoffice mono \
|
python3 rtorrent spice python-lxml kernel libreoffice mono \
|
||||||
qtwebengine kernel-source rust webkitgtk boost go llvm-runtimes )
|
qtwebengine kernel-source rust webkitgtk boost go )
|
||||||
|
|
||||||
# This array lists the packages which require additional swap for
|
# This array lists the packages which require additional swap for
|
||||||
# compilation to prevent the system from becoming completely unresponsive
|
# compilation to prevent the system from becoming completely unresponsive
|
||||||
|
@ -174,7 +174,7 @@ protecteddirectories=( "/" "/bin" "/boot" "/dev" "/etc" "/home" "/include" \
|
||||||
rqfiles=( installpkg upgradepkg sha512sum patch find findmnt patch tput bc tar \
|
rqfiles=( installpkg upgradepkg sha512sum patch find findmnt patch tput bc tar \
|
||||||
addr2line ar as c++ c++filt cc cpp elfedit g++ gcc gcc-ar gcc-nm gcc-ranlib gcov \
|
addr2line ar as c++ c++filt cc cpp elfedit g++ gcc gcc-ar gcc-nm gcc-ranlib gcov \
|
||||||
gcov-tool getconf gprof iconv ld ld.bfd nm objcopy objdump ranlib readelf size \
|
gcov-tool getconf gprof iconv ld ld.bfd nm objcopy objdump ranlib readelf size \
|
||||||
strings strip )
|
strings strip scanelf )
|
||||||
|
|
||||||
|
|
||||||
# Whether to output application build status in HTML format. Set 1 to enable,
|
# Whether to output application build status in HTML format. Set 1 to enable,
|
||||||
|
|
11
log
11
log
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Wrapper to redirect build output of an individual <package>.SMBuild to a log file
|
|
||||||
|
|
||||||
# Disable colours in the build summary. It looks nice in the terminal but not so good inside the actual build log.
|
|
||||||
SM_COLOURS=0
|
|
||||||
export SM_COLOURS
|
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
exec "$1" 2>&1 | tee -a "$1".buildlog
|
|
||||||
break
|
|
||||||
done
|
|
33
mksm
33
mksm
|
@ -2,7 +2,7 @@
|
||||||
# Part of SMLinux distribution
|
# Part of SMLinux distribution
|
||||||
# Package build file generator
|
# Package build file generator
|
||||||
|
|
||||||
# Copyright (c) 2022 PktSurf <smlinux@pktsurf.in>
|
# Copyright (c) 2022-2023 PktSurf <smlinux@pktsurf.in>
|
||||||
|
|
||||||
# Permission to use, copy, modify, and distribute this software for any
|
# Permission to use, copy, modify, and distribute this software for any
|
||||||
# purpose with or without fee is hereby granted, provided that the above
|
# purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -19,6 +19,8 @@
|
||||||
# Abort on any error
|
# Abort on any error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
mksmversion="0.100"
|
||||||
|
|
||||||
# Date format
|
# Date format
|
||||||
filedate="$(date +%Y%m%d%H%M%S)"
|
filedate="$(date +%Y%m%d%H%M%S)"
|
||||||
|
|
||||||
|
@ -82,7 +84,6 @@ gensha512sums() {
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
printf '"' >> "$appname".SMBuild
|
printf '"' >> "$appname".SMBuild
|
||||||
exit 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ':a:b:v:h' option; do
|
while getopts ':a:b:v:h' option; do
|
||||||
|
@ -101,7 +102,6 @@ if [[ $OPTIND = 1 ]] ; then
|
||||||
mkusage
|
mkusage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Show errors and exit if either of these is not set
|
# Show errors and exit if either of these is not set
|
||||||
if [[ -z $envappname ]] ; then
|
if [[ -z $envappname ]] ; then
|
||||||
echo "[ERROR] Application name not provided. Please provide one."
|
echo "[ERROR] Application name not provided. Please provide one."
|
||||||
|
@ -124,9 +124,10 @@ fi
|
||||||
appname="$envappname"
|
appname="$envappname"
|
||||||
version="$envversion"
|
version="$envversion"
|
||||||
|
|
||||||
buildfile="$currentdir/$appname.SMBuild"
|
buildfile="$appname.SMBuild"
|
||||||
|
|
||||||
# Use case/esac to determine the value of envbuildsys supplied to us. If it isn't what's expected, throw an error and exit.
|
# Use case/esac to determine the value of envbuildsys supplied to us. If it isn't what's expected,
|
||||||
|
# throw an error and exit.
|
||||||
case "$envbuildsys" in
|
case "$envbuildsys" in
|
||||||
"autoconf"|"make"|"cmake"|"meson"|"guess")
|
"autoconf"|"make"|"cmake"|"meson"|"guess")
|
||||||
buildsys="$envbuildsys" ;;
|
buildsys="$envbuildsys" ;;
|
||||||
|
@ -136,8 +137,7 @@ esac
|
||||||
gen_autoconf() {
|
gen_autoconf() {
|
||||||
cat << 'EOF' >> $buildfile
|
cat << 'EOF' >> $buildfile
|
||||||
./configure \
|
./configure \
|
||||||
--prefix="" \
|
--prefix=""
|
||||||
--sysconfdir=/etc
|
|
||||||
|
|
||||||
make
|
make
|
||||||
make install DESTDIR=$pkg
|
make install DESTDIR=$pkg
|
||||||
|
@ -215,6 +215,12 @@ gen_guess() {
|
||||||
elif [[ -f Makefile ]] ; then
|
elif [[ -f Makefile ]] ; then
|
||||||
echo "Looks like simple Makefile..."
|
echo "Looks like simple Makefile..."
|
||||||
gen_make
|
gen_make
|
||||||
|
elif [[ -f CMakeLists.txt ]] ; then
|
||||||
|
echo "Looks like a cmake system..."
|
||||||
|
gen_cmake
|
||||||
|
elif [[ -f meson.build ]] && [[ -f meson_options.txt ]] ; then
|
||||||
|
echo "Looks like meson build system..."
|
||||||
|
gen_meson
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Non-standard directory. Perhaps you might want to provide a definitive build system"
|
echo "Non-standard directory. Perhaps you might want to provide a definitive build system"
|
||||||
|
@ -233,7 +239,7 @@ echo ""
|
||||||
# Copy the sample build file based on the build system argument passed
|
# Copy the sample build file based on the build system argument passed
|
||||||
if [[ -f $buildfile ]] ; then
|
if [[ -f $buildfile ]] ; then
|
||||||
echo "[INFO] Found an existing $appname.SMBuild in the current directory."
|
echo "[INFO] Found an existing $appname.SMBuild in the current directory."
|
||||||
echo "[INFO] Backing it up inside a directory 'old' and creating a new one here."
|
echo "[INFO] Backing it up inside a directory 'old' as '"$buildfile.$filedate"' and creating a new one here."
|
||||||
mkdir -p old
|
mkdir -p old
|
||||||
mv "$buildfile" old/"$buildfile.$filedate"
|
mv "$buildfile" old/"$buildfile.$filedate"
|
||||||
fi
|
fi
|
||||||
|
@ -242,6 +248,8 @@ fi
|
||||||
# https://unix.stackexchange.com/questions/505949/expanding-only-certain-variables-inside-a-heredoc
|
# https://unix.stackexchange.com/questions/505949/expanding-only-certain-variables-inside-a-heredoc
|
||||||
# Expand variables in this heredoc
|
# Expand variables in this heredoc
|
||||||
cat << EOF > $buildfile
|
cat << EOF > $buildfile
|
||||||
|
# Maintainer: PktSurf <smlinux@pktsurf.in>
|
||||||
|
# Generated by mksm SMLinux build file generator version $mksmversion
|
||||||
app=$appname
|
app=$appname
|
||||||
version=$version
|
version=$version
|
||||||
build=1sml
|
build=1sml
|
||||||
|
@ -254,14 +262,16 @@ EOF
|
||||||
# Single-quoted 'EOF' prevents variables from being expanded in this heredoc
|
# Single-quoted 'EOF' prevents variables from being expanded in this heredoc
|
||||||
cat << 'EOF' >> $buildfile
|
cat << 'EOF' >> $buildfile
|
||||||
|
|
||||||
build() {
|
prepbuilddir() {
|
||||||
mkandenterbuilddir
|
mkandenterbuilddir
|
||||||
rm -rf $app-$version
|
rm -rf $app-$version
|
||||||
|
|
||||||
tar xf $srcdir/$app-$version.tar.?z*
|
tar xf $srcdir/$app-$version.tar.?z*
|
||||||
cd $app-$version
|
cd $app-$version
|
||||||
fixbuilddirpermissions
|
fixbuilddirpermissions
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
case "$buildsys" in
|
case "$buildsys" in
|
||||||
|
@ -278,3 +288,8 @@ echo ""
|
||||||
|
|
||||||
# Generate SHA512 checksums and exit
|
# Generate SHA512 checksums and exit
|
||||||
gensha512sums
|
gensha512sums
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "'$buildfile' has been generated successfully."
|
||||||
|
echo "It is *STRONGLY RECOMMENDED* that you view '$buildfile'"
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue