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 | " |
| 10 | SRC_URI[sha256sum] = "6462e63e185de6ff10c64ffa6ed773201a082f9dd13e603d7e8136fcb4aca71b" |
| 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 \ |
| 30 | --without-dracutdir \ |
| 31 | " |
| 32 | |
| 33 | EXTRA_OEMAKE:append = " \ |
| 34 | INSTALL_MOD_PATH=${D}${root_prefix} \ |
| 35 | " |
| 36 | |
| 37 | do_install:append() { |
| 38 | # /usr/share/zfs contains the zfs-tests folder which we do not need: |
| 39 | rm -rf ${D}${datadir}/zfs |
| 40 | |
| 41 | rm -rf ${D}${datadir}/initramfs-tools |
| 42 | } |
| 43 | |
| 44 | FILES:${PN} += "\ |
| 45 | ${base_sbindir}/* \ |
| 46 | ${base_libdir}/* \ |
| 47 | ${sysconfdir}/* \ |
| 48 | ${sbindir}/* \ |
| 49 | ${bindir}/* \ |
| 50 | ${libexecdir}/${BPN}/* \ |
| 51 | ${libdir}/* \ |
| 52 | " |
| 53 | |
| 54 | FILES:${PN}-dev += "\ |
| 55 | ${prefix}/src/zfs-${PV}/* \ |
| 56 | ${prefix}/src/spl-${PV}/* \ |
| 57 | " |
| 58 | # Not yet ported to rv32 |
| 59 | COMPATIBLE_HOST:riscv32 = "null" |
| 60 | # conflicting definition of ABS macro from asm/asm.h from kernel |
| 61 | COMPATIBLE_HOST:mips = "null" |