1*169d7bccSPatrick WilliamsSUMMARY = "OpenZFS on Linux and FreeBSD"
2*169d7bccSPatrick WilliamsDESCRIPTION = "OpenZFS on Linux and FreeBSD"
3*169d7bccSPatrick WilliamsLICENSE = "CDDL-1.0"
4*169d7bccSPatrick WilliamsLIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
5*169d7bccSPatrick WilliamsHOMEPAGE ="https://github.com/openzfs/zfs"
6*169d7bccSPatrick Williams
7*169d7bccSPatrick WilliamsSRCREV = "494aaaed89cb9fe9f2da3b6c6f465a4bc9f6a7e1"
8*169d7bccSPatrick WilliamsSRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=zfs-2.2-release \
9*169d7bccSPatrick Williams           file://0001-Define-strndupa-if-it-does-not-exist.patch \
10*169d7bccSPatrick Williams           file://aaf28a4630af60496c9d33db1d06a7d7d8983422.patch \
11*169d7bccSPatrick Williams           file://0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch \
12*169d7bccSPatrick Williams"
13*169d7bccSPatrick Williams
14*169d7bccSPatrick WilliamsS = "${WORKDIR}/git"
15*169d7bccSPatrick Williams
16*169d7bccSPatrick Williams# Using both 'module' and 'autotools' classes seems a bit odd, they both
17*169d7bccSPatrick Williams# define a do_compile function.
18*169d7bccSPatrick Williams# That's why we opt for module-base, also this prevents module splitting.
19*169d7bccSPatrick Williamsinherit module-base pkgconfig autotools bash-completion
20*169d7bccSPatrick Williams
21*169d7bccSPatrick WilliamsDEPENDS = "virtual/kernel zlib util-linux libtirpc openssl curl"
22*169d7bccSPatrick Williams
23*169d7bccSPatrick WilliamsPACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd sysvinit', d)}"
24*169d7bccSPatrick Williams
25*169d7bccSPatrick WilliamsPACKAGECONFIG[pam] = "--enable-pam --with-pamconfigsdir=${datadir}/pam-configs --with-pammoduledir=${libdir}/security, --disable-pam"
26*169d7bccSPatrick WilliamsPACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,"
27*169d7bccSPatrick WilliamsPACKAGECONFIG[sysvinit] = "--enable-sysvinit,--disable-sysvinit,"
28*169d7bccSPatrick Williams
29*169d7bccSPatrick WilliamsEXTRA_OECONF:append = " \
30*169d7bccSPatrick Williams    --disable-pyzfs \
31*169d7bccSPatrick Williams    --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \
32*169d7bccSPatrick Williams    --with-mounthelperdir=${base_sbin} \
33*169d7bccSPatrick Williams    --with-udevdir=${base_libdir}/udev \
34*169d7bccSPatrick Williams    --with-systemdunitdir=${systemd_system_unitdir} \
35*169d7bccSPatrick Williams    --with-systemdgeneratordir=${nonarch_base_libdir}/systemd/system-generators \
36*169d7bccSPatrick Williams    --with-systemdpresetdir=${nonarch_base_libdir}/systemd/system-preset \
37*169d7bccSPatrick Williams    --with-systemdmodulesloaddir=${sysconfdir}/module-load.d \
38*169d7bccSPatrick Williams    --without-dracutdir \
39*169d7bccSPatrick Williams"
40*169d7bccSPatrick Williams
41*169d7bccSPatrick WilliamsEXTRA_OEMAKE:append = " \
42*169d7bccSPatrick Williams    INSTALL_MOD_PATH=${D}${root_prefix} \
43*169d7bccSPatrick Williams"
44*169d7bccSPatrick Williams
45*169d7bccSPatrick Williamsdo_install:append() {
46*169d7bccSPatrick Williams    # /usr/share/zfs contains the zfs-tests folder which we do not need:
47*169d7bccSPatrick Williams    rm -rf ${D}${datadir}/zfs
48*169d7bccSPatrick Williams
49*169d7bccSPatrick Williams    rm -rf ${D}${datadir}/initramfs-tools
50*169d7bccSPatrick Williams}
51*169d7bccSPatrick Williams
52*169d7bccSPatrick WilliamsFILES:${PN} += "\
53*169d7bccSPatrick Williams    ${nonarch_base_libdir}/modules \
54*169d7bccSPatrick Williams    ${systemd_system_unitdir} \
55*169d7bccSPatrick Williams    ${nonarch_base_libdir}/systemd/system-generators \
56*169d7bccSPatrick Williams    ${nonarch_base_libdir}/systemd/system-preset \
57*169d7bccSPatrick Williams    ${sysconfdir}/modules-load.d/${BPN}.conf \
58*169d7bccSPatrick Williams    ${sysconfdir}/default/${BPN} \
59*169d7bccSPatrick Williams    ${sysconfdir}/sudoers.d/${BPN} \
60*169d7bccSPatrick Williams    ${sysconfdir}/${BPN} \
61*169d7bccSPatrick Williams    ${base_libdir}/udev \
62*169d7bccSPatrick Williams    ${sbindir} \
63*169d7bccSPatrick Williams    ${bindir} \
64*169d7bccSPatrick Williams    ${libexecdir}/${BPN} \
65*169d7bccSPatrick Williams    ${libdir} \
66*169d7bccSPatrick Williams"
67*169d7bccSPatrick Williams
68*169d7bccSPatrick WilliamsFILES:${PN}-dev += "\
69*169d7bccSPatrick Williams    ${prefix}/src/zfs-${PV} \
70*169d7bccSPatrick Williams    ${prefix}/src/spl-${PV} \
71*169d7bccSPatrick Williams"
72*169d7bccSPatrick Williams# Not yet ported to rv32
73*169d7bccSPatrick WilliamsCOMPATIBLE_HOST:riscv32 = "null"
74*169d7bccSPatrick Williams# conflicting definition of ABS macro from asm/asm.h from kernel
75*169d7bccSPatrick WilliamsCOMPATIBLE_HOST:mips = "null"
76*169d7bccSPatrick Williams# FTBFS on aarch64 with 6.2+ kernel see https://github.com/openzfs/zfs/issues/14555
77*169d7bccSPatrick WilliamsCOMPATIBLE_HOST:aarch64 = "null"
78