python-pathvalidate: bump version to 0.14.1
[buildroot-gz.git] / package / chrony / chrony.mk
blobc3d48a78f85fad58edf9433ac62689dbef0e9dc4
1 ################################################################################
3 # chrony
5 ################################################################################
7 CHRONY_VERSION = 3.1
8 CHRONY_SITE = http://download.tuxfamily.org/chrony
9 CHRONY_LICENSE = GPLv2
10 CHRONY_LICENSE_FILES = COPYING
12 CHRONY_CONF_OPTS = \
13 --host-system=Linux \
14 --host-machine=$(BR2_ARCH) \
15 --prefix=/usr \
16 --without-seccomp \
17 --without-tomcrypt
19 ifeq ($(BR2_PACKAGE_LIBCAP),y)
20 CHRONY_DEPENDENCIES += libcap
21 else
22 CHRONY_CONF_OPTS += --without-libcap
23 endif
25 ifeq ($(BR2_PACKAGE_LIBNSS),y)
26 CHRONY_DEPENDENCIES += host-pkgconf libnss
27 else
28 CHRONY_CONF_OPTS += --without-nss
29 endif
31 ifeq ($(BR2_PACKAGE_READLINE),y)
32 CHRONY_DEPENDENCIES += readline
33 else
34 CHRONY_CONF_OPTS += --disable-readline
35 endif
37 # If pps-tools is available, build it before so the package can use it
38 # (HAVE_SYS_TIMEPPS_H).
39 ifeq ($(BR2_PACKAGE_PPS_TOOLS),y)
40 CHRONY_DEPENDENCIES += pps-tools
41 endif
43 define CHRONY_CONFIGURE_CMDS
44 cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure $(CHRONY_CONF_OPTS)
45 endef
47 define CHRONY_BUILD_CMDS
48 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
49 endef
51 define CHRONY_INSTALL_TARGET_CMDS
52 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
53 endef
55 define CHRONY_INSTALL_INIT_SYSV
56 $(INSTALL) -D -m 755 package/chrony/S49chrony $(TARGET_DIR)/etc/init.d/S49chrony
57 endef
59 define CHRONY_INSTALL_INIT_SYSTEMD
60 $(INSTALL) -D -m 644 package/chrony/chrony.service \
61 $(TARGET_DIR)/usr/lib/systemd/system/chrony.service
62 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
63 ln -sf ../../../../usr/lib/systemd/system/chrony.service \
64 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/chrony.service
65 endef
67 $(eval $(generic-package))