2008-10-06 22:41:12 +02:00
|
|
|
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):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(LOGROTATE_SITE),$(LOGROTATE_SOURCE))
|
2008-10-06 22:41:12 +02:00
|
|
|
|
|
|
|
$(LOGROTATE_DIR)/.source: $(DL_DIR)/$(LOGROTATE_SOURCE)
|
|
|
|
$(ZCAT) $(DL_DIR)/$(LOGROTATE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2009-03-05 20:00:11 +01:00
|
|
|
toolchain/patch-kernel.sh $(LOGROTATE_DIR) package/logrotate/ logrotate\*.patch
|
2008-10-06 22:41:12 +02:00
|
|
|
touch $@
|
|
|
|
|
|
|
|
$(LOGROTATE_DIR)/$(LOGROTATE_BINARY): $(LOGROTATE_DIR)/.source
|
2009-03-05 17:42:14 +01:00
|
|
|
$(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" -C $(LOGROTATE_DIR)
|
2008-10-06 22:41:12 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY): $(LOGROTATE_DIR)/$(LOGROTATE_BINARY)
|
|
|
|
$(MAKE) PREFIX=$(TARGET_DIR) -C $(LOGROTATE_DIR) install
|
2009-03-07 21:17:23 +01:00
|
|
|
if [ ! -f $(TARGET_DIR)/etc/logrotate.conf ]; then \
|
|
|
|
$(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf; \
|
2009-03-05 20:00:17 +01:00
|
|
|
fi
|
2008-10-06 22:41:12 +02:00
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
|
|
|
|
|
2008-10-07 19:08:25 +02:00
|
|
|
logrotate: popt $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
|
2008-10-06 22:41:12 +02:00
|
|
|
|
|
|
|
logrotate-source: $(DL_DIR)/$(LOGROTATE_SOURCE)
|
|
|
|
|
|
|
|
logrotate-clean:
|
|
|
|
rm -f $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
|
2008-10-07 19:08:25 +02:00
|
|
|
rm -f $(TARGET_DIR)/etc/logrotate.conf
|
|
|
|
-rmdir $(TARGET_DIR)/etc/logrotate.d
|
2008-10-06 22:41:12 +02:00
|
|
|
-$(MAKE) -C $(LOGROTATE_DIR) clean
|
|
|
|
|
|
|
|
logrotate-dirclean:
|
2008-10-07 19:08:25 +02:00
|
|
|
rm -rf $(LOGROTATE_DIR)
|
2008-10-06 22:41:12 +02:00
|
|
|
|
2008-10-07 19:08:25 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LOGROTATE),y)
|
2008-10-06 22:41:12 +02:00
|
|
|
TARGETS+=logrotate
|
|
|
|
endif
|
|
|
|
|