]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/chrony/chrony.mk
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / package / chrony / chrony.mk
1 ################################################################################
2 #
3 # chrony
4 #
5 ################################################################################
6
7 CHRONY_VERSION = 3.2
8 CHRONY_SITE = http://download.tuxfamily.org/chrony
9 CHRONY_LICENSE = GPL-2.0
10 CHRONY_LICENSE_FILES = COPYING
11
12 CHRONY_CONF_OPTS = \
13         --host-system=Linux \
14         --host-machine=$(BR2_ARCH) \
15         --prefix=/usr \
16         --without-tomcrypt
17
18 ifeq ($(BR2_PACKAGE_LIBCAP),y)
19 CHRONY_DEPENDENCIES += libcap
20 else
21 CHRONY_CONF_OPTS += --without-libcap
22 endif
23
24 ifeq ($(BR2_PACKAGE_LIBNSS),y)
25 CHRONY_DEPENDENCIES += host-pkgconf libnss
26 else
27 CHRONY_CONF_OPTS += --without-nss
28 endif
29
30 ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
31 CHRONY_CONF_OPTS += --enable-scfilter
32 CHRONY_DEPENDENCIES += libseccomp
33 else
34 CHRONY_CONF_OPTS += --without-seccomp
35 endif
36
37 ifeq ($(BR2_PACKAGE_READLINE),y)
38 CHRONY_DEPENDENCIES += readline
39 else
40 CHRONY_CONF_OPTS += --disable-readline
41 endif
42
43 # If pps-tools is available, build it before so the package can use it
44 # (HAVE_SYS_TIMEPPS_H).
45 ifeq ($(BR2_PACKAGE_PPS_TOOLS),y)
46 CHRONY_DEPENDENCIES += pps-tools
47 endif
48
49 define CHRONY_CONFIGURE_CMDS
50         cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure $(CHRONY_CONF_OPTS)
51 endef
52
53 define CHRONY_BUILD_CMDS
54         $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
55 endef
56
57 define CHRONY_INSTALL_TARGET_CMDS
58         $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
59 endef
60
61 define CHRONY_INSTALL_INIT_SYSV
62         $(INSTALL) -D -m 755 package/chrony/S49chrony $(TARGET_DIR)/etc/init.d/S49chrony
63 endef
64
65 define CHRONY_INSTALL_INIT_SYSTEMD
66         $(INSTALL) -D -m 644 package/chrony/chrony.service \
67                 $(TARGET_DIR)/usr/lib/systemd/system/chrony.service
68         mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
69         ln -sf ../../../../usr/lib/systemd/system/chrony.service \
70                 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/chrony.service
71 endef
72
73 $(eval $(generic-package))