Fix typo
[openwrt.git] / obsolete-buildroot / make / ntp.mk
1 #############################################################
2 #
3 # ntp
4 #
5 #############################################################
6 NTP_SOURCE:=ntp-4.1.2.tar.gz
7 NTP_SITE:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4
8 NTP_DIR:=$(BUILD_DIR)/ntp-4.1.2
9 NTP_CAT:=zcat
10 NTP_BINARY:=ntpdate/ntpdate
11 NTP_TARGET_BINARY:=usr/bin/ntpdate
12
13
14 $(DL_DIR)/$(NTP_SOURCE):
15 $(WGET) -P $(DL_DIR) $(NTP_SITE)/$(NTP_SOURCE)
16
17 ntp-source: $(DL_DIR)/$(NTP_SOURCE)
18
19 $(NTP_DIR)/.unpacked: $(DL_DIR)/$(NTP_SOURCE)
20 $(NTP_CAT) $(DL_DIR)/$(NTP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
21 $(SED) "s,^#if.*__GLIBC__.*_BSD_SOURCE.*$$,#if 0," \
22 $(NTP_DIR)/ntpd/refclock_pcf.c;
23 touch $(NTP_DIR)/.unpacked
24
25 $(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked
26 (cd $(NTP_DIR); rm -rf config.cache; \
27 $(TARGET_CONFIGURE_OPTS) \
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_NLS) \
43 --with-shared \
44 --program-transform-name=s,,, \
45 );
46 touch $(NTP_DIR)/.configured
47
48 $(NTP_DIR)/$(NTP_BINARY): $(NTP_DIR)/.configured
49 $(MAKE) CC=$(TARGET_CC) -C $(NTP_DIR)
50
51 $(TARGET_DIR)/$(NTP_TARGET_BINARY): $(NTP_DIR)/$(NTP_BINARY)
52 install -m 755 $(NTP_DIR)/$(NTP_BINARY) $(TARGET_DIR)/$(NTP_TARGET_BINARY)
53
54 ntp: uclibc $(TARGET_DIR)/$(NTP_TARGET_BINARY)
55
56 ntp-clean:
57 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NTP_DIR) uninstall
58 -$(MAKE) -C $(NTP_DIR) clean
59
60 ntp-dirclean:
61 rm -rf $(NTP_DIR)
62
This page took 0.043473 seconds and 5 git commands to generate.