2005-02-16 22:17:18 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# tftpd
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
TFTP_HPA_VERSION:=0.40
|
|
|
|
TFTP_HPA_SOURCE:=tftp-hpa-$(TFTP_HPA_VERSION).tar.bz2
|
2007-12-17 13:29:06 +01:00
|
|
|
TFTP_HPA_SITE:=$(BR2_KERNEL_MIRROR)/software/network/tftp/
|
2007-07-11 16:06:06 +02:00
|
|
|
TFTP_HPA_DIR:=$(BUILD_DIR)/tftp-hpa-$(TFTP_HPA_VERSION)
|
2006-11-17 16:43:51 +01:00
|
|
|
TFTP_HPA_CAT:=$(BZCAT)
|
2005-02-16 22:17:18 +01:00
|
|
|
TFTP_HPA_BINARY:=tftpd/tftpd
|
|
|
|
TFTP_HPA_TARGET_BINARY:=usr/sbin/in.tftpd
|
|
|
|
|
|
|
|
$(DL_DIR)/$(TFTP_HPA_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(TFTP_HPA_SITE),$(TFTP_HPA_SOURCE))
|
2005-02-16 22:17:18 +01:00
|
|
|
|
|
|
|
tftpd-source: $(DL_DIR)/$(TFTP_HPA_SOURCE)
|
|
|
|
|
|
|
|
$(TFTP_HPA_DIR)/.unpacked: $(DL_DIR)/$(TFTP_HPA_SOURCE)
|
|
|
|
$(TFTP_HPA_CAT) $(DL_DIR)/$(TFTP_HPA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-06-24 10:36:13 +02:00
|
|
|
toolchain/patch-kernel.sh $(TFTP_HPA_DIR) package/tftpd/ tftpd\*.patch
|
2005-02-16 22:17:18 +01:00
|
|
|
touch $(TFTP_HPA_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(TFTP_HPA_DIR)/.configured: $(TFTP_HPA_DIR)/.unpacked
|
|
|
|
(cd $(TFTP_HPA_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2005-02-16 22:17:18 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2005-02-16 22:17:18 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
$(DISABLE_LARGEFILE) \
|
|
|
|
--without-tcpwrappers \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(TFTP_HPA_DIR)/.configured
|
2005-02-16 22:17:18 +01:00
|
|
|
|
|
|
|
$(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY): $(TFTP_HPA_DIR)/.configured
|
|
|
|
$(MAKE) -C $(TFTP_HPA_DIR)
|
|
|
|
|
|
|
|
# This stuff is needed to work around GNU make deficiencies
|
|
|
|
$(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY): $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY)
|
2007-08-22 11:56:41 +02:00
|
|
|
@if [ -L $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY) ]; then \
|
2007-08-21 21:20:18 +02:00
|
|
|
rm -f $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); fi
|
2005-02-16 22:17:18 +01:00
|
|
|
@if [ ! -f $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) -o $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY) \
|
2007-08-22 11:56:41 +02:00
|
|
|
-ot $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) ]; then \
|
2005-02-16 22:17:18 +01:00
|
|
|
set -x; \
|
|
|
|
rm -f $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); \
|
2007-08-22 14:35:41 +02:00
|
|
|
cp -a $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); fi
|
2007-08-22 11:56:41 +02:00
|
|
|
@if [ ! -f $(TARGET_DIR)/etc/init.d/S80tftpd-hpa ]; then \
|
2007-06-16 19:54:38 +02:00
|
|
|
$(INSTALL) -m 0755 package/tftpd/S80tftpd-hpa $(TARGET_DIR)/etc/init.d; \
|
2007-08-21 21:20:18 +02:00
|
|
|
fi
|
2005-02-16 22:17:18 +01:00
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
tftpd: $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY)
|
2005-02-16 22:17:18 +01:00
|
|
|
|
|
|
|
tftpd-clean:
|
2007-05-07 06:01:58 +02:00
|
|
|
rm -f $(TARGET_DIR)/etc/init.d/S80tftpd-hpa
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/in.tftpd
|
2005-02-16 22:17:18 +01:00
|
|
|
-$(MAKE) -C $(TFTP_HPA_DIR) clean
|
|
|
|
|
|
|
|
tftpd-dirclean:
|
|
|
|
rm -rf $(TFTP_HPA_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_TFTPD),y)
|
2005-02-16 22:17:18 +01:00
|
|
|
TARGETS+=tftpd
|
|
|
|
endif
|