2005-05-16 19:36:46 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# OpenNTPD
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-06-26 18:18:00 +02:00
|
|
|
OPENNTPD_VERSION:=3.9p1
|
2005-05-16 19:36:46 +02:00
|
|
|
OPENNTPD_SOURCE:=openntpd-$(OPENNTPD_VERSION).tar.gz
|
|
|
|
OPENNTPD_SITE:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD
|
|
|
|
OPENNTPD_DIR:=$(BUILD_DIR)/openntpd-$(OPENNTPD_VERSION)
|
2006-10-01 17:17:52 +02:00
|
|
|
OPENNTPD_CAT:=$(ZCAT)
|
2005-05-16 19:36:46 +02:00
|
|
|
OPENNTPD_BINARY:=ntpd
|
2007-07-16 12:58:58 +02:00
|
|
|
OPENNTPD_TARGET_BINARY:=usr/sbin/ntpd
|
2005-05-16 19:36:46 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(OPENNTPD_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(OPENNTPD_SITE)/$(OPENNTPD_SOURCE)
|
|
|
|
|
|
|
|
$(OPENNTPD_DIR)/.source: $(DL_DIR)/$(OPENNTPD_SOURCE)
|
2006-10-01 17:17:52 +02:00
|
|
|
$(ZCAT) $(DL_DIR)/$(OPENNTPD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-06-26 18:18:00 +02:00
|
|
|
#mv $(BUILD_DIR)/ntpd $(OPENNTPD_DIR)
|
|
|
|
touch $@
|
2005-05-16 19:36:46 +02:00
|
|
|
|
|
|
|
$(OPENNTPD_DIR)/.configured: $(OPENNTPD_DIR)/.source
|
|
|
|
(cd $(OPENNTPD_DIR); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2005-05-16 19:36:46 +02:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
2007-08-19 23:13:08 +02:00
|
|
|
--datadir=/usr/share \
|
|
|
|
--mandir=/usr/share/man \
|
2005-05-16 19:36:46 +02:00
|
|
|
--with-builtin-arc4random \
|
2007-08-19 23:13:08 +02:00
|
|
|
)
|
|
|
|
touch $@
|
2005-05-16 19:36:46 +02:00
|
|
|
|
|
|
|
$(OPENNTPD_DIR)/$(OPENNTPD_BINARY): $(OPENNTPD_DIR)/.configured
|
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(OPENNTPD_DIR)
|
2007-08-22 11:56:41 +02:00
|
|
|
#(cd $(OPENNTPD_DIR); \
|
|
|
|
# $(YACC) parse.y; \
|
2007-06-26 18:18:00 +02:00
|
|
|
# $(TARGET_CC) $(TARGET_CFLAGS) $(CFLAGS_COMBINE) \
|
2007-08-22 14:35:41 +02:00
|
|
|
# $(CFLAGS_WHOLE_PROGRAM) -I$(OPENNTPD_DIR) \
|
|
|
|
# -D__dead="__attribute((__noreturn__))" -DHAVE_INTXX_T=1 \
|
|
|
|
# -include defines.h \
|
|
|
|
# -o $@ \
|
|
|
|
# ntpd.c buffer.c log.c imsg.c ntp.c ntp_msg.c y.tab.c config.c \
|
|
|
|
# server.c client.c sensors.c util.c; \
|
2007-06-26 18:18:00 +02:00
|
|
|
#)
|
2007-08-19 23:13:08 +02:00
|
|
|
$(STRIP) $@
|
2005-05-16 19:36:46 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(OPENNTPD_TARGET_BINARY): $(OPENNTPD_DIR)/$(OPENNTPD_BINARY)
|
2007-07-16 12:58:58 +02:00
|
|
|
rm -f $(TARGET_DIR)/etc/ntpd.conf
|
2006-01-24 22:12:06 +01:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) STRIP_OPT="" -C $(OPENNTPD_DIR) install
|
2007-07-16 12:58:58 +02:00
|
|
|
-$(STRIP) $(TARGET_DIR)/$(OPENNTPD_TARGET_BINARY)
|
|
|
|
cp -af $(OPENNTPD_DIR)/ntpd.conf $(TARGET_DIR)/etc/ntpd.conf
|
2007-08-21 03:53:57 +02:00
|
|
|
# Why on earth do we wipe the whole man directory here?
|
2007-08-19 23:13:08 +02:00
|
|
|
#rm -Rf $(TARGET_DIR)/usr/man
|
2005-05-16 19:36:46 +02:00
|
|
|
|
|
|
|
ntpd: uclibc $(TARGET_DIR)/$(OPENNTPD_TARGET_BINARY)
|
|
|
|
|
|
|
|
ntpd-source: $(DL_DIR)/$(OPENNTPD_SOURCE)
|
|
|
|
|
|
|
|
ntpd-clean:
|
2007-08-19 23:13:08 +02:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/,etc/ntpd.conf \
|
|
|
|
usr/share/man/man?/ntpd.conf* \
|
|
|
|
$(OPENNTPD_TARGET_BINARY))
|
2005-05-16 19:36:46 +02:00
|
|
|
-$(MAKE) -C $(OPENNTPD_DIR) clean
|
|
|
|
|
|
|
|
ntpd-dirclean:
|
|
|
|
rm -rf $(OPENNTPD_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_OPENNTPD)),y)
|
|
|
|
TARGETS+=ntpd
|
|
|
|
endif
|