iptables: bump to version 1.6.1
[buildroot-gz.git] / package / ntp / ntp.mk
blob7f9e0d67853b6f0beb0dc97f6eec9b5ac2fe6057
1 ################################################################################
3 # ntp
5 ################################################################################
7 NTP_VERSION_MAJOR = 4.2
8 NTP_VERSION = $(NTP_VERSION_MAJOR).8p8
9 NTP_SITE = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJOR)
10 NTP_DEPENDENCIES = host-pkgconf libevent $(if $(BR2_PACKAGE_BUSYBOX),busybox)
11 NTP_LICENSE = ntp license
12 NTP_LICENSE_FILES = COPYRIGHT
13 NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no
14 NTP_CONF_OPTS = \
15 --with-shared \
16 --program-transform-name=s,,, \
17 --disable-tickadj \
18 --disable-debugging \
19 --with-yielding-select=yes \
20 --disable-local-libevent
21 # 0002-ntp-syscalls-fallback.patch
22 NTP_AUTORECONF = YES
24 ifeq ($(BR2_PACKAGE_OPENSSL),y)
25 NTP_CONF_OPTS += --with-crypto
26 NTP_DEPENDENCIES += openssl
27 else
28 NTP_CONF_OPTS += --without-crypto --disable-openssl-random
29 endif
31 ifeq ($(BR2_PACKAGE_LIBCAP),y)
32 NTP_CONF_OPTS += --enable-linuxcaps
33 NTP_DEPENDENCIES += libcap
34 else
35 NTP_CONF_OPTS += --disable-linuxcaps
36 endif
38 ifeq ($(BR2_PACKAGE_LIBEDIT),y)
39 NTP_CONF_OPTS += --with-lineeditlibs=edit
40 NTP_DEPENDENCIES += libedit
41 else
42 NTP_CONF_OPTS += --without-lineeditlibs
43 endif
45 ifeq ($(BR2_PACKAGE_NTP_NTPSNMPD),y)
46 NTP_CONF_OPTS += \
47 --with-net-snmp-config=$(STAGING_DIR)/usr/bin/net-snmp-config
48 NTP_DEPENDENCIES += netsnmp
49 else
50 NTP_CONF_OPTS += --without-ntpsnmpd
51 endif
53 ifeq ($(BR2_PACKAGE_NTP_NTPD_ATOM_PPS),y)
54 NTP_CONF_OPTS += --enable-ATOM
55 NTP_DEPENDENCIES += pps-tools
56 else
57 NTP_CONF_OPTS += --disable-ATOM
58 endif
60 ifeq ($(BR2_PACKAGE_NTP_NTP_SHM_CLK),y)
61 NTP_CONF_OPTS += --enable-SHM
62 else
63 NTP_CONF_OPTS += --disable-SHM
64 endif
66 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_KEYGEN) += util/ntp-keygen
67 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_WAIT) += scripts/ntp-wait/ntp-wait
68 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDATE) += ntpdate/ntpdate
69 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDC) += ntpdc/ntpdc
70 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPQ) += ntpq/ntpq
71 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPSNMPD) += ntpsnmpd/ntpsnmpd
72 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTIME) += util/ntptime
73 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTRACE) += scripts/ntptrace/ntptrace
74 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_SNTP) += sntp/sntp
75 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_TICKADJ) += util/tickadj
77 define NTP_INSTALL_TARGET_CMDS
78 $(if $(BR2_PACKAGE_NTP_NTPD), install -m 755 $(@D)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd)
79 test -z "$(NTP_INSTALL_FILES_y)" || install -m 755 $(addprefix $(@D)/,$(NTP_INSTALL_FILES_y)) $(TARGET_DIR)/usr/bin/
80 $(INSTALL) -m 644 package/ntp/ntpd.etc.conf $(TARGET_DIR)/etc/ntp.conf
81 endef
83 ifeq ($(BR2_PACKAGE_NTP_NTPD),y)
84 define NTP_INSTALL_INIT_SYSV
85 $(INSTALL) -D -m 755 package/ntp/S49ntp $(TARGET_DIR)/etc/init.d/S49ntp
86 endef
88 define NTP_INSTALL_INIT_SYSTEMD
89 $(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service
90 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
91 ln -fs ../../../../usr/lib/systemd/system/ntpd.service \
92 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
93 endef
94 endif
96 $(eval $(autotools-package))