2007-01-14 02:46:04 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# nfs-utils
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
NFS_UTILS_VERSION:=1.0.10
|
|
|
|
NFS_UTILS_SOURCE:=nfs-utils-$(NFS_UTILS_VERSION).tar.gz
|
2007-01-14 02:46:04 +01:00
|
|
|
NFS_UTILS_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/nfs/
|
|
|
|
NFS_UTILS_CAT:=$(ZCAT)
|
2007-07-11 16:06:06 +02:00
|
|
|
NFS_UTILS_DIR:=$(BUILD_DIR)/nfs-utils-$(NFS_UTILS_VERSION)
|
2007-01-14 02:46:04 +01:00
|
|
|
NFS_UTILS_BINARY:=utils/nfsd/nfsd
|
|
|
|
NFS_UTILS_TARGET_BINARY:=usr/sbin/rpc.nfsd
|
|
|
|
|
2007-01-22 16:56:42 +01:00
|
|
|
BR2_NFS_UTILS_CFLAGS=
|
|
|
|
ifeq ($(BR2_LARGEFILE),)
|
|
|
|
BR2_NFS_UTILS_CFLAGS+=-U_LARGEFILE64_SOURCE -U_FILE_OFFSET_BITS
|
|
|
|
endif
|
|
|
|
BR2_NFS_UTILS_CFLAGS+=-DUTS_RELEASE='\"$(LINUX_HEADERS_VERSION)\"'
|
|
|
|
|
|
|
|
|
2007-01-14 02:46:04 +01:00
|
|
|
$(DL_DIR)/$(NFS_UTILS_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(NFS_UTILS_SITE),$(NFS_UTILS_SOURCE))
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2007-01-14 12:14:27 +01:00
|
|
|
nfs-utils-source: $(DL_DIR)/$(NFS_UTILS_SOURCE)
|
|
|
|
|
2007-01-14 02:46:04 +01:00
|
|
|
$(NFS_UTILS_DIR)/.unpacked: $(DL_DIR)/$(NFS_UTILS_SOURCE)
|
|
|
|
$(NFS_UTILS_CAT) $(DL_DIR)/$(NFS_UTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-08-22 11:44:25 +02:00
|
|
|
toolchain/patch-kernel.sh $(NFS_UTILS_DIR) package/nfs-utils/ nfs-utils\*.patch
|
2007-06-20 15:25:44 +02:00
|
|
|
toolchain/patch-kernel.sh $(NFS_UTILS_DIR) $(NFS_UTILS_DIR)/debian/ \*.patch
|
2007-03-07 15:32:22 +01:00
|
|
|
$(CONFIG_UPDATE) $(NFS_UTILS_DIR)
|
2007-01-22 00:09:51 +01:00
|
|
|
touch $@
|
2007-01-14 02:46:04 +01:00
|
|
|
|
|
|
|
$(NFS_UTILS_DIR)/.configured: $(NFS_UTILS_DIR)/.unpacked
|
|
|
|
(cd $(NFS_UTILS_DIR); rm -rf config.cache; \
|
2007-01-14 12:25:22 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-01-22 16:56:42 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(BR2_NFS_UTILS_CFLAGS)" \
|
2007-01-14 02:46:04 +01:00
|
|
|
knfsd_cv_bsd_signals=no \
|
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--disable-nfsv4 \
|
|
|
|
--disable-gss \
|
2007-06-25 12:29:47 +02:00
|
|
|
)
|
2007-01-22 00:09:51 +01:00
|
|
|
touch $@
|
2007-01-14 02:46:04 +01:00
|
|
|
|
|
|
|
$(NFS_UTILS_DIR)/$(NFS_UTILS_BINARY): $(NFS_UTILS_DIR)/.configured
|
|
|
|
$(MAKE) CC=$(TARGET_CC) CC_FOR_BUILD="$(HOSTCC)" \
|
|
|
|
RPCGEN=/usr/bin/rpcgen -C $(NFS_UTILS_DIR)
|
2007-06-25 12:29:47 +02:00
|
|
|
touch -c $@
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
NFS_UTILS_TARGETS_ :=
|
|
|
|
NFS_UTILS_TARGETS_y := usr/sbin/exportfs usr/sbin/rpc.mountd \
|
2007-01-14 02:46:04 +01:00
|
|
|
usr/sbin/rpc.nfsd usr/sbin/rpc.statd
|
|
|
|
|
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
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2007-08-16 20:19:42 +02:00
|
|
|
$(PROJECT_BUILD_DIR)/.fakeroot.nfs-utils: $(NFS_UTILS_DIR)/$(NFS_UTILS_BINARY)
|
2007-01-14 02:46:04 +01:00
|
|
|
# Use fakeroot to pretend to do 'make install' as root
|
2007-06-25 12:29:47 +02:00
|
|
|
echo '$(MAKE) prefix=$(TARGET_DIR)/usr statedir=$(TARGET_DIR)/var/lib/nfs $(TARGET_CONFIGURE_OPTS) -C $(NFS_UTILS_DIR) install' > $@
|
|
|
|
echo 'rm -f $(TARGET_DIR)/usr/bin/event_rpcgen.py $(TARGET_DIR)/usr/sbin/nhfs* $(TARGET_DIR)/usr/sbin/nfsstat $(TARGET_DIR)/usr/sbin/showmount' >> $@
|
|
|
|
echo 'rm -rf $(TARGET_DIR)/usr/share/man' >> $@
|
|
|
|
echo '$(INSTALL) -m 0755 package/nfs-utils/S60nfs $(TARGET_DIR)/etc/init.d' >> $@
|
2007-08-22 11:56:41 +02:00
|
|
|
echo -n 'for file in $(NFS_UTILS_TARGETS_); do rm -f $(TARGET_DIR)/' >> $@
|
2007-01-14 02:46:04 +01:00
|
|
|
echo -n "\$$" >> $@
|
|
|
|
echo "file; done" >> $@
|
2007-06-25 12:29:47 +02:00
|
|
|
echo 'rm -rf $(TARGET_DIR)/var/lib/nfs' >> $@
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2007-08-16 20:19:42 +02:00
|
|
|
$(TARGET_DIR)/$(NFS_UTILS_TARGET_BINARY): $(PROJECT_BUILD_DIR)/.fakeroot.nfs-utils
|
2007-06-25 12:29:47 +02:00
|
|
|
touch -c $@
|
2007-01-14 02:46:04 +01:00
|
|
|
|
2007-01-22 00:09:51 +01:00
|
|
|
nfs-utils: uclibc host-fakeroot $(TARGET_DIR)/$(NFS_UTILS_TARGET_BINARY)
|
2007-01-14 02:46:04 +01:00
|
|
|
|
|
|
|
nfs-utils-clean:
|
|
|
|
rm -f $(TARGET_DIR)/etc/init.d/S60nfs
|
2007-08-22 11:56:41 +02:00
|
|
|
for file in $(NFS_UTILS_TARGETS_y); do \
|
2007-01-14 02:46:04 +01:00
|
|
|
rm -f $(TARGET_DIR)/$$file; \
|
|
|
|
done
|
|
|
|
-$(MAKE) -C $(NFS_UTILS_DIR) clean
|
2007-08-16 20:19:42 +02:00
|
|
|
rm -f $(PROJECT_BUILD_DIR)/.fakeroot.nfs-utils
|
2007-01-14 02:46:04 +01:00
|
|
|
|
|
|
|
nfs-utils-dirclean:
|
|
|
|
rm -rf $(NFS_UTILS_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_NFS_UTILS),y)
|
2007-01-14 02:46:04 +01:00
|
|
|
TARGETS+=nfs-utils
|
|
|
|
endif
|