diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-05-12 18:14:51 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-05-12 18:14:51 +0000 |
commit | 107455895ac98423235bae489e14da1a86548d7f (patch) | |
tree | 0c627081fec3405485d934626c98a5a174717eaa /rules/chrony.make | |
parent | cbaa65c878772a128c226ada69a374c449a95abc (diff) | |
download | ptxdist-107455895ac98423235bae489e14da1a86548d7f.tar.gz ptxdist-107455895ac98423235bae489e14da1a86548d7f.tar.xz |
[chrony] cleanups + remove select to readline
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@10496 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/chrony.make')
-rw-r--r-- | rules/chrony.make | 169 |
1 files changed, 50 insertions, 119 deletions
diff --git a/rules/chrony.make b/rules/chrony.make index 018a4f88b..7250c5634 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -2,6 +2,7 @@ # $Id: template 2680 2005-05-27 10:29:43Z rsc $ # # Copyright (C) 2005 by Bjoern Buerger <b.buerger@pengutronix.de> +# 2009 by Marc Kleine-Budde <mkl@pengutronix.de> # # See CREDITS for details about who has contributed to this project. # @@ -24,40 +25,18 @@ CHRONY_URL := http://chrony.sunsite.dk/download/$(CHRONY).$(CHRONY_SUFFIX) CHRONY_SOURCE := $(SRCDIR)/$(CHRONY).$(CHRONY_SUFFIX) CHRONY_DIR := $(BUILDDIR)/$(CHRONY) - # ---------------------------------------------------------------------------- # Get # ---------------------------------------------------------------------------- -chrony_get: $(STATEDIR)/chrony.get - -$(STATEDIR)/chrony.get: $(chrony_get_deps_default) - @$(call targetinfo, $@) - @$(call touch, $@) - $(CHRONY_SOURCE): - @$(call targetinfo, $@) + @$(call targetinfo) @$(call get, CHRONY) # ---------------------------------------------------------------------------- -# Extract -# ---------------------------------------------------------------------------- - -chrony_extract: $(STATEDIR)/chrony.extract - -$(STATEDIR)/chrony.extract: $(chrony_extract_deps_default) - @$(call targetinfo, $@) - @$(call clean, $(CHRONY_DIR)) - @$(call extract, CHRONY) - @$(call patchin, CHRONY) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- # Prepare # ---------------------------------------------------------------------------- -chrony_prepare: $(STATEDIR)/chrony.prepare - CHRONY_PATH := PATH=$(CROSS_PATH) CHRONY_ENV := $(CROSS_ENV) @@ -66,138 +45,90 @@ CHRONY_ENV := $(CROSS_ENV) # CHRONY_AUTOCONF := \ $(CROSS_AUTOCONF_USR) \ - --disable-readline - -$(STATEDIR)/chrony.prepare: $(chrony_prepare_deps_default) - @$(call targetinfo, $@) - @$(call clean, $(CHRONY_DIR)/config.cache) - cd $(CHRONY_DIR) && \ - $(CHRONY_PATH) $(CHRONY_ENV) \ - sh configure $(CHRONY_AUTOCONF) - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Compile -# ---------------------------------------------------------------------------- - -chrony_compile: $(STATEDIR)/chrony.compile - -$(STATEDIR)/chrony.compile: $(chrony_compile_deps_default) - @$(call targetinfo, $@) - cd $(CHRONY_DIR) && $(CHRONY_PATH) make - @$(call touch, $@) - -# ---------------------------------------------------------------------------- -# Install -# ---------------------------------------------------------------------------- - -chrony_install: $(STATEDIR)/chrony.install - -$(STATEDIR)/chrony.install: $(chrony_install_deps_default) - @$(call targetinfo, $@) - @$(call install, CHRONY) - @$(call touch, $@) + --disable readline # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- -chrony_targetinstall: $(STATEDIR)/chrony.targetinstall - -$(STATEDIR)/chrony.targetinstall: $(chrony_targetinstall_deps_default) - @$(call targetinfo, $@) +$(STATEDIR)/chrony.targetinstall: + @$(call targetinfo) @$(call install_init, chrony) @$(call install_fixup, chrony,PACKAGE,chrony) @$(call install_fixup, chrony,PRIORITY,optional) @$(call install_fixup, chrony,VERSION,$(CHRONY_VERSION)) @$(call install_fixup, chrony,SECTION,base) - @$(call install_fixup, chrony,AUTHOR,"PTXdist Base Package <ptxdist\@pengutronix.de>") + @$(call install_fixup, chrony,AUTHOR,"PTXdist Base Package <ptxdist@pengutronix.de>") @$(call install_fixup, chrony,DEPENDS,) @$(call install_fixup, chrony,DESCRIPTION,missing) -# --------------------------- -# install chrony binaries -# - @$(call install_copy, chrony, 0, 0, 0755, \ - $(CHRONY_DIR)/chronyd, \ +# binaries + @$(call install_copy, chrony, 0, 0, 0755, -, \ /usr/sbin/chronyd) - @$(call install_copy, chrony, 0, 0, 0755, \ - $(CHRONY_DIR)/chronyc, \ + @$(call install_copy, chrony, 0, 0, 0755, -, \ /usr/bin/chronyc) -# --------------------------- -# install chrony command helper script on demand -# +# command helper script +ifdef PTXCONF_CHRONY_INSTALL_CHRONY_COMMAND + @$(call install_copy, chrony, 0, 0, 0755, \ + $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_command, \ + /usr/bin/chrony_command) +endif ifdef PTXCONF_CHRONY_INSTALL_CHRONY_COMMAND - @$(call install_copy, chrony, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_command, \ - /usr/bin/chrony_command, n) + @$(call install_copy, chrony, 0, 0, 0755, \ + $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_command, \ + /usr/bin/chrony_command) endif -# --------------------------- -# generate a config file -# -ifdef PTXCONF_CHRONY_INSTALL_CONFIG +# chrony stat convenience wrapper +ifdef PTXCONF_CHRONY_INSTALL_CHRONY_STAT + @$(call install_copy, chrony, 0, 0, 0755, \ + $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_stat, \ + /usr/bin/chrony_stat) +endif + + +# generic one ifdef PTXCONF_CHRONY_DEFAULTCONFIG -# use generic one - @$(call install_copy, chrony, 0, 0, 0644, \ - $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.conf, \ - /etc/chrony/chrony.conf, n) - @$(call install_copy, chrony, 0, 0, 0600, \ - $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.keys, \ - /etc/chrony/chrony.keys, n) + @$(call install_copy, chrony, 0, 0, 0644, \ + $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.conf, \ + /etc/chrony/chrony.conf) + @$(call install_copy, chrony, 0, 0, 0600, \ + $(PTXDIST_TOPDIR)/generic/etc/chrony/chrony.keys, \ + /etc/chrony/chrony.keys) endif -ifdef PTXCONF_CHRONY_USERCONFIG + # users one - @$(call install_copy, chrony, 0, 0, 0644, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.conf, \ - /etc/chrony/chrony.conf, n) - @$(call install_copy, chrony, 0, 0, 0600, \ - $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.keys, \ - /etc/chrony/chrony.keys, n) +ifdef PTXCONF_CHRONY_USERCONFIG + @$(call install_copy, chrony, 0, 0, 0644, \ + $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.conf, \ + /etc/chrony/chrony.conf) + @$(call install_copy, chrony, 0, 0, 0600, \ + $(PTXDIST_WORKSPACE)/projectroot/etc/chrony/chrony.keys, \ + /etc/chrony/chrony.keys) endif + # modify placeholders with data from configuration +ifdef PTXCONF_CHRONY_INSTALL_CONFIG @$(call install_replace, chrony, /etc/chrony/chrony.conf, \ - @UNCONFIGURED_CHRONY_SERVER_IP@, $(PTXCONF_CHRONY_DEFAULT_NTP_SERVER) ) + @UNCONFIGURED_CHRONY_SERVER_IP@, $(PTXCONF_CHRONY_DEFAULT_NTP_SERVER)) @$(call install_replace, chrony, /etc/chrony/chrony.keys, \ - @UNCONFIGURED_CHRONY_ACCESS_KEY@, $(PTXCONF_CHRONY_DEFAULT_ACCESS_KEY) ) + @UNCONFIGURED_CHRONY_ACCESS_KEY@, $(PTXCONF_CHRONY_DEFAULT_ACCESS_KEY)) endif - # - # busybox init: startscripts - # - +# # +# # busybox init: startscripts +# # ifdef PTXCONF_INITMETHOD_BBINIT ifdef PTXCONF_CHRONY_STARTSCRIPT - @$(call install_alternative, chrony, 0, 0, 0755, /etc/init.d/chrony, n) + @$(call install_alternative, chrony, 0, 0, 0755, /etc/init.d/chrony) endif endif - - -# --------------------------- -# install chrony command helper script -# -ifdef PTXCONF_CHRONY_INSTALL_CHRONY_COMMAND - @$(call install_copy, chrony, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_command, \ - /usr/bin/chrony_command, n) -endif - -# --------------------------- -# install chrony stat convenience wrapper -# -ifdef PTXCONF_CHRONY_INSTALL_CHRONY_STAT - @$(call install_copy, chrony, 0, 0, 0755, \ - $(PTXDIST_TOPDIR)/generic/usr/bin/chrony_stat, \ - /usr/bin/chrony_stat, n) -endif - - @$(call install_finish, chrony) - @$(call touch, $@) + @$(call touch) # ---------------------------------------------------------------------------- # Clean |