2019-09-03 08:06:37 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
patch -p1 < portability.patch
|
|
|
|
patch -p1 < fix-stdio-usage.patch
|
|
|
|
patch -p1 < mlockall-default-config.patch
|
2019-09-03 13:13:08 -06:00
|
|
|
patch -p1 < musl-fix-include.patch
|
|
|
|
patch -p1 < disable-symver.patch
|
|
|
|
patch -p1 < 001-include_fix.patch
|
2019-09-03 08:06:37 -06:00
|
|
|
|
2019-09-03 13:13:08 -06:00
|
|
|
# POSIX sh 'fmt -1' script.
|
2019-09-03 08:06:37 -06:00
|
|
|
mkdir -p fakebin
|
2019-09-03 13:13:08 -06:00
|
|
|
cat > fakebin/fmt <<EOF
|
|
|
|
#!/bin/sh -f
|
|
|
|
printf '%s\n' \$(cat -)
|
|
|
|
EOF
|
2019-09-03 08:06:37 -06:00
|
|
|
chmod +x fakebin/fmt
|
|
|
|
|
2019-09-03 13:13:08 -06:00
|
|
|
export PATH=$PATH:$PWD/fakebin
|
2019-09-03 08:06:37 -06:00
|
|
|
export MKDIR_P="install -d"
|
|
|
|
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sbindir=/usr/bin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--disable-selinux \
|
|
|
|
--disable-nls \
|
|
|
|
--enable-pkgconfig \
|
2019-09-03 13:13:08 -06:00
|
|
|
--enable-fsadm \
|
|
|
|
--enable-dmeventd \
|
2019-09-03 08:06:37 -06:00
|
|
|
--enable-cmdlib \
|
|
|
|
--enable-udev_sync \
|
|
|
|
--enable-udev_rules \
|
2019-09-03 13:13:08 -06:00
|
|
|
--enable-symvers=no \
|
|
|
|
--disable-symvers \
|
2019-09-03 08:06:37 -06:00
|
|
|
--with-default-dm-run-dir=/run \
|
|
|
|
--with-default-locking-dir=/run/lock/lvm \
|
|
|
|
--with-default-pid-dir=/run \
|
2019-09-03 13:13:08 -06:00
|
|
|
--with-default-run-dir=/run/lvm
|
2019-09-03 08:06:37 -06:00
|
|
|
|
2019-09-03 13:13:08 -06:00
|
|
|
make V=1 DESTDIR="$1" install
|
2019-09-03 08:06:37 -06:00
|
|
|
|
|
|
|
# Make all libraries and binaries writable.
|
|
|
|
chmod -v u+w "$1/usr/lib/"* \
|
|
|
|
"$1/usr/include/"* \
|
|
|
|
"$1/usr/bin/"*
|