libasplib: add url to gcc bug report
[buildroot-gz.git] / package / ntp / ntp.mk
blobedbf1c86b6d6dfbd00eacef706a45aa1d7012b63
1 ################################################################################
3 # ntp
5 ################################################################################
7 NTP_VERSION_MAJOR = 4.2
8 NTP_VERSION = $(NTP_VERSION_MAJOR).8p9
9 NTP_SITE = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJOR)
10 NTP_DEPENDENCIES = host-pkgconf libevent openssl $(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 --with-crypto
23 # 0002-ntp-syscalls-fallback.patch
24 NTP_AUTORECONF = YES
26 ifeq ($(BR2_PACKAGE_LIBCAP),y)
27 NTP_CONF_OPTS += --enable-linuxcaps
28 NTP_DEPENDENCIES += libcap
29 else
30 NTP_CONF_OPTS += --disable-linuxcaps
31 endif
33 ifeq ($(BR2_PACKAGE_LIBEDIT),y)
34 NTP_CONF_OPTS += --with-lineeditlibs=edit
35 NTP_DEPENDENCIES += libedit
36 else
37 NTP_CONF_OPTS += --without-lineeditlibs
38 endif
40 ifeq ($(BR2_PACKAGE_NTP_NTPSNMPD),y)
41 NTP_CONF_OPTS += \
42 --with-net-snmp-config=$(STAGING_DIR)/usr/bin/net-snmp-config
43 NTP_DEPENDENCIES += netsnmp
44 else
45 NTP_CONF_OPTS += --without-ntpsnmpd
46 endif
48 ifeq ($(BR2_PACKAGE_NTP_NTPD_ATOM_PPS),y)
49 NTP_CONF_OPTS += --enable-ATOM
50 NTP_DEPENDENCIES += pps-tools
51 else
52 NTP_CONF_OPTS += --disable-ATOM
53 endif
55 ifeq ($(BR2_PACKAGE_NTP_NTP_SHM_CLK),y)
56 NTP_CONF_OPTS += --enable-SHM
57 else
58 NTP_CONF_OPTS += --disable-SHM
59 endif
61 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_KEYGEN) += util/ntp-keygen
62 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_WAIT) += scripts/ntp-wait/ntp-wait
63 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDATE) += ntpdate/ntpdate
64 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDC) += ntpdc/ntpdc
65 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPQ) += ntpq/ntpq
66 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPSNMPD) += ntpsnmpd/ntpsnmpd
67 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTIME) += util/ntptime
68 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTRACE) += scripts/ntptrace/ntptrace
69 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_SNTP) += sntp/sntp
70 NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_TICKADJ) += util/tickadj
72 define NTP_INSTALL_TARGET_CMDS
73 $(if $(BR2_PACKAGE_NTP_NTPD), install -m 755 $(@D)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd)
74 test -z "$(NTP_INSTALL_FILES_y)" || install -m 755 $(addprefix $(@D)/,$(NTP_INSTALL_FILES_y)) $(TARGET_DIR)/usr/bin/
75 $(INSTALL) -m 644 package/ntp/ntpd.etc.conf $(TARGET_DIR)/etc/ntp.conf
76 endef
78 ifeq ($(BR2_PACKAGE_NTP_NTPD),y)
79 define NTP_INSTALL_INIT_SYSV
80 $(INSTALL) -D -m 755 package/ntp/S49ntp $(TARGET_DIR)/etc/init.d/S49ntp
81 endef
83 define NTP_INSTALL_INIT_SYSTEMD
84 $(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service
85 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
86 ln -fs ../../../../usr/lib/systemd/system/ntpd.service \
87 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service
88 endef
89 endif
91 $(eval $(autotools-package))