2019-09-03 14:06:37 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
patch -p1 < fix-stdio-usage.patch
|
2019-09-03 19:13:08 +00:00
|
|
|
patch -p1 < disable-symver.patch
|
2019-09-03 14:06:37 +00:00
|
|
|
|
2019-09-04 05:44:30 +00:00
|
|
|
# LVM2 calls 'fmt -1' throughout the build process.
|
2019-11-17 21:42:41 +00:00
|
|
|
# Busybox doesn't provide this command, however
|
|
|
|
# all it does is split words one per line and
|
|
|
|
# 'tr' can be used in its place.
|
2019-11-18 01:07:30 +00:00
|
|
|
sed -i 's/fmt -1/tr " " "\\n"/' \
|
2019-11-18 00:52:51 +00:00
|
|
|
make.tmpl.in libdm/make.tmpl.in
|
2019-09-04 05:44:30 +00:00
|
|
|
|
|
|
|
# The build fails when using busybox's 'mkdir'(?),
|
|
|
|
# swap to using 'install -d' instead which works.
|
2019-09-03 14:06:37 +00:00
|
|
|
export MKDIR_P="install -d"
|
|
|
|
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sbindir=/usr/bin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--disable-selinux \
|
|
|
|
--enable-pkgconfig \
|
2019-09-03 19:13:08 +00:00
|
|
|
--enable-fsadm \
|
|
|
|
--enable-dmeventd \
|
2019-09-03 14:06:37 +00:00
|
|
|
--enable-cmdlib \
|
|
|
|
--enable-udev_sync \
|
|
|
|
--enable-udev_rules \
|
2019-09-03 19:13:08 +00:00
|
|
|
--enable-symvers=no \
|
|
|
|
--disable-symvers \
|
2019-09-03 14:06:37 +00:00
|
|
|
--with-default-dm-run-dir=/run \
|
|
|
|
--with-default-locking-dir=/run/lock/lvm \
|
|
|
|
--with-default-pid-dir=/run \
|
2019-09-03 19:13:08 +00:00
|
|
|
--with-default-run-dir=/run/lvm
|
2019-09-03 14:06:37 +00:00
|
|
|
|
2019-09-04 05:45:06 +00:00
|
|
|
make DESTDIR="$1" install
|
2019-09-03 14:06:37 +00:00
|
|
|
|
|
|
|
# Make all libraries and binaries writable.
|
|
|
|
chmod -v u+w "$1/usr/lib/"* \
|
|
|
|
"$1/usr/include/"* \
|
|
|
|
"$1/usr/bin/"*
|