live-bootstrap/sysa/tar-1.12/tar-1.12.kaem
fosslinux 10a55522a2 Change sources getting method.
- Rather than defining the urls where they are gotten (python sysa,
  python sysc, inside sysc), a spec file is now used that is easily
  interpretable and tool-independent.
- This is interpreted by rootfs.py and inside sysc.
- This is also used to make sources available and extract sources.
- Manual dirname selection is no longer required as is tarball renaming
  upon download - all of this is handled automatically.

Fixes #188
2022-10-02 09:48:20 +11:00

49 lines
1,001 B
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
# Check tarball checksums
checksum-transcriber sources
sha256sum -c sources.SHA256SUM
mkdir build src
cd build
# Extract
cp ${distfiles}/${pkg}.tar.gz ../src/
gzip -d -f ../src/${pkg}.tar.gz
untar --file ../src/${pkg}.tar
rm ../src/${pkg}.tar
cd ${pkg}
# Prepare
cp ../../mk/main.mk Makefile
cp ../../files/getdate_stub.c lib/getdate_stub.c
catm src/create.c.new ../../files/stat_override.c src/create.c
cp src/create.c.new src/create.c
# Build
make -f Makefile
# Install
cp tar ${prefix}/bin/tar
chmod 755 ${prefix}/bin/tar
cd ../..
# Checksums
if match x${UPDATE_CHECKSUMS} xTrue; then
sha256sum -o ${pkg}.checksums \
/usr/bin/tar
cp ${pkg}.checksums ${srcdir}
else
sha256sum -c ${pkg}.checksums
fi