aboutsummaryrefslogtreecommitdiff
path: root/personal/zfs/build
blob: 52cf826c232c2b8aee3db6bd8f3e259212fb0711 (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
#!/bin/sh -e
# Build script originally taken from github.com/jedavies-dev/kiss-zfs
# Patched to work with the latest kernel, better directory management etc.

sed -i 's/CDDL/GPL/g' META

./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --sbindir=/usr/bin \
    --disable-systemd \
    --disable-sysvinit \
    --disable-nls \
    --enable-linux-builtin \
    --with-linux="/usr/lib/modules/${KERNEL_VERSION:-$(uname -r)}/build"

make
make DESTDIR="$1" install

cd module
make
make DESTDIR="$1/usr" install

# Holy hell zfs is insistent on not installing files where I want them to be
# installed.
mv "$1/lib/udev" "$1/usr/lib"
mv "$1/sbin/mount.zfs" "$1/usr/bin/mount.zfs"
rm -r "$1/sbin" "$1/lib"

rm -rf "$1/usr/share/zfs/zfs-tests" \
       "$1/usr/lib/dracut" \
       "$1/usr/share/initramfs-tools"