pthbs

Packaging Through Hashed Build Scripts
git clone https://ccx.te2000.cz/git/pthbs
Log | Files | Refs | Submodules | README

commit 3382047b27f8d5f9cdd00c38cfb2be8ecdf4c952
parent f0eeceb69ac6be60b7ba845c5dba9c9e40eb966a
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Mon, 12 Jun 2023 09:25:57 +0200

Use strings from mcm instead of busybox

Diffstat:
Mcommand/pthbs-build | 9+++++----
Mcommand/pthbs-link | 2+-
Mfiles/busybox.config.1_12_0-8342-gaa4d303a3 | 4++--
Mfiles/update-links | 2+-
Mpackages/busybox | 8++++----
Mpackages/busybox:bootstrap | 6+++---
Mpackages/default.environment | 8++++----
Apackages/execline | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpackages/gnu-make | 8++++----
Mpackages/gnu-make:bootstrap | 2+-
Mpackages/musl-cross-make | 10+++++-----
Mpackages/musl-cross-make:bootstrap | 4++--
Apackages/skalibs | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtemplates/pkg/busybox | 2+-
Mtemplates/pkg/busybox:bootstrap | 2+-
Atemplates/pkg/execline | 32++++++++++++++++++++++++++++++++
Mtemplates/pkg/gnu-make | 2+-
Mtemplates/pkg/musl-cross-make | 4++--
Mtemplates/pkg/musl-cross-make:bootstrap | 4++--
Atemplates/pkg/skalibs | 31+++++++++++++++++++++++++++++++
Mvars.yaml | 1+
21 files changed, 230 insertions(+), 38 deletions(-)

diff --git a/command/pthbs-build b/command/pthbs-build @@ -1,5 +1,4 @@ #!/bin/sh -set -x bsh=$(sha256sum $1) || exit $? bsh=${bsh%% *} basedir=$(dirname "$(dirname "$(realpath "$0")")") @@ -93,12 +92,12 @@ function at_filehash(hash_type, file_hash, dst, dstdir){ fatal("Sandboxing not supported yet") } if(length(ENVIRON["envdir"])){ - printf "exec env" + printf "exec >build.log 2>&1 env" printf " %s", "pthbs_build_environment="q(ENVIRON["envdir"]) printf " %s", "PATH="q(ENVIRON["envdir"]"/command") print " "q(ENVIRON["envdir"]"/command/sh")" -xe "q(ENVIRON["script"]) } else { - print "exec sh -xe "q(ENVIRON["script"]) + print "exec >build.log 2>&1 sh -xe "q(ENVIRON["script"]) } exit 0 } @@ -106,7 +105,6 @@ function at_filehash(hash_type, file_hash, dst, dstdir){ fatal("unexpected line") } ' "$1" || exit $? -cat "$workdir/pthbs-setup" JOBS=$(nproc) if test -z "$JOBS"; then @@ -116,6 +114,8 @@ if test -z "$JOBS"; then fi fi +set -x + ret=0 if env -i \ PATH="$PATH" \ @@ -131,6 +131,7 @@ if env -i \ fi else ret=$? + grep -C 1 -Eie '(error|fatal)[: ]' "$workdir/build.log" echo "BUILD FAILED: exitcode $ret" fi if test -z "$pthbs_skip_cleanup"; then diff --git a/command/pthbs-link b/command/pthbs-link @@ -1,5 +1,4 @@ #!/bin/sh -e -set -x test -d "$1" || exit 1 test -d "$2" || exit 1 while IFS= read -r line; do @@ -9,6 +8,7 @@ while IFS= read -r line; do source=$2/${source#./} if test -e "$source"; then printf >&2 'FATAL: link source already exists: "%s"\n' "$source" + ls >&2 -l "$source" exit 1 fi if ! test -e "$target"; then diff --git a/files/busybox.config.1_12_0-8342-gaa4d303a3 b/files/busybox.config.1_12_0-8342-gaa4d303a3 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Busybox version: 1.37.0.git -# Fri May 26 22:44:46 2023 +# Mon Jun 12 09:01:47 2023 # CONFIG_HAVE_DOT_CONFIG=y @@ -843,7 +843,7 @@ CONFIG_RX=y CONFIG_SEEDRNG=y CONFIG_SETFATTR=y CONFIG_SETSERIAL=y -CONFIG_STRINGS=y +# CONFIG_STRINGS is not set CONFIG_TIME=y CONFIG_TREE=y CONFIG_TS=y diff --git a/files/update-links b/files/update-links @@ -4,7 +4,7 @@ cd $0:h || exit $? rm -r by-sha256 || exit $? mkdir -p by-sha256 || exit $? cd by-sha256 || exit $? -for f in ../*(.) ../../downloads/*(.); do +for f in ../*(.) ../../downloads/**/*(.); do h=${"$(sha256sum $f)"%% *} || exit $? ln -sTf $f $h || exit $? done diff --git a/packages/busybox b/packages/busybox @@ -1,10 +1,10 @@ #!/usr/bin/env pthbs-build #+* -#+musl-cross-make.0c34944f6aaa875c811406c587d7e32a12d9a2b16e7f7a69249b3b655537ebe6 -#+gnu-make.8adc5ec248e696c713183be588c6363e2c960bbd9b34aac5f1f7564195c106d7 -#+busybox.39594113db28f1087f7a4d9e69441a63a5f7d5c19c67e1574ed2c7b3c18e8c54 +#+musl-cross-make.08f954c641071a5d963fcc8682e665130ae8abd6db11fdc393eb8b9da2bb2b73 +#+gnu-make.f0dc017413c19c171fb65e49e6000bcf8a5b1f6ca41c2de5f1ce75613dfc99d7 +#+busybox.cb0f7e8efa47c4d664466dca02b13dfc776aa20f910940e3db2c11fab573de21 #@git:aa4d303a3139107919f73cece4eaf85a7dc75db6:busybox -#@sha256:e653a2f29743ec8f96d68f62c4db7c76db5ff769ec9e7cd6671397c7cc2b942f:busybox/.config +#@sha256:9ee52091d7a41e7e492d508574573fbebe64155d85a07980128f21105eaad1e2:busybox/.config : ${JOBS:=1} diff --git a/packages/busybox:bootstrap b/packages/busybox:bootstrap @@ -1,11 +1,11 @@ #!/usr/bin/env pthbs-build #+* #@git:aa4d303a3139107919f73cece4eaf85a7dc75db6:busybox -#@sha256:e653a2f29743ec8f96d68f62c4db7c76db5ff769ec9e7cd6671397c7cc2b942f:busybox/.config +#@sha256:9ee52091d7a41e7e492d508574573fbebe64155d85a07980128f21105eaad1e2:busybox/.config : ${JOBS:=1} -mcm=/home/ccx/versions/musl-cross-make.0c34944f6aaa875c811406c587d7e32a12d9a2b16e7f7a69249b3b655537ebe6 -make=/home/ccx/versions/gnu-make.8adc5ec248e696c713183be588c6363e2c960bbd9b34aac5f1f7564195c106d7 +mcm=/home/ccx/versions/musl-cross-make.08f954c641071a5d963fcc8682e665130ae8abd6db11fdc393eb8b9da2bb2b73 +make=/home/ccx/versions/gnu-make.f0dc017413c19c171fb65e49e6000bcf8a5b1f6ca41c2de5f1ce75613dfc99d7 export PATH="$mcm/bin:$make/bin:$PATH" export CC="$mcm/bin/x86_64-linux-musl-gcc" diff --git a/packages/default.environment b/packages/default.environment @@ -1,3 +1,3 @@ -#+busybox.82e5186befcbaf4d3f895e2707ce9a01c71c416466243c48c190af4a23d99fd5 -#+gnu-make.5f616652125767423ce6e04597e03f0a217ca08efa0537614e59636ab046791a -#+musl-cross-make.afda8ae3d5b53401a13c33781ffa3a737d58407dca5eb70a6a987a28ab458663- \ No newline at end of file +#+busybox.7773924256c334554e91672fed0cafa9473790a68a66a201e1a18d8e9dc9df73 +#+gnu-make.f4655ef83082b2a48522eee1f1a3c769f7227847e26751dae3aaa08f100b04b9 +#+musl-cross-make.d6361f262190473eca514ebced40aca986604594daf4439e22c4ee2442a89859+ \ No newline at end of file diff --git a/packages/execline b/packages/execline @@ -0,0 +1,64 @@ +#!/usr/bin/env pthbs-build +#+* +#+musl-cross-make.d6361f262190473eca514ebced40aca986604594daf4439e22c4ee2442a89859 +#+gnu-make.f4655ef83082b2a48522eee1f1a3c769f7227847e26751dae3aaa08f100b04b9 +#+busybox.7773924256c334554e91672fed0cafa9473790a68a66a201e1a18d8e9dc9df73 +#+skalibs.2c836a6e4bd9a14dc557c3a744560a8bc420666cfa810c00a5bb21d9a9148bd2 + +: ${JOBS:=1} + +export CC="$pthbs_build_environment/command/x86_64-linux-musl-gcc" +export CXX="$pthbs_build_environment/command/x86_64-linux-musl-g++" +export LD="$pthbs_build_environment/command/x86_64-linux-musl-ld" +export AR="$pthbs_build_environment/command/x86_64-linux-musl-ar" + +prefix=/home/ccx/versions/$pthbs_package +cd execline +./configure \ + --prefix="$prefix" \ + --sysdepdir="${prefix}/sysdeps" \ + --binprefix="${prefix}/command" \ + --extbinprefix="${prefix}/command" \ + --dynlibdir="${prefix}/library.so" \ + --libdir="${prefix}/library" \ + --includedir="${prefix}/include" \ + --disable-shared --enable-static --enable-allstatic --enable-static-libc + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) +make DESTDIR="$pthbs_destdir" install + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src +} +$1!="."{exit 1} + + +$2 == "share" && $3 ~ /^(info|man)$/ { link(r1($0)); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "include" { link($0); next } +$2 == "lib" { link($0); next } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + exit 3 + } + } +}' >.install-links.new +mv .install-links.new .install-links diff --git a/packages/gnu-make b/packages/gnu-make @@ -1,8 +1,8 @@ #!/usr/bin/env pthbs-build #+* -#+musl-cross-make.0c34944f6aaa875c811406c587d7e32a12d9a2b16e7f7a69249b3b655537ebe6 -#+gnu-make.8adc5ec248e696c713183be588c6363e2c960bbd9b34aac5f1f7564195c106d7 -#+busybox.39594113db28f1087f7a4d9e69441a63a5f7d5c19c67e1574ed2c7b3c18e8c54 +#+musl-cross-make.08f954c641071a5d963fcc8682e665130ae8abd6db11fdc393eb8b9da2bb2b73 +#+gnu-make.f0dc017413c19c171fb65e49e6000bcf8a5b1f6ca41c2de5f1ce75613dfc99d7 +#+busybox.cb0f7e8efa47c4d664466dca02b13dfc776aa20f910940e3db2c11fab573de21 #@untar:-vz:sha256:dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3:. : ${JOBS:=1} @@ -17,7 +17,7 @@ export LDFLAGS="-static" cd make-4.4.1 ./configure -C --prefix="/home/ccx/versions/$pthbs_package" --build="$($CC -dumpmachine)" --disable-nls -make -j$JOBS -l$(1+JOBS) +make -j${JOBS:-1} -l$((1+${JOBS:-1})) make DESTDIR="$pthbs_destdir" install-strip cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" diff --git a/packages/gnu-make:bootstrap b/packages/gnu-make:bootstrap @@ -3,7 +3,7 @@ #@untar:-vz:sha256:dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3:. : ${JOBS:=1} -mcm=/home/ccx/versions/musl-cross-make.0c34944f6aaa875c811406c587d7e32a12d9a2b16e7f7a69249b3b655537ebe6 +mcm=/home/ccx/versions/musl-cross-make.08f954c641071a5d963fcc8682e665130ae8abd6db11fdc393eb8b9da2bb2b73 export PATH="$mcm/bin:$PATH" export CC="$mcm/bin/x86_64-linux-musl-gcc" diff --git a/packages/musl-cross-make b/packages/musl-cross-make @@ -1,8 +1,8 @@ #!/usr/bin/env pthbs-build #+* -#+musl-cross-make.0c34944f6aaa875c811406c587d7e32a12d9a2b16e7f7a69249b3b655537ebe6 -#+gnu-make.8adc5ec248e696c713183be588c6363e2c960bbd9b34aac5f1f7564195c106d7 -#+busybox.39594113db28f1087f7a4d9e69441a63a5f7d5c19c67e1574ed2c7b3c18e8c54 +#+musl-cross-make.08f954c641071a5d963fcc8682e665130ae8abd6db11fdc393eb8b9da2bb2b73 +#+gnu-make.f0dc017413c19c171fb65e49e6000bcf8a5b1f6ca41c2de5f1ce75613dfc99d7 +#+busybox.cb0f7e8efa47c4d664466dca02b13dfc776aa20f910940e3db2c11fab573de21 #@git:fe915821b652a7fa37b34a596f47d8e20bc72338:musl-cross-make #@sha256:ab66fc2d1c3ec0359b8e08843c9f33b63e8707efdff5e4cc5c200eae24722cbf:musl-cross-make/sources/binutils-2.33.1.tar.xz #@sha256:75d5d255a2a273b6e651f82eecfabf6cbcd8eaeae70e86b417384c8f4a58d8d3:musl-cross-make/sources/config.sub @@ -19,7 +19,7 @@ export HOSTCC="$pthbs_build_environment/command/x86_64-linux-musl-gcc" printf '%s\n' >musl-cross-make/config.mak "OUTPUT=${pthbs_destdir%/}/home/ccx/versions/$pthbs_package" "TARGET=x86_64-linux-musl" touch musl-cross-make/sources/* -make -C musl-cross-make -j$JOBS -l$((1+$JOBS)) || exit $? +make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make || exit $? make -C musl-cross-make install || exit $? cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" @@ -44,7 +44,7 @@ function link(src) { $1!="."{exit 1} -$2 == "bin" && $3 ~ /^x86_64-linux-musl-/ { target=$3; sub("x86_64-linux-musl-","",s); link("./command/" target) } +$2 == "bin" && $3 ~ /^x86_64-linux-musl-/ { target=$3; sub("x86_64-linux-musl-", "", target); link("./command/" target) } $2 == "share" && $3 ~ /^(info|man)$/ { link(r1($0)); next } $2 == "bin" { link(s1("command", $0)); next } $2 == "include" { link($0); next } diff --git a/packages/musl-cross-make:bootstrap b/packages/musl-cross-make:bootstrap @@ -13,7 +13,7 @@ : ${JOBS:=1} printf '%s\n' >musl-cross-make/config.mak "OUTPUT=${pthbs_destdir%/}/home/ccx/versions/$pthbs_package" "TARGET=x86_64-linux-musl" touch musl-cross-make/sources/* -make -C musl-cross-make -j$JOBS -l$((1+$JOBS)) || exit $? +make -j${JOBS:-1} -l$((1+${JOBS:-1})) -C musl-cross-make || exit $? make -C musl-cross-make install || exit $? cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" @@ -38,7 +38,7 @@ function link(src) { $1!="."{exit 1} -$2 == "bin" && $3 ~ /^x86_64-linux-musl-/ { target=$3; sub("x86_64-linux-musl-","",s); link("./command/" target) } +$2 == "bin" && $3 ~ /^x86_64-linux-musl-/ { target=$3; sub("x86_64-linux-musl-", "", target); link("./command/" target) } $2 == "share" && $3 ~ /^(info|man)$/ { link(r1($0)); next } $2 == "bin" { link(s1("command", $0)); next } $2 == "include" { link($0); next } diff --git a/packages/skalibs b/packages/skalibs @@ -0,0 +1,63 @@ +#!/usr/bin/env pthbs-build +#+* +#+musl-cross-make.d6361f262190473eca514ebced40aca986604594daf4439e22c4ee2442a89859 +#+gnu-make.f4655ef83082b2a48522eee1f1a3c769f7227847e26751dae3aaa08f100b04b9 +#+busybox.7773924256c334554e91672fed0cafa9473790a68a66a201e1a18d8e9dc9df73 + +: ${JOBS:=1} + +export CC="$pthbs_build_environment/command/x86_64-linux-musl-gcc" +export CXX="$pthbs_build_environment/command/x86_64-linux-musl-g++" +export LD="$pthbs_build_environment/command/x86_64-linux-musl-ld" +export AR="$pthbs_build_environment/command/x86_64-linux-musl-ar" + +prefix=/home/ccx/versions/$pthbs_package +cd skalibs +./configure \ + --prefix="$prefix" \ + --sysdepdir="${prefix}/sysdeps" \ + --binprefix="${prefix}/command" \ + --extbinprefix="${prefix}/command" \ + --dynlibdir="${prefix}/library.so" \ + --libdir="${prefix}/library" \ + --includedir="${prefix}/include" \ + --disable-shared --enable-static + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) +make DESTDIR="$pthbs_destdir" install + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src +} +$1!="."{exit 1} + + +$2 == "share" && $3 ~ /^(info|man)$/ { link(r1($0)); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "include" { link($0); next } +$2 == "lib" { link($0); next } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + exit 3 + } + } +}' >.install-links.new +mv .install-links.new .install-links diff --git a/templates/pkg/busybox b/templates/pkg/busybox @@ -5,7 +5,7 @@ #+{{pkg_install_name("gnu-make:bootstrap")}} #+{{pkg_install_name("busybox:bootstrap")}} #@git:aa4d303a3139107919f73cece4eaf85a7dc75db6:busybox -#@sha256:e653a2f29743ec8f96d68f62c4db7c76db5ff769ec9e7cd6671397c7cc2b942f:busybox/.config +#@sha256:9ee52091d7a41e7e492d508574573fbebe64155d85a07980128f21105eaad1e2:busybox/.config : ${JOBS:=1} diff --git a/templates/pkg/busybox:bootstrap b/templates/pkg/busybox:bootstrap @@ -2,7 +2,7 @@ {%- block body %} #+* #@git:aa4d303a3139107919f73cece4eaf85a7dc75db6:busybox -#@sha256:e653a2f29743ec8f96d68f62c4db7c76db5ff769ec9e7cd6671397c7cc2b942f:busybox/.config +#@sha256:9ee52091d7a41e7e492d508574573fbebe64155d85a07980128f21105eaad1e2:busybox/.config : ${JOBS:=1} mcm={{pkg_install_dir("musl-cross-make:bootstrap")}} diff --git a/templates/pkg/execline b/templates/pkg/execline @@ -0,0 +1,32 @@ +{% extends "genlinks" %} +{%- block script %} +#+* +#+{{pkg_install_name("musl-cross-make")}} +#+{{pkg_install_name("gnu-make")}} +#+{{pkg_install_name("busybox")}} +#+{{pkg_install_name("skalibs")}} + +: ${JOBS:=1} + +export CC="$pthbs_build_environment/command/{{triplet}}-gcc" +export CXX="$pthbs_build_environment/command/{{triplet}}-g++" +export LD="$pthbs_build_environment/command/{{triplet}}-ld" +export AR="$pthbs_build_environment/command/{{triplet}}-ar" + +prefix={{versions}}/$pthbs_package +cd execline +./configure \ + --prefix="$prefix" \ + --sysdepdir="${prefix}/sysdeps" \ + --binprefix="${prefix}/command" \ + --extbinprefix="${prefix}/command" \ + --dynlibdir="${prefix}/library.so" \ + --libdir="${prefix}/library" \ + --includedir="${prefix}/include" \ + --disable-shared --enable-static --enable-allstatic --enable-static-libc + +{{make}} +make DESTDIR="$pthbs_destdir" install +{% endblock %} +{% block genlinks_begin %} +{% endblock %} diff --git a/templates/pkg/gnu-make b/templates/pkg/gnu-make @@ -18,7 +18,7 @@ export LDFLAGS="-static" cd make-4.4.1 ./configure -C --prefix="{{versions}}/$pthbs_package" --build="$($CC -dumpmachine)" --disable-nls -make -j$JOBS -l$(1+JOBS) +{{make}} make DESTDIR="$pthbs_destdir" install-strip {% endblock %} {% block genlinks_begin %} diff --git a/templates/pkg/musl-cross-make b/templates/pkg/musl-cross-make @@ -20,7 +20,7 @@ export HOSTCC="$pthbs_build_environment/command/{{triplet}}-gcc" printf '%s\n' >musl-cross-make/config.mak "OUTPUT=${pthbs_destdir%/}{{versions}}/$pthbs_package" "TARGET={{triplet}}" touch musl-cross-make/sources/* -make -C musl-cross-make -j$JOBS -l$((1+$JOBS)) || exit $? +{{make}} -C musl-cross-make || exit $? make -C musl-cross-make install || exit $? {% endblock %} {% block genlinks_begin %} @@ -28,5 +28,5 @@ make -C musl-cross-make install || exit $? x["./bin/{{triplet}}-gcc"]=1 {% endblock %} {% block rules %} -$2 == "bin" && $3 ~ /^{{triplet}}-/ { target=$3; sub("{{triplet}}-","",s); link("./command/" target) } +$2 == "bin" && $3 ~ /^{{triplet}}-/ { target=$3; sub("{{triplet}}-", "", target); link("./command/" target) } {% endblock -%} diff --git a/templates/pkg/musl-cross-make:bootstrap b/templates/pkg/musl-cross-make:bootstrap @@ -14,7 +14,7 @@ : ${JOBS:=1} printf '%s\n' >musl-cross-make/config.mak "OUTPUT=${pthbs_destdir%/}{{versions}}/$pthbs_package" "TARGET={{triplet}}" touch musl-cross-make/sources/* -make -C musl-cross-make -j$JOBS -l$((1+$JOBS)) || exit $? +{{make}} -C musl-cross-make || exit $? make -C musl-cross-make install || exit $? {% endblock %} {% block genlinks_begin %} @@ -22,5 +22,5 @@ make -C musl-cross-make install || exit $? x["./bin/{{triplet}}-gcc"]=1 {% endblock %} {% block rules %} -$2 == "bin" && $3 ~ /^{{triplet}}-/ { target=$3; sub("{{triplet}}-","",s); link("./command/" target) } +$2 == "bin" && $3 ~ /^{{triplet}}-/ { target=$3; sub("{{triplet}}-", "", target); link("./command/" target) } {% endblock -%} diff --git a/templates/pkg/skalibs b/templates/pkg/skalibs @@ -0,0 +1,31 @@ +{% extends "genlinks" %} +{%- block script %} +#+* +#+{{pkg_install_name("musl-cross-make")}} +#+{{pkg_install_name("gnu-make")}} +#+{{pkg_install_name("busybox")}} + +: ${JOBS:=1} + +export CC="$pthbs_build_environment/command/{{triplet}}-gcc" +export CXX="$pthbs_build_environment/command/{{triplet}}-g++" +export LD="$pthbs_build_environment/command/{{triplet}}-ld" +export AR="$pthbs_build_environment/command/{{triplet}}-ar" + +prefix={{versions}}/$pthbs_package +cd skalibs +./configure \ + --prefix="$prefix" \ + --sysdepdir="${prefix}/sysdeps" \ + --binprefix="${prefix}/command" \ + --extbinprefix="${prefix}/command" \ + --dynlibdir="${prefix}/library.so" \ + --libdir="${prefix}/library" \ + --includedir="${prefix}/include" \ + --disable-shared --enable-static + +{{make}} +make DESTDIR="$pthbs_destdir" install +{% endblock %} +{% block genlinks_begin %} +{% endblock %} diff --git a/vars.yaml b/vars.yaml @@ -1,3 +1,4 @@ shebang: "#!/usr/bin/env pthbs-build" triplet: x86_64-linux-musl versions: /home/ccx/versions +make: "make -j${JOBS:-1} -l$((1+${JOBS:-1}))"