2021-01-20 01:43:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-02-08 06:23:31 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
|
|
|
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-01-20 01:43:40 +00:00
|
|
|
set -ex
|
|
|
|
|
2021-01-20 19:25:44 +00:00
|
|
|
mkdir build
|
2021-01-20 01:43:40 +00:00
|
|
|
cd build
|
|
|
|
|
|
|
|
# Extract
|
|
|
|
gunzip ../src/${pkg}.tar.gz
|
|
|
|
tar xf ../src/${pkg}.tar
|
|
|
|
cd ${pkg}
|
|
|
|
cp ../../mk/main.mk Makefile
|
|
|
|
cp ../../mk/builtins.mk builtins/Makefile
|
|
|
|
cp ../../mk/common.mk common.mk
|
|
|
|
|
|
|
|
# Create various .h files
|
2021-01-20 19:25:44 +00:00
|
|
|
touch config.h
|
|
|
|
touch include/version.h
|
|
|
|
touch include/pipesize.h
|
2021-01-28 21:55:00 +00:00
|
|
|
rm y.tab.c y.tab.h
|
2021-01-20 01:43:40 +00:00
|
|
|
|
|
|
|
# Patch
|
|
|
|
patch -Np0 -i ../../patches/mes-libc.patch
|
|
|
|
patch -Np0 -i ../../patches/tinycc.patch
|
|
|
|
patch -Np0 -i ../../patches/missing-defines.patch
|
|
|
|
patch -Np0 -i ../../patches/locale.patch
|
|
|
|
patch -Np0 -i ../../patches/dev-tty.patch
|
|
|
|
|
|
|
|
# Compile
|
|
|
|
make mkbuiltins
|
|
|
|
cd builtins
|
|
|
|
make libbuiltins.a
|
|
|
|
cd ..
|
|
|
|
make
|
|
|
|
|
|
|
|
# Install
|
2021-01-20 19:25:44 +00:00
|
|
|
install bash /after/bin/
|
2021-01-29 01:31:56 +00:00
|
|
|
ln -s /after/bin/bash /bin/bash
|
|
|
|
ln -s /after/bin/bash /bin/sh
|
2021-01-20 01:43:40 +00:00
|
|
|
|
|
|
|
cd ../..
|
2021-02-18 07:29:18 +00:00
|
|
|
|
|
|
|
# Checksums
|
|
|
|
sha256sum -c checksums
|