2021-01-20 19:23:48 +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>
|
2022-03-07 07:58:20 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021-22 fosslinux <fosslinux@aussies.space>
|
2023-05-02 14:21:46 +01:00
|
|
|
# SPDX-FileCopyrightText: 2023 Emily Trau <emily@downunderctf.com>
|
2021-02-08 06:23:31 +00:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-01-20 19:23:48 +00:00
|
|
|
set -ex
|
|
|
|
|
2022-09-29 11:35:31 +01:00
|
|
|
# Check tarball checksums
|
|
|
|
checksum-transcriber sources
|
|
|
|
sha256sum -c sources.SHA256SUM
|
|
|
|
|
2022-04-13 00:08:29 +01:00
|
|
|
mkdir build src
|
2021-01-20 19:23:48 +00:00
|
|
|
cd build
|
|
|
|
|
|
|
|
# Extract
|
2022-04-24 04:59:17 +01:00
|
|
|
cp ${distfiles}/${pkg}.tar.bz2 ../src/
|
2021-12-31 19:30:44 +00:00
|
|
|
bunzip2 -f ../src/${pkg}.tar.bz2
|
2021-01-20 19:23:48 +00:00
|
|
|
tar xf ../src/${pkg}.tar
|
|
|
|
cd ${pkg}
|
|
|
|
cp ../../mk/main.mk Makefile
|
|
|
|
|
|
|
|
# Patch and prepare
|
|
|
|
cp lib/fnmatch_.h lib/fnmatch.h
|
|
|
|
cp lib/ftw_.h lib/ftw.h
|
|
|
|
cp lib/search_.h lib/search.h
|
|
|
|
catm config.h
|
|
|
|
|
2022-06-14 22:09:07 +01:00
|
|
|
# We will rebuild it
|
|
|
|
rm src/false.c
|
|
|
|
|
2022-06-15 21:04:18 +01:00
|
|
|
rm src/dircolors.h
|
|
|
|
|
2021-01-20 19:23:48 +00:00
|
|
|
patch -Np0 -i ../../patches/modechange.patch
|
|
|
|
patch -Np0 -i ../../patches/mbstate.patch
|
2021-01-22 21:41:47 +00:00
|
|
|
patch -Np0 -i ../../patches/ls-strcmp.patch
|
2021-03-13 19:32:19 +00:00
|
|
|
patch -Np0 -i ../../patches/touch-getdate.patch
|
2022-05-17 01:01:48 +01:00
|
|
|
patch -Np0 -i ../../patches/touch-dereference.patch
|
2022-06-22 18:26:27 +01:00
|
|
|
patch -Np0 -i ../../patches/tac-uint64.patch
|
2023-05-02 14:21:46 +01:00
|
|
|
patch -Np0 -i ../../patches/expr-strcmp.patch
|
|
|
|
patch -Np0 -i ../../patches/sort-locale.patch
|
2023-05-22 12:30:22 +01:00
|
|
|
patch -Np0 -i ../../patches/uniq-fopen.patch
|
2021-01-20 19:23:48 +00:00
|
|
|
|
|
|
|
# Build and install
|
2021-06-24 00:32:19 +01:00
|
|
|
make -f Makefile PREFIX=${prefix}
|
|
|
|
make -f Makefile PREFIX=${prefix} install
|
2021-02-13 06:29:49 +00:00
|
|
|
|
|
|
|
cd ../..
|
2022-04-13 00:08:29 +01:00
|
|
|
rm -r src/
|
2021-02-18 07:29:18 +00:00
|
|
|
|
|
|
|
# Checksums
|
2022-05-20 15:55:35 +01:00
|
|
|
if match x${UPDATE_CHECKSUMS} xTrue; then
|
|
|
|
sha256sum -o ${pkg}.checksums \
|
|
|
|
/usr/bin/install \
|
|
|
|
/usr/bin/basename \
|
|
|
|
/usr/bin/cat \
|
|
|
|
/usr/bin/chmod \
|
|
|
|
/usr/bin/cksum \
|
|
|
|
/usr/bin/cp \
|
|
|
|
/usr/bin/csplit \
|
|
|
|
/usr/bin/cut \
|
2023-05-22 12:30:22 +01:00
|
|
|
/usr/bin/dirname \
|
2022-05-20 15:55:35 +01:00
|
|
|
/usr/bin/echo \
|
|
|
|
/usr/bin/expand \
|
2023-05-22 12:30:22 +01:00
|
|
|
/usr/bin/expr \
|
|
|
|
/usr/bin/factor \
|
2022-05-20 15:55:35 +01:00
|
|
|
/usr/bin/false \
|
|
|
|
/usr/bin/fmt \
|
|
|
|
/usr/bin/fold \
|
|
|
|
/usr/bin/head \
|
2023-05-22 12:30:22 +01:00
|
|
|
/usr/bin/hostname \
|
2022-05-20 15:55:35 +01:00
|
|
|
/usr/bin/id \
|
|
|
|
/usr/bin/join \
|
|
|
|
/usr/bin/kill \
|
|
|
|
/usr/bin/link \
|
|
|
|
/usr/bin/ln \
|
|
|
|
/usr/bin/logname \
|
|
|
|
/usr/bin/mkfifo \
|
|
|
|
/usr/bin/mkdir \
|
|
|
|
/usr/bin/mknod \
|
|
|
|
/usr/bin/nl \
|
|
|
|
/usr/bin/od \
|
|
|
|
/usr/bin/paste \
|
|
|
|
/usr/bin/pathchk \
|
2023-05-22 12:30:22 +01:00
|
|
|
/usr/bin/pr \
|
2022-05-20 15:55:35 +01:00
|
|
|
/usr/bin/printf \
|
|
|
|
/usr/bin/ptx \
|
|
|
|
/usr/bin/pwd \
|
|
|
|
/usr/bin/readlink \
|
|
|
|
/usr/bin/rmdir \
|
|
|
|
/usr/bin/seq \
|
|
|
|
/usr/bin/sleep \
|
2023-05-22 12:30:22 +01:00
|
|
|
/usr/bin/sort \
|
2022-05-20 15:55:35 +01:00
|
|
|
/usr/bin/split \
|
|
|
|
/usr/bin/sum \
|
|
|
|
/usr/bin/tail \
|
|
|
|
/usr/bin/tee \
|
|
|
|
/usr/bin/tr \
|
|
|
|
/usr/bin/tsort \
|
|
|
|
/usr/bin/unexpand \
|
2023-05-22 12:30:22 +01:00
|
|
|
/usr/bin/uniq \
|
2022-05-20 15:55:35 +01:00
|
|
|
/usr/bin/unlink \
|
|
|
|
/usr/bin/wc \
|
|
|
|
/usr/bin/whoami \
|
2022-06-22 18:26:27 +01:00
|
|
|
/usr/bin/tac \
|
2022-05-20 15:55:35 +01:00
|
|
|
/usr/bin/test \
|
|
|
|
/usr/bin/touch \
|
|
|
|
/usr/bin/true \
|
|
|
|
/usr/bin/yes \
|
|
|
|
/usr/bin/ls \
|
|
|
|
/usr/bin/md5sum \
|
|
|
|
/usr/bin/mv \
|
|
|
|
/usr/bin/rm \
|
|
|
|
/usr/bin/sha1sum
|
|
|
|
|
|
|
|
install ${pkg}.checksums ${srcdir}
|
|
|
|
else
|
|
|
|
sha256sum -c ${pkg}.checksums
|
|
|
|
fi
|