#!/bin/sh # ===================================================================== # Projet : DARKMAKE # Fichier : compile # 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. # ===================================================================== rootDarkMake="${rootDarkMake:-/etc/darkmake}" if ! type "shInclude" > /dev/null; then . /etc/darksh/lib/shTools shLog="${shLog:-"lib lsh install"}" shDebugEnable="${shDebugEnable:-1}" shDebug "$*" rootDarkMake="${rootDarkMake:-/etc/darkmake}" $(shInclude ${rootDarkMake}/pkg/lib-sh/pkg-config) fi autoPath="lib/crypto/lsh" shErrorOnMissing "autoPath" path_install_vars="${rootDarkMake}/${autoPath}/global/install_vars" \ . "${rootDarkMake}/pkg/bin/checks" shLog="[ $pkgName/$pkgVersion ]" myPkgDirLog="${pkgDirLog}" mkdir "${pkgDirLog}/initlibtool" pkgSrc="$pkgSrc" pkgDirLog="${pkgDirLog}/initlibtool" filesToInit="$( pkgSrc="${pkgSrc}" findConfigures )" \ . "${rootDarkMake}/lib/autotools/libtool/install/init" pkgDirLog="${myPkgDirLog}" if [ ! -f "${pkgSrc}/.darkPatch" ];then touch "${pkgSrc}/.darkPatch" # for dirBS in . src/spki src/sftp src/argp;do # file="${pkgSrc}/${dirBS}/configure.ac" for file in $( find ${pkgSrc} | grep configure.ac );do sed -i "s/AC_CONFIG_HEADER.*/AC_CONFIG_HEADER([config.h])\nAC_CONFIG_MACRO_DIRS([m4])/g" "${file}" sed -i "s/AC_PROG_RANLIB/LT_INIT/g" "${file}" done # # ================= ADD AC_CONFIG_MACRO_DIRS([m4]) # for file in $( find ${pkgSrc} | grep configure.ac );do # sed -i "s/AC_CONFIG_HEADER.*/AC_CONFIG_HEADER([config.h])\nAC_CONFIG_MACRO_DIRS([m4])/g" "${file}" # sed -i "s/AC_PROG_RANLIB/LT_INIT/g" "${file}" # done for file in ${pkgSrc}/.bootstrap $( find ${pkgSrc} | grep .bootstrap | grep -v "${pkgSrc}/.bootstrap" );do #for dirBS in . src/spki src/sftp src/argp;do dirBS="$(echo $file | rev | cut -f2- -d/ | rev)" cd $dirBS; [ ! -d "m4" ] && mkdir "m4" echo == ${dirBS} :sh .bootstrap >> $pkgDirLog/XX_bootstrap.log sh .bootstrap >> $pkgDirLog/XX_bootstrap.log 2>&1 [ -f "configure" ] && rm "configure" done # file="${pkgSrc}/src/spki/Makefile.in" # subReg1="s\/const char\/register const char\/g" # subReg2="s\/unsigned int\/register size_t\/g" # echo sed -i "s/\$(srcdir)\/spki\-gperf.hT \$(srcdir)\/spki\-gperf.h/\$(srcdir)\/spki\-gperf.hT \$(srcdir)\/spki\-gperf.h \&\& sed \-i \'${subReg1}\' \"\$(srcdir)\/parse.c\" \&\& sed \-i \'${subReg2}\' \"\$(srcdir)\/parse.c\"/g" "${file}" > $pkgDirLog/XX_sed.log 2>&1 # sed -i "s/\$(srcdir)\/spki\-gperf.hT \$(srcdir)\/spki\-gperf.h/\$(srcdir)\/spki\-gperf.hT \$(srcdir)\/spki\-gperf.h \&\& sed \-i \'${subReg1}\' \$(srcdir)\/parse.c \&\& sed \-i \'${subReg2}\' \$(srcdir)\/parse.c/g" "${file}" >> $pkgDirLog/XX_sed.log 2>&1 [ ! -d "${pkgDirLog}/bootstrap" ] && mkdir "${pkgDirLog}/bootstrap" extraConfigure="" pkgDirLog="${pkgDirLog}/bootstrap" stdCleanMakeBeforeMake="bootstrap" \ . ${rootDarkMake}/lib/autotools/libtool/install/basics pkgDirLog="${myPkgDirLog}" for file in "${pkgSrc}/src/spki/parse.c" "${pkgSrc}/src/atoms.c";do echo sed -i 's/const char \*str/register const char \*str/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 sed -i 's/const char \*str/register const char \*str/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 echo sed -i 's/unsigned int/register size_t/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 sed -i 's/unsigned int/register size_t/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 done for file in "${pkgSrc}/src/spki/spki-gperf.h" "${pkgSrc}/src/atoms_gperf.c";do echo sed -i 's/unsigned int len/size_t len/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 sed -i 's/unsigned int len/size_t len/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 done # file="${pkgSrc}/src/atoms.c" # echo sed -i 's/unsigned int/register unsigned int/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 # sed -i 's/unsigned int/register unsigned int/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 # file="${pkgSrc}/src/spki/spki-gperf.h" # echo sed -i 's/register const/const/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 # sed -i 's/register const/const/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 # echo sed -i 's/register size_t/unsigned int/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 # sed -i 's/register size_t/unsigned int/g' "${file}" >> $pkgDirLog/XX_sed.log 2>&1 fi myPkgDirLog="${pkgDirLog}" mkdir "$pkgDirLog/basics" extraConfigure="" pkgDirLog="${pkgDirLog}/basics" stdCleanMakeBeforeMake="" \ . ${rootDarkMake}/lib/autotools/libtool/install/basics