2021-05-10 12:55:12 -04:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2021-05-11 00:07:37 -04:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sbindir=/usr/bin
|
2021-05-10 12:55:12 -04:00
|
|
|
|
|
|
|
# Fix includes for w.c
|
|
|
|
sed -i 's|HAVE_UTMPX_H|NO|g' w.c
|
|
|
|
|
|
|
|
# Fix includes for proc/escape.c
|
|
|
|
sed -i '/\#endif/a #include <langinfo.h>' proc/escape.c
|
|
|
|
|
|
|
|
make CCLD="${CC:-cc} -all-static"
|
|
|
|
make DESTDIR="$1" install
|
|
|
|
|
|
|
|
# Prevent redundant junk from getting in.
|
|
|
|
|
2021-05-11 00:07:37 -04:00
|
|
|
for file in sysctl uptime bc dc
|
|
|
|
do
|
2021-06-28 19:49:24 -04:00
|
|
|
if [ $(find . -name $file) ]
|
|
|
|
then rm "$1/usr/bin/$file"
|
|
|
|
fi
|
2021-05-11 00:07:37 -04:00
|
|
|
done
|
|
|
|
|
2021-05-10 12:55:12 -04:00
|
|
|
rm -rf "$1/usr/share"
|