aboutsummaryrefslogtreecommitdiff
path: root/extra/lvm2/build
blob: c10f9cd0aa73009cb066fac02b5a982c3e6b1c94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh -e

patch -p1 < fix-stdio-usage.patch
patch -p1 < disable-symver.patch

# LVM2 calls 'fmt -1' throughout the build process.
# Busybox doesn't provide this command, however
# all it does is split words one per line and
# 'tr' can be used in its place.
for file in make.tmpl.in libdm/make.tmpl.in ; do
    sed 's/fmt -1/tr " " "\\n"/' $file > $file.bak
    mv $file.bak $file
done
    

# 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/"*