2021-01-11 20:44:07 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-02-08 06:23:31 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
|
2021-03-15 13:22:27 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
|
2021-02-08 06:23:31 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-01-11 20:44:07 +00:00
|
|
|
set -ex
|
|
|
|
|
2021-01-20 01:43:40 +00:00
|
|
|
cd build
|
|
|
|
|
|
|
|
# Extract
|
2021-04-15 01:00:51 +01:00
|
|
|
untar ../src/${pkg}.tar
|
2021-01-20 01:43:40 +00:00
|
|
|
cd ${pkg}
|
|
|
|
|
2021-01-11 20:44:07 +00:00
|
|
|
# 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
|
2021-03-15 13:22:27 +00:00
|
|
|
# strlwr is already defined in mes libc
|
|
|
|
tcc -c -Dstrlwr=unused util.c
|
2021-01-11 20:44:07 +00:00
|
|
|
tcc -c zip.c
|
|
|
|
|
|
|
|
# Link
|
2021-03-15 13:22:27 +00:00
|
|
|
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
|
2021-01-11 20:44:07 +00:00
|
|
|
|
|
|
|
# Install
|
|
|
|
cp ${bindir}/gzip ${bindir}/gunzip
|
|
|
|
cp ${bindir}/gzip ${bindir}/zcat
|
|
|
|
chmod 755 ${bindir}/gunzip
|
|
|
|
chmod 755 ${bindir}/zcat
|
2021-01-20 01:43:40 +00:00
|
|
|
|
|
|
|
cd ../..
|
2021-02-13 06:29:49 +00:00
|
|
|
|
|
|
|
# Checksums
|
|
|
|
fletcher16 checksums
|