blob: 573561db258b3a7ce1bbc5a7024d11de5fbd1c0d [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "OpenZFS on Linux and FreeBSD"
2DESCRIPTION = "OpenZFS on Linux and FreeBSD"
3LICENSE = "CDDL-1.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
5HOMEPAGE ="https://github.com/openzfs/zfs"
6
7SRC_URI = "https://github.com/openzfs/zfs/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
8 file://0001-Define-strndupa-if-it-does-not-exist.patch \
9"
Patrick Williams864cc432023-02-09 14:54:44 -060010SRC_URI[sha256sum] = "6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6"
Andrew Geissler517393d2023-01-13 08:55:19 -060011
12# Using both 'module' and 'autotools' classes seems a bit odd, they both
13# define a do_compile function.
14# That's why we opt for module-base, also this prevents module splitting.
15inherit module-base pkgconfig autotools
16
17DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl curl"
18
19PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd sysvinit', d)}"
20
21PACKAGECONFIG[pam] = "--enable-pam --with-pamconfigsdir=${datadir}/pam-configs --with-pammoduledir=${libdir}/security, --disable-pam"
22PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,"
23PACKAGECONFIG[sysvinit] = "--enable-sysvinit,--disable-sysvinit,"
24
25EXTRA_OECONF:append = " \
26 --disable-pyzfs \
27 --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \
28 --with-mounthelperdir=${base_sbin} \
29 --with-udevdir=${base_libdir}/udev \
Andrew Geissler3eeda902023-05-19 10:14:02 -050030 --with-systemdunitdir=${systemd_system_unitdir} \
31 --with-systemdgeneratordir=${nonarch_base_libdir}/systemd/system-generators \
32 --with-systemdpresetdir=${nonarch_base_libdir}/systemd/system-preset \
33 --with-systemdmodulesloaddir=${sysconfdir}/module-load.d \
Andrew Geissler517393d2023-01-13 08:55:19 -060034 --without-dracutdir \
Andrew Geissler3eeda902023-05-19 10:14:02 -050035"
Andrew Geissler517393d2023-01-13 08:55:19 -060036
37EXTRA_OEMAKE:append = " \
38 INSTALL_MOD_PATH=${D}${root_prefix} \
Andrew Geissler3eeda902023-05-19 10:14:02 -050039"
Andrew Geissler517393d2023-01-13 08:55:19 -060040
41do_install:append() {
42 # /usr/share/zfs contains the zfs-tests folder which we do not need:
43 rm -rf ${D}${datadir}/zfs
44
45 rm -rf ${D}${datadir}/initramfs-tools
46}
47
48FILES:${PN} += "\
Andrew Geissler3eeda902023-05-19 10:14:02 -050049 ${nonarch_base_libdir}/modules \
50 ${systemd_system_unitdir} \
51 ${nonarch_base_libdir}/systemd/system-generators \
52 ${nonarch_base_libdir}/systemd/system-preset \
53 ${sysconfdir}/modules-load.d/${BPN}.conf \
54 ${sysconfdir}/default/${BPN} \
55 ${sysconfdir}/sudoers.d/${BPN} \
56 ${sysconfdir}/${BPN} \
57 ${base_libdir}/udev \
58 ${sbindir} \
59 ${bindir} \
60 ${libexecdir}/${BPN} \
61 ${libdir} \
62"
Andrew Geissler517393d2023-01-13 08:55:19 -060063
64FILES:${PN}-dev += "\
Andrew Geissler3eeda902023-05-19 10:14:02 -050065 ${prefix}/src/zfs-${PV} \
66 ${prefix}/src/spl-${PV} \
67"
Andrew Geissler517393d2023-01-13 08:55:19 -060068# Not yet ported to rv32
69COMPATIBLE_HOST:riscv32 = "null"
70# conflicting definition of ABS macro from asm/asm.h from kernel
71COMPATIBLE_HOST:mips = "null"