1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# zfs 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunZFS_VERSION = 2.0.5 8*4882a593SmuzhiyunZFS_SITE = https://github.com/openzfs/zfs/releases/download/zfs-$(ZFS_VERSION) 9*4882a593SmuzhiyunZFS_LICENSE = CDDL 10*4882a593SmuzhiyunZFS_LICENSE_FILES = LICENSE COPYRIGHT 11*4882a593SmuzhiyunZFS_CPE_ID_VENDOR = openzfs 12*4882a593SmuzhiyunZFS_CPE_ID_PRODUCT = openzfs 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunZFS_AUTORECONF = YES 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunZFS_DEPENDENCIES = libaio openssl udev util-linux zlib 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun# sysvinit installs only a commented-out modules-load.d/ config file 19*4882a593SmuzhiyunZFS_CONF_OPTS = \ 20*4882a593Smuzhiyun --with-linux=$(LINUX_DIR) \ 21*4882a593Smuzhiyun --with-linux-obj=$(LINUX_DIR) \ 22*4882a593Smuzhiyun --disable-rpath \ 23*4882a593Smuzhiyun --disable-sysvinit 24*4882a593Smuzhiyun 25*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBTIRPC),y) 26*4882a593SmuzhiyunZFS_DEPENDENCIES += libtirpc 27*4882a593SmuzhiyunZFS_CONF_OPTS += --with-tirpc 28*4882a593Smuzhiyunelse 29*4882a593SmuzhiyunZFS_CONF_OPTS += --without-tirpc 30*4882a593Smuzhiyunendif 31*4882a593Smuzhiyun 32*4882a593Smuzhiyunifeq ($(BR2_INIT_SYSTEMD),y) 33*4882a593Smuzhiyun# Installs the optional systemd generators, units, and presets files. 34*4882a593SmuzhiyunZFS_CONF_OPTS += --enable-systemd 35*4882a593Smuzhiyunelse 36*4882a593SmuzhiyunZFS_CONF_OPTS += --disable-systemd 37*4882a593Smuzhiyunendif 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun# The optional PyZFS uses different scripts depending on the python 40*4882a593Smuzhiyun# version (ex: arc_summary2 or arc_summary3). 41*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PYTHON),y) 42*4882a593SmuzhiyunZFS_DEPENDENCIES += python python-setuptools host-python-cffi 43*4882a593SmuzhiyunZFS_CONF_ENV += \ 44*4882a593Smuzhiyun PYTHON=$(HOST_DIR)/usr/bin/python2 \ 45*4882a593Smuzhiyun PYTHON_CPPFLAGS="`$(STAGING_DIR)/usr/bin/python2-config --includes`" \ 46*4882a593Smuzhiyun PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python2-config --ldflags`" \ 47*4882a593Smuzhiyun PYTHON_SITE_PKG="/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" 48*4882a593SmuzhiyunZFS_CONF_OPTS += --enable-pyzfs 49*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_PYTHON3),y) 50*4882a593SmuzhiyunZFS_DEPENDENCIES += python3 python-setuptools host-python-cffi 51*4882a593SmuzhiyunZFS_CONF_ENV += \ 52*4882a593Smuzhiyun PYTHON=$(HOST_DIR)/usr/bin/python3 \ 53*4882a593Smuzhiyun PYTHON_CPPFLAGS="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \ 54*4882a593Smuzhiyun PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`" \ 55*4882a593Smuzhiyun PYTHON_EXTRA_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --libs --embed`" \ 56*4882a593Smuzhiyun PYTHON_SITE_PKG="/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" 57*4882a593SmuzhiyunZFS_CONF_OPTS += --enable-pyzfs 58*4882a593Smuzhiyunelse 59*4882a593SmuzhiyunZFS_CONF_OPTS += --disable-pyzfs --without-python 60*4882a593Smuzhiyunendif 61*4882a593Smuzhiyun 62*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LINUX_PAM),y) 63*4882a593SmuzhiyunZFS_DEPENDENCIES += linux-pam 64*4882a593SmuzhiyunZFS_CONF_ENV += --enable-pam=yes 65*4882a593Smuzhiyunelse 66*4882a593SmuzhiyunZFS_CONF_OPTS += --disable-pam 67*4882a593Smuzhiyunendif 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun# ZFS userland tools are unfunctional without the Linux kernel modules. 70*4882a593SmuzhiyunZFS_MODULE_SUBDIRS = \ 71*4882a593Smuzhiyun module/avl \ 72*4882a593Smuzhiyun module/icp \ 73*4882a593Smuzhiyun module/lua \ 74*4882a593Smuzhiyun module/nvpair \ 75*4882a593Smuzhiyun module/spl \ 76*4882a593Smuzhiyun module/unicode \ 77*4882a593Smuzhiyun module/zcommon \ 78*4882a593Smuzhiyun module/zstd \ 79*4882a593Smuzhiyun module/zfs 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun# These requirements will be validated by zfs/config/kernel-config-defined.m4 82*4882a593Smuzhiyundefine ZFS_LINUX_CONFIG_FIXUPS 83*4882a593Smuzhiyun $(call KCONFIG_DISABLE_OPT,CONFIG_DEBUG_LOCK_ALLOC) 84*4882a593Smuzhiyun $(call KCONFIG_DISABLE_OPT,CONFIG_TRIM_UNUSED_KSYMS) 85*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEFLATE) 86*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_ZLIB_DEFLATE) 87*4882a593Smuzhiyun $(call KCONFIG_ENABLE_OPT,CONFIG_ZLIB_INFLATE) 88*4882a593Smuzhiyunendef 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun$(eval $(kernel-module)) 91*4882a593Smuzhiyun$(eval $(autotools-package)) 92