Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "OpenZFS on Linux and FreeBSD" |
| 2 | DESCRIPTION = "OpenZFS on Linux and FreeBSD" |
| 3 | LICENSE = "CDDL-1.0" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa" |
| 5 | HOMEPAGE ="https://github.com/openzfs/zfs" |
| 6 | |
| 7 | SRC_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 Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame] | 10 | SRC_URI[sha256sum] = "6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 11 | |
| 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. |
| 15 | inherit module-base pkgconfig autotools |
| 16 | |
| 17 | DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl curl" |
| 18 | |
| 19 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd sysvinit', d)}" |
| 20 | |
| 21 | PACKAGECONFIG[pam] = "--enable-pam --with-pamconfigsdir=${datadir}/pam-configs --with-pammoduledir=${libdir}/security, --disable-pam" |
| 22 | PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd," |
| 23 | PACKAGECONFIG[sysvinit] = "--enable-sysvinit,--disable-sysvinit," |
| 24 | |
| 25 | EXTRA_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 Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame^] | 30 | --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 Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 34 | --without-dracutdir \ |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame^] | 35 | " |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 36 | |
| 37 | EXTRA_OEMAKE:append = " \ |
| 38 | INSTALL_MOD_PATH=${D}${root_prefix} \ |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame^] | 39 | " |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 40 | |
| 41 | do_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 | |
| 48 | FILES:${PN} += "\ |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame^] | 49 | ${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 Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 63 | |
| 64 | FILES:${PN}-dev += "\ |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame^] | 65 | ${prefix}/src/zfs-${PV} \ |
| 66 | ${prefix}/src/spl-${PV} \ |
| 67 | " |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 68 | # Not yet ported to rv32 |
| 69 | COMPATIBLE_HOST:riscv32 = "null" |
| 70 | # conflicting definition of ABS macro from asm/asm.h from kernel |
| 71 | COMPATIBLE_HOST:mips = "null" |