diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2006-09-04 15:32:20 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2006-09-04 15:32:20 +0000 |
commit | d63777b8d7086b05d221ebc49d981bd389f119ac (patch) | |
tree | 5864e91e3a79f9039ef2e8f5daa7a70a6fb710aa | |
parent | 5e885921d271407ba1e284d152cdc7c2163bafae (diff) | |
download | ptxdist-d63777b8d7086b05d221ebc49d981bd389f119ac.tar.gz ptxdist-d63777b8d7086b05d221ebc49d981bd389f119ac.tar.xz |
* logrotate.in, logrotate.make, Kconfig:
ported from 0.9-trunk
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6029 33e552b5-05e3-0310-8538-816dae2090ed
-rw-r--r-- | rules/Kconfig | 1 | ||||
-rw-r--r-- | rules/logrotate.in | 12 | ||||
-rw-r--r-- | rules/logrotate.make | 123 |
3 files changed, 136 insertions, 0 deletions
diff --git a/rules/Kconfig b/rules/Kconfig index 0da6ef6e6..82e762bf7 100644 --- a/rules/Kconfig +++ b/rules/Kconfig @@ -94,6 +94,7 @@ source "rules/grub.in" source "rules/hdparm.in" source "rules/ipkg.in" source "rules/lilo.in" +source "rules/logrotate.in" source "rules/cramfs.in" source "rules/bonniexx.in" source "rules/liblockfile.in" diff --git a/rules/logrotate.in b/rules/logrotate.in new file mode 100644 index 000000000..1f66a1996 --- /dev/null +++ b/rules/logrotate.in @@ -0,0 +1,12 @@ +config LOGROTATE + bool + prompt "logrotate " + select LIBPOPT + help + The logrotate utility is designed to simplify the + administration of log files on a system which generates a lot + of log files. Logrotate allows for the automatic rotation + compression, removal and mailing of log files. Logrotate can + be set to handle a log file daily, weekly, monthly or when the + log file gets to a certain size. Normally, logrotate runs as + a daily cron job. diff --git a/rules/logrotate.make b/rules/logrotate.make new file mode 100644 index 000000000..02aafeaf5 --- /dev/null +++ b/rules/logrotate.make @@ -0,0 +1,123 @@ +# -*-makefile-*- +# $Id: template 6001 2006-08-12 10:15:00Z mkl $ +# +# Copyright (C) 2006 by Marc Kleine-Budde <mkl@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_LOGROTATE) += logrotate + +# +# Paths and names +# +LOGROTATE_VERSION := 3.7.1 +LOGROTATE := logrotate-$(LOGROTATE_VERSION) +LOGROTATE_SUFFIX := tar.gz +LOGROTATE_URL := http://www.pengutronix.de/software/ptxdist/temporary-src/$(LOGROTATE).$(LOGROTATE_SUFFIX) +LOGROTATE_SOURCE := $(SRCDIR)/$(LOGROTATE).$(LOGROTATE_SUFFIX) +LOGROTATE_DIR := $(BUILDDIR)/$(LOGROTATE) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +logrotate_get: $(STATEDIR)/logrotate.get + +$(STATEDIR)/logrotate.get: $(logrotate_get_deps_default) + @$(call targetinfo, $@) + @$(call touch, $@) + +$(LOGROTATE_SOURCE): + @$(call targetinfo, $@) + @$(call get, LOGROTATE) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +logrotate_extract: $(STATEDIR)/logrotate.extract + +$(STATEDIR)/logrotate.extract: $(logrotate_extract_deps_default) + @$(call targetinfo, $@) + @$(call clean, $(LOGROTATE_DIR)) + @$(call extract, LOGROTATE) + @$(call patchin, LOGROTATE) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +logrotate_prepare: $(STATEDIR)/logrotate.prepare + +LOGROTATE_PATH := PATH=$(CROSS_PATH) +LOGROTATE_ENV := $(CROSS_ENV) RPM_OPT_FLAGS='$(strip $(CROSS_CPPFLAGS))' + +LOGRORATE_MAKEVARS := OS_NAME=Linux LFS=-D_FILE_OFFSET_BITS=64 + +$(STATEDIR)/logrotate.prepare: $(logrotate_prepare_deps_default) + @$(call targetinfo, $@) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +logrotate_compile: $(STATEDIR)/logrotate.compile + +$(STATEDIR)/logrotate.compile: $(logrotate_compile_deps_default) + @$(call targetinfo, $@) + cd $(LOGROTATE_DIR) && $(LOGROTATE_ENV) $(LOGROTATE_PATH) $(MAKE) $(LOGRORATE_MAKEVARS) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +logrotate_install: $(STATEDIR)/logrotate.install + +$(STATEDIR)/logrotate.install: $(logrotate_install_deps_default) + @$(call targetinfo, $@) + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +logrotate_targetinstall: $(STATEDIR)/logrotate.targetinstall + +$(STATEDIR)/logrotate.targetinstall: $(logrotate_targetinstall_deps_default) + @$(call targetinfo, $@) + + @$(call install_init, logrotate) + @$(call install_fixup,logrotate,PACKAGE,logrotate) + @$(call install_fixup,logrotate,PRIORITY,optional) + @$(call install_fixup,logrotate,VERSION,$(LOGROTATE_VERSION)) + @$(call install_fixup,logrotate,SECTION,base) + @$(call install_fixup,logrotate,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>") + @$(call install_fixup,logrotate,DEPENDS,) + @$(call install_fixup,logrotate,DESCRIPTION,missing) + + @$(call install_copy, logrotate, 0, 0, 0755, $(LOGROTATE_DIR)/logrotate, /usr/sbin/logrotate) + + @$(call install_finish,logrotate) + + @$(call touch, $@) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +logrotate_clean: + rm -rf $(STATEDIR)/logrotate.* + rm -rf $(IMAGEDIR)/logrotate_* + rm -rf $(LOGROTATE_DIR) + +# vim: syntax=make |