live-bootstrap/sysa/after.kaem

139 lines
2.3 KiB
Plaintext
Raw Normal View History

2020-12-23 06:02:57 +00:00
#!/bin/sh
2021-02-08 06:23:31 +00:00
2021-06-10 18:01:47 +01:00
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
2021-02-08 06:23:31 +00:00
# SPDX-FileCopyrightText: 2020-2021 fosslinux <fosslinux@aussies.space>
2020-12-23 06:02:57 +00:00
#
2021-02-08 06:23:31 +00:00
# SPDX-License-Identifier: GPL-3.0-or-later
2020-12-23 06:02:57 +00:00
2021-06-10 18:01:47 +01:00
set -ex
2020-12-23 06:02:57 +00:00
PATH=/bin
2021-01-20 01:43:40 +00:00
2021-06-10 18:01:47 +01:00
# Set commonly used variables
sources=/after
prefix=/image
2021-06-10 18:01:47 +01:00
bindir=${prefix}/bin
libdir=${prefix}/lib
incdir=${prefix}/include
tmpdir=/tmp # tmpdir is needed for patch to work
# Environmental variables needed for mes
NYACC_PKG=nyacc-1.00.2
MES_PKG=mes
MES_PREFIX=${sources}/${MES_PKG}/src/mes-m2-a7522f26ee020dc498219d0122ea1b7d345bcdd5
GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${sources}/${MES_PKG}/src/${NYACC_PKG}/module
2021-06-10 18:01:47 +01:00
mkdir ${bindir} ${libdir} ${incdir} ${tmpdir}
2021-06-10 18:01:47 +01:00
cd ${prefix}
# Remove remaining dependencies on /bin (stage0-posix directory)
cp /bin/blood-elf bin/blood-elf
cp /bin/catm bin/catm
cp /bin/chmod bin/chmod
cp /bin/get_machine bin/get_machine
cp /bin/hex2 bin/hex2
cp /bin/kaem bin/kaem
cp /bin/M1 bin/M1
cp /bin/M2-Planet bin/M2-Planet
cp /bin/mkdir bin/mkdir
cp /bin/sha256sum bin/sha256sum
cp /bin/ungz bin/ungz
cp /bin/untar bin/untar
cp /bin/cp ${prefix}/bin/cp
chmod 755 bin/blood-elf
chmod 755 bin/catm
chmod 755 bin/chmod
chmod 755 bin/cp
chmod 755 bin/get_machine
chmod 755 bin/hex2
chmod 755 bin/kaem
chmod 755 bin/M1
chmod 755 bin/M2-Planet
chmod 755 bin/mkdir
chmod 755 bin/sha256sum
chmod 755 bin/ungz
chmod 755 bin/untar
2021-06-10 18:01:47 +01:00
PATH=${prefix}/bin
2021-06-10 18:01:47 +01:00
cd ${sources}
2021-06-10 18:01:47 +01:00
# mes
pkg=${MES_PKG}
2021-06-10 18:01:47 +01:00
cd ${pkg}
kaem --file ${pkg}.kaem
cd ${sources}
2021-06-10 18:01:47 +01:00
# tcc 0.9.26
pkg="tcc-0.9.26"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
libdir=${libdir}/mes
2021-06-10 18:01:47 +01:00
# gzip
pkg="gzip-1.2.4"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# tar
pkg="tar-1.12"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# sed
pkg="sed-4.0.9"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# patch
pkg="patch-2.5.9"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# make
pkg="make-3.80"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# bzip2
pkg="bzip2-1.0.8"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# tcc 0.9.27
pkg="tcc-0.9.27"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# coreutils
pkg="coreutils-5.0"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# heirloom-devtools
pkg="heirloom-devtools-070527"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
# bash
pkg="bash-2.05b"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
bash run.sh