2021-05-09 02:10:08 -04:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2021-05-10 12:55:12 -04:00
|
|
|
cp makefile.mid ./Makefile
|
|
|
|
|
2021-05-11 00:07:37 -04:00
|
|
|
for patch in *.patch
|
|
|
|
do
|
|
|
|
patch -p1 < "$patch"
|
2021-05-09 02:10:08 -04:00
|
|
|
done
|
|
|
|
|
2021-05-11 00:07:37 -04:00
|
|
|
sed -i \
|
|
|
|
-e "/^CFLAGS/s/=/= $CFLAGS -static/" \
|
2021-05-09 02:10:08 -04:00
|
|
|
-e "/^LDFLAGS/s/=/= $LDFLAGS -static/" \
|
|
|
|
config.mk
|
|
|
|
|
|
|
|
# Prevent the following binaries from building
|
|
|
|
for nobin in hostname
|
2021-05-11 00:07:37 -04:00
|
|
|
do
|
|
|
|
sed -i s/hostname// Makefile
|
2021-05-09 02:10:08 -04:00
|
|
|
done
|
|
|
|
|
|
|
|
make
|
|
|
|
make DESTDIR="$1" PREFIX=/usr install
|