2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-22 23:30:05 -07:00
repo/extra/lvm2/build
2019-10-25 10:58:01 +03:00

47 lines
1.2 KiB
Bash
Executable File

#!/bin/sh -e
patch -p1 < fix-stdio-usage.patch
patch -p1 < disable-symver.patch
# LVM2 calls 'fmt -1' throughout the build process.
# This is a part of the GNU coreutils and is not included
# in KISS. All 'fmt -1' does is split each word in a string
# on a new line so lets just use the shell as an alternative.
mkdir -p fakebin
cat > fakebin/fmt <<EOF
#!/bin/sh -f
printf '%s\n' \$(cat -)
EOF
chmod +x fakebin/fmt
export PATH=$PATH:$PWD/fakebin
# The build fails when using busybox's 'mkdir'(?),
# swap to using 'install -d' instead which works.
export MKDIR_P="install -d"
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-selinux \
--enable-pkgconfig \
--enable-fsadm \
--enable-dmeventd \
--enable-cmdlib \
--enable-udev_sync \
--enable-udev_rules \
--enable-symvers=no \
--disable-symvers \
--with-default-dm-run-dir=/run \
--with-default-locking-dir=/run/lock/lvm \
--with-default-pid-dir=/run \
--with-default-run-dir=/run/lvm
make DESTDIR="$1" install
# Make all libraries and binaries writable.
chmod -v u+w "$1/usr/lib/"* \
"$1/usr/include/"* \
"$1/usr/bin/"*