2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2007-01-14 02:46:04 +01:00
|
|
|
#
|
|
|
|
# nfs-utils
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-05-29 20:13:21 +02:00
|
|
|
|
2015-10-03 21:29:08 +02:00
|
|
|
NFS_UTILS_VERSION = 1.3.3
|
2015-07-13 11:17:08 +02:00
|
|
|
NFS_UTILS_SOURCE = nfs-utils-$(NFS_UTILS_VERSION).tar.xz
|
|
|
|
NFS_UTILS_SITE = https://www.kernel.org/pub/linux/utils/nfs-utils/$(NFS_UTILS_VERSION)
|
2017-03-30 15:43:32 +02:00
|
|
|
NFS_UTILS_LICENSE = GPL-2.0+
|
2014-05-06 17:42:45 +02:00
|
|
|
NFS_UTILS_LICENSE_FILES = COPYING
|
2012-05-29 20:13:21 +02:00
|
|
|
NFS_UTILS_AUTORECONF = YES
|
2012-10-22 17:47:52 +02:00
|
|
|
NFS_UTILS_DEPENDENCIES = host-pkgconf
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2011-02-20 22:39:04 +01:00
|
|
|
NFS_UTILS_CONF_ENV = knfsd_cv_bsd_signals=no
|
2007-01-22 16:56:42 +01:00
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
NFS_UTILS_CONF_OPTS = \
|
2014-12-22 09:12:05 +01:00
|
|
|
--disable-nfsv4 \
|
|
|
|
--disable-nfsv41 \
|
|
|
|
--disable-gss \
|
|
|
|
--disable-uuid \
|
|
|
|
--disable-ipv6 \
|
|
|
|
--without-tcp-wrappers \
|
2015-07-11 16:48:20 +02:00
|
|
|
--with-statedir=/run/nfs \
|
2014-12-22 09:12:05 +01:00
|
|
|
--with-rpcgen=internal
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2018-05-23 19:44:46 +02:00
|
|
|
HOST_NFS_UTILS_CONF_OPTS = \
|
|
|
|
--disable-nfsv4 \
|
|
|
|
--disable-nfsv41 \
|
|
|
|
--disable-gss \
|
|
|
|
--disable-uuid \
|
|
|
|
--disable-ipv6 \
|
|
|
|
--without-tcp-wrappers \
|
|
|
|
--with-statedir=/run/nfs \
|
|
|
|
--disable-caps \
|
|
|
|
--disable-tirpc \
|
|
|
|
--without-systemd \
|
|
|
|
--with-rpcgen=internal
|
|
|
|
HOST_NFS_UTILS_DEPENDENCIES = host-pkgconf host-libtirpc
|
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug
|
|
|
|
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd
|
|
|
|
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad
|
2019-04-28 11:02:55 +02:00
|
|
|
NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_NFSD) += usr/sbin/exportfs \
|
|
|
|
usr/sbin/rpc.mountd usr/sbin/rpc.nfsd usr/lib/systemd/system/nfs-server.service
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2016-02-21 15:48:43 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
|
|
|
NFS_UTILS_CONF_OPTS += --enable-caps
|
|
|
|
NFS_UTILS_DEPENDENCIES += libcap
|
|
|
|
else
|
|
|
|
NFS_UTILS_CONF_OPTS += --disable-caps
|
|
|
|
endif
|
|
|
|
|
2012-11-04 08:34:13 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
2014-11-27 22:28:49 +01:00
|
|
|
NFS_UTILS_CONF_OPTS += --enable-tirpc
|
2012-11-04 08:34:13 +01:00
|
|
|
NFS_UTILS_DEPENDENCIES += libtirpc
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
NFS_UTILS_CONF_OPTS += --disable-tirpc
|
2012-11-04 08:34:13 +01:00
|
|
|
endif
|
|
|
|
|
2011-02-20 22:39:04 +01:00
|
|
|
define NFS_UTILS_INSTALL_FIXUP
|
2019-04-28 11:02:54 +02:00
|
|
|
cd $(TARGET_DIR) && rm -f $(NFS_UTILS_TARGETS_)
|
2015-07-11 16:48:20 +02:00
|
|
|
touch $(TARGET_DIR)/etc/exports
|
2015-12-22 18:12:17 +01:00
|
|
|
$(INSTALL) -D -m 644 \
|
|
|
|
$(@D)/utils/mount/nfsmount.conf $(TARGET_DIR)/etc/nfsmount.conf
|
2011-02-20 22:39:04 +01:00
|
|
|
endef
|
2014-11-30 15:18:04 +01:00
|
|
|
NFS_UTILS_POST_INSTALL_TARGET_HOOKS += NFS_UTILS_INSTALL_FIXUP
|
|
|
|
|
2015-10-03 21:29:09 +02:00
|
|
|
ifeq ($(BR2_INIT_SYSTEMD),y)
|
|
|
|
NFS_UTILS_CONF_OPTS += --with-systemd=/usr/lib/systemd/system
|
|
|
|
NFS_UTILS_DEPENDENCIES += systemd
|
|
|
|
else
|
|
|
|
NFS_UTILS_CONF_OPTS += --without-systemd
|
|
|
|
endif
|
|
|
|
|
2019-04-28 11:02:55 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_NFS_UTILS_RPC_NFSD),y)
|
2014-11-30 15:18:04 +01:00
|
|
|
define NFS_UTILS_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S60nfs
|
|
|
|
endef
|
|
|
|
|
2019-04-28 11:02:55 +02:00
|
|
|
define NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD
|
|
|
|
ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2015-10-03 21:29:09 +02:00
|
|
|
define NFS_UTILS_INSTALL_INIT_SYSTEMD
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
|
2019-04-28 11:02:55 +02:00
|
|
|
$(NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD)
|
|
|
|
|
2015-10-03 21:29:09 +02:00
|
|
|
ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-client.target
|
|
|
|
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants
|
|
|
|
|
|
|
|
ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants/nfs-client.target
|
|
|
|
|
|
|
|
$(INSTALL) -D -m 0755 package/nfs-utils/nfs-utils_env.sh \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/scripts/nfs-utils_env.sh
|
|
|
|
|
|
|
|
$(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \
|
|
|
|
$(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf
|
|
|
|
endef
|
|
|
|
|
2012-05-29 20:13:21 +02:00
|
|
|
define NFS_UTILS_REMOVE_NFSIOSTAT
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/nfsiostat
|
|
|
|
endef
|
|
|
|
|
|
|
|
# nfsiostat is interpreted python, so remove it unless it's in the target
|
|
|
|
NFS_UTILS_POST_INSTALL_TARGET_HOOKS += $(if $(BR2_PACKAGE_PYTHON),,NFS_UTILS_REMOVE_NFSIOSTAT)
|
|
|
|
|
2018-05-23 19:44:46 +02:00
|
|
|
define HOST_NFS_UTILS_BUILD_CMDS
|
|
|
|
$(MAKE) -C $(@D)/tools/rpcgen
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_NFS_UTILS_INSTALL_CMDS
|
|
|
|
$(INSTALL) -D -m 0755 $(@D)/tools/rpcgen/rpcgen $(HOST_DIR)/bin/rpcgen
|
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2018-05-23 19:44:46 +02:00
|
|
|
$(eval $(host-autotools-package))
|