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 fosslinux <fosslinux@aussies.space>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-01-20 01:43:40 +00:00
|
|
|
set -ex
|
|
|
|
|
2021-06-20 23:58:04 +01:00
|
|
|
mkdir build
|
2021-01-20 01:43:40 +00:00
|
|
|
cd build
|
|
|
|
|
|
|
|
# Extract
|
2021-12-31 19:30:44 +00:00
|
|
|
gunzip -f ../src/${pkg}.tar.gz
|
2021-01-20 01:43:40 +00:00
|
|
|
tar xf ../src/${pkg}.tar
|
|
|
|
cd ${pkg}
|
|
|
|
|
|
|
|
# Patch
|
|
|
|
patch -Np0 -i ../../patches/mes-libc.patch
|
|
|
|
patch -Np0 -i ../../patches/coreutils.patch
|
|
|
|
|
|
|
|
# Build
|
|
|
|
make CC=tcc AR="tcc -ar" bzip2
|
|
|
|
|
|
|
|
# Install
|
2021-06-24 00:32:19 +01:00
|
|
|
cp bzip2 ${prefix}/bin/bzip2
|
|
|
|
cp bzip2 ${prefix}/bin/bunzip2
|
|
|
|
chmod 755 ${prefix}/bin/bzip2
|
|
|
|
chmod 755 ${prefix}/bin/bunzip2
|
2021-01-20 01:43:40 +00:00
|
|
|
|
|
|
|
# Test
|
|
|
|
bzip2 --help
|
|
|
|
|
|
|
|
cd ../..
|
2021-02-18 07:29:18 +00:00
|
|
|
|
|
|
|
# Checksums
|
2021-02-24 01:28:23 +00:00
|
|
|
sha256sum -c checksums/bzip2-pass1
|