Remove pcmcia from packages
[gumsense-br.git] / package / tftpd / tftpd.mk
bloba3eba754b3c5c6c2c0280d03c0dddd2e284993d7
1 #############################################################
3 # tftpd
5 #############################################################
6 TFTP_HPA_VER:=0.40
7 TFTP_HPA_SOURCE:=tftp-hpa-$(TFTP_HPA_VER).tar.bz2
8 TFTP_HPA_SITE:=http://www.kernel.org/pub/software/network/tftp/
9 TFTP_HPA_DIR:=$(BUILD_DIR)/tftp-hpa-$(TFTP_HPA_VER)
10 TFTP_HPA_CAT:=bzcat
11 TFTP_HPA_BINARY:=tftpd/tftpd
12 TFTP_HPA_TARGET_BINARY:=usr/sbin/in.tftpd
14 $(DL_DIR)/$(TFTP_HPA_SOURCE):
15 $(WGET) -P $(DL_DIR) $(TFTP_HPA_SITE)/$(TFTP_HPA_SOURCE)
17 tftpd-source: $(DL_DIR)/$(TFTP_HPA_SOURCE)
19 $(TFTP_HPA_DIR)/.unpacked: $(DL_DIR)/$(TFTP_HPA_SOURCE)
20 $(TFTP_HPA_CAT) $(DL_DIR)/$(TFTP_HPA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
21 toolchain/patch-kernel.sh $(TFTP_HPA_DIR) package/tftpd/ tftpd\*.patch
22 touch $(TFTP_HPA_DIR)/.unpacked
24 $(TFTP_HPA_DIR)/.configured: $(TFTP_HPA_DIR)/.unpacked
25 (cd $(TFTP_HPA_DIR); rm -rf config.cache; \
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS)" \
28 ./configure \
29 --target=$(GNU_TARGET_NAME) \
30 --host=$(GNU_TARGET_NAME) \
31 --build=$(GNU_HOST_NAME) \
32 --prefix=/usr \
33 --exec-prefix=/usr \
34 --bindir=/usr/bin \
35 --sbindir=/usr/sbin \
36 --libexecdir=/usr/lib \
37 --sysconfdir=/etc \
38 --datadir=/usr/share \
39 --localstatedir=/var \
40 --mandir=/usr/man \
41 --infodir=/usr/info \
42 $(DISABLE_LARGEFILE) \
43 --without-tcpwrappers \
45 touch $(TFTP_HPA_DIR)/.configured
47 $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY): $(TFTP_HPA_DIR)/.configured
48 $(MAKE) -C $(TFTP_HPA_DIR)
50 # This stuff is needed to work around GNU make deficiencies
51 $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY): $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY)
52 @if [ -L $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY) ] ; then \
53 rm -f $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); fi;
54 @if [ ! -f $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) -o $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY) \
55 -ot $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) ] ; then \
56 set -x; \
57 rm -f $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); \
58 cp -a $(TFTP_HPA_DIR)/$(TFTP_HPA_BINARY) $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY); fi ;
59 -mkdir $(TARGET_DIR)/var/lib/tftpboot
60 $(INSTALL) -D -m 0755 package/tftpd/init-tftpd $(TARGET_DIR)/etc/init.d/S80tftpd-hpa
62 tftpd: uclibc $(TARGET_DIR)/$(TFTP_HPA_TARGET_BINARY)
64 tftpd-clean:
65 $(MAKE) DESTDIR=$(TARGET_DIR) -C $(TFTP_HPA_DIR) uninstall
66 -$(MAKE) -C $(TFTP_HPA_DIR) clean
68 tftpd-dirclean:
69 rm -rf $(TFTP_HPA_DIR)
71 #############################################################
73 # Toplevel Makefile options
75 #############################################################
76 ifeq ($(strip $(BR2_PACKAGE_TFTPD)),y)
77 TARGETS+=tftpd
78 endif