summaryrefslogtreecommitdiffstats
path: root/package/logrotate/logrotate.mk
diff options
context:
space:
mode:
authorWade Berrier <wberrier@gmail.com>2008-10-06 20:41:12 +0000
committerWade Berrier <wberrier@gmail.com>2008-10-06 20:41:12 +0000
commitb8508d758e8212df8e517089bccad3302966ed29 (patch)
tree0bc88b8c6ee626fb114d98a7a77962f96fbbba3a /package/logrotate/logrotate.mk
parent3916f9ef4a2c6d074f2c9b0d1d4623c8b06003f0 (diff)
downloadbuildroot-novena-b8508d758e8212df8e517089bccad3302966ed29.tar.gz
buildroot-novena-b8508d758e8212df8e517089bccad3302966ed29.zip
logrotate:
-new package
Diffstat (limited to 'package/logrotate/logrotate.mk')
-rw-r--r--package/logrotate/logrotate.mk38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/logrotate/logrotate.mk b/package/logrotate/logrotate.mk
new file mode 100644
index 000000000..37097a833
--- /dev/null
+++ b/package/logrotate/logrotate.mk
@@ -0,0 +1,38 @@
+LOGROTATE_VERSION:=3.7.7
+LOGROTATE_SOURCE:=logrotate-$(LOGROTATE_VERSION).tar.gz
+LOGROTATE_SITE:=https://fedorahosted.org/releases/l/o/logrotate/
+LOGROTATE_DIR:=$(BUILD_DIR)/logrotate-$(LOGROTATE_VERSION)
+LOGROTATE_BINARY:=logrotate
+LOGROTATE_TARGET_BINARY:=usr/sbin/$(LOGROTATE_BINARY)
+
+$(DL_DIR)/$(LOGROTATE_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LOGROTATE_SITE)/$(LOGROTATE_SOURCE)
+
+$(LOGROTATE_DIR)/.source: $(DL_DIR)/$(LOGROTATE_SOURCE)
+ $(ZCAT) $(DL_DIR)/$(LOGROTATE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(LOGROTATE_DIR) package/logrotate/ *.patch
+ touch $@
+
+$(LOGROTATE_DIR)/$(LOGROTATE_BINARY): $(LOGROTATE_DIR)/.source
+ $(MAKE) CC=$(TARGET_CC) -C $(LOGROTATE_DIR)
+
+$(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY): $(LOGROTATE_DIR)/$(LOGROTATE_BINARY)
+ $(MAKE) PREFIX=$(TARGET_DIR) -C $(LOGROTATE_DIR) install
+ $(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf
+ $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
+
+logrotate: uclibc busybox popt $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
+
+logrotate-source: $(DL_DIR)/$(LOGROTATE_SOURCE)
+
+logrotate-clean:
+ rm -f $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
+ -$(MAKE) -C $(LOGROTATE_DIR) clean
+
+logrotate-dirclean:
+ rm -Rf $(LOGROTATE_DIR)
+
+ifeq ($(strip $(BR2_PACKAGE_LOGROTATE)),y)
+TARGETS+=logrotate
+endif
+