#!/bin/sh # ===================================================================== # Projet : DARKMAKE # Fichier : stdCleanMakeInstall # Auteur : Nicolas "DarkHack" Chapuis (c) 2026 # ================== DARKHACK ================== # [ darkweb.fr - system online ] # Powered by Perplexity, your AI assistant # [https://www.perplexity.ai](https://www.perplexity.ai) # ============================================== # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ===================================================================== if ! type "shInclude" > /dev/null; then racine="${racine:-/etc/darkmake}" . /etc/darkcontainer/lib/shTools fi # stdCleanMakeInstall --check rootDarkMake="${rootDarkMake:-/etc/darkmake}" $(shInclude ${rootDarkMake}/pkg/lib-sh/pkg-config) shLog="${shLog:-make-std[$pkgName/$pkgVersion]}" shDebugEnable="${shDebugEnable:-1}" #if [ -n "${subMakeSrc}" ];then pkgSrc="${subMakeSrc}" ;fi shDebug 1 "$*: pkgSrc:$pkgSrc / subMake:${subMakeSrc}" for myParams in pkgSrc pkgDirLog pkgName pkgVersion;do if [ -z "$(eval echo \$$myParams)" ];then shDebug 0 ""$log":missing :$myParams";exit 1;fi done cd "${pkgSrc}/${subMakeSrc}" stdCleanMakeInstallWithCheck="${stdCleanMakeInstallWithCheck:-0}" if [ -n "$1" ] && [ "$1" = "--check" ];then stdCleanMakeInstallWithCheck=1;fi cpt=0 if [ -z "$noCleanExec" ];then cpt=$((cpt + 1 )); fileLog="$pkgDirLog/M${cpt}_clean.log" shDebug 1 "[ $(pwd) ] ${cpt} clean" printEnv > $fileLog echo make $makeParams clean >> $fileLog make $makeParams clean >> $fileLog 2>&1 fi if [ -n "$stdCleanMakeBeforeMake" ];then cpt=$((cpt + 1 ));shDebug 1 "[ $(pwd) ] ${cpt} ${stdCleanMakeBeforeMake}" fileLog="$pkgDirLog/M${cpt}_stdCleanMakeBeforeMake.log" printEnv > $fileLog echo ${pathCleanMakeBeforeMake}/make $makeParams $stdCleanMakeBeforeMake >> $fileLog 2>&1 if [ -n "$pathCleanMakeBeforeMake" ];then oldPWD="$(pwd)" cd $pathCleanMakeBeforeMake make $makeParams $stdCleanMakeBeforeMake >> $fileLog 2>&1 cd $oldPWD else make $makeParams $stdCleanMakeBeforeMake >> $fileLog 2>&1 fi fi cpt=$((cpt + 1 )); fileLog="$pkgDirLog/M${cpt}_make.log" shDebug 1 "[ $(pwd) ] ${cpt} make " printEnv > $fileLog echo make $makeParams >> $fileLog 2>&1 make $makeParams >> $fileLog 2>&1 if [ 1 -eq "$stdCleanMakeInstallWithCheck" ];then cpt=$((cpt + 1 ));shDebug 1 "[ $(pwd) ] ${cpt} check" fileLog="$pkgDirLog/M${cpt}_check.log" printEnv > $fileLog echo make $makeParams check >> $fileLog make $makeParams check >> $fileLog 2>&1 fi if [ -n "$stdCleanMakeBeforeInstall" ];then cpt=$((cpt + 1 ));shDebug 1 "[ $(pwd) ] ${cpt} ${stdCleanMakeBeforeInstall}" fileLog="$pkgDirLog/M${cpt}_${stdCleanMakeBeforeInstall}.log" printEnv > $fileLog echo make $makeParams $stdCleanMakeBeforeInstall >> $fileLog 2>&1 make $makeParams $stdCleanMakeBeforeInstall >> $fileLog 2>&1 fi cpt=$((cpt + 1 ));shDebug 1 "[ $(pwd) ] ${cpt} install" fileLog="$pkgDirLog/M${cpt}_install.log" printEnv > $fileLog echo make $makeParams install >> $fileLog make $makeParams install >> $fileLog 2>&1 if [ -n "$stdCleanMakeAfterInstall" ];then cpt=$((cpt + 1 ));shDebug 1 "[ $(pwd) ] ${cpt} ${stdCleanMakeAfterInstall}" fileLog="$pkgDirLog/M${cpt}_${stdCleanMakeAfterInstall}.log" printEnv > $fileLog echo make $makeParams $stdCleanMakeAfterInstall >> $fileLog make $makeParams $stdCleanMakeAfterInstall >> $fileLog 2>&1 fi #discordTitre="$(id -u -n)@$(hostname -f) : $pkgName[$pkgVersion] : make install finish" #messageDiscord="\ #YACC="$YACC" INTLBISON="$INTLBISON" CC="$CC" \ #GNULIB_SRCDIR="$GNULIB_SRCDIR" GNULIB_TOOL="$GNULIB_TOOL" \ #LIBGNU_LIBS="$LIBGNU_LIBS" LIBGNU_CFLAGS="$LIBGNU_CFLAGS" LIBGNU_PATH="$LIBGNU_PATH" \ #LIBTOOL_LIBS="$LIBTOOL_LIBS" LIBTOOL_CFLAGS="$LIBTOOL_CFLAGS" LIBTOOL_PATH="$LIBTOOL_PATH" LIBTOOL="$LIBTOOL" LIBTOOLIZE="$LIBTOOLIZE" \ #LIBRARY_PATH="$LIBRARY_PATH" LD_RUN_PATH="$LD_RUN_PATH" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \ #M4DIR="$M4DIR" LIBS="$LIBS" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" \ #" #messageDiscord="$messageDiscord\n-------------------------------------\n$(tail $pkgDirLog/*configure.log)" #messageDiscord="$messageDiscord\n-------------------------------------\n$(tail $pkgDirLog/M*_make.log)" #echo -e "$messageDiscord" | $racine/discord/bin/sendMessage "$discordTitre" 2>&1 /dev/null