mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
- Rename sources to distfiles for clarity. - Per sys(a/c) distfiles to reduce rootfs.py processing and reduce RAM usage in sysa. - Canonicalise early kaem mes/tcc files to kaem script conventions. - Cleanup unused setup in python.
56 lines
1.1 KiB
Bash
Executable file
56 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
|
# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
|
|
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
set -ex
|
|
|
|
mkdir build src
|
|
cd build
|
|
|
|
catm gzip.c.new ../../files/stat_override.c gzip.c
|
|
cp gzip.c.new gzip.c
|
|
|
|
# Extract
|
|
cp ${distfiles}/${pkg}.tar.gz ../src/
|
|
ungz ../src/${pkg}.tar.gz
|
|
untar ../src/${pkg}.tar
|
|
cd ${pkg}
|
|
|
|
# Prepare
|
|
catm gzip.c.new ../../files/stat_override.c gzip.c
|
|
cp gzip.c.new gzip.c
|
|
|
|
# Compile
|
|
tcc -c -DNO_UTIME gzip.c
|
|
tcc -c bits.c
|
|
tcc -c crypt.c
|
|
tcc -c deflate.c
|
|
tcc -c getopt.c
|
|
tcc -c inflate.c
|
|
tcc -c lzw.c
|
|
tcc -c trees.c
|
|
tcc -c unlzh.c
|
|
tcc -c unlzw.c
|
|
tcc -c unpack.c
|
|
tcc -c unzip.c
|
|
# strlwr is already defined in mes libc
|
|
tcc -c -Dstrlwr=unused util.c
|
|
tcc -c zip.c
|
|
|
|
# Link
|
|
tcc -static -o ${bindir}/gzip gzip.o zip.o deflate.o trees.o bits.o unzip.o inflate.o util.o crypt.o lzw.o unlzw.o unpack.o unlzh.o getopt.o
|
|
|
|
# Install
|
|
cp ${bindir}/gzip ${bindir}/gunzip
|
|
cp ${bindir}/gzip ${bindir}/zcat
|
|
chmod 755 ${bindir}/gunzip
|
|
chmod 755 ${bindir}/zcat
|
|
|
|
cd ../..
|
|
|
|
# Checksums
|
|
sha256sum -c checksums
|