logrotate: convert to gentargets and bump to 3.7.9
[Peter: pass LDFLAGS, remove manpages, get rid _BINARY vars only used once] Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
231449e1d5
commit
f09275968c
8
CHANGES
8
CHANGES
@ -24,10 +24,10 @@
|
|||||||
iproute2, iptables, jpeg, kexec, kismet, less, libcurl,
|
iproute2, iptables, jpeg, kexec, kismet, less, libcurl,
|
||||||
libdnet, libevent, libglade, libgtk2, libiconv, libidn,
|
libdnet, libevent, libglade, libgtk2, libiconv, libidn,
|
||||||
libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
|
libmms, libnl, liboil, libpcap, libpng, libungif, libxml2,
|
||||||
libxslt, lighttpd, lite, m4, mdadm, metacity, mtd-utils,
|
libxslt, lighttpd, lite, logrotate, m4, mdadm, metacity,
|
||||||
mysql_client, nano, nbd, ncftp, neon, netperf, ntfsprogs, ntp,
|
mtd-utils, mysql_client, nano, nbd, ncftp, neon, netperf,
|
||||||
openntpd, openssh, openvpn, oprofile, pango, pcre, php,
|
ntfsprogs, ntp, openntpd, openssh, openvpn, oprofile, pango,
|
||||||
prboom, radvd, qt, samba, sdl_mixer, sdl_sound,
|
pcre, php, prboom, radvd, qt, samba, sdl_mixer, sdl_sound,
|
||||||
shared-mime-info, speex, sqlite, squashfs, strace, taglib,
|
shared-mime-info, speex, sqlite, squashfs, strace, taglib,
|
||||||
tcpdump, tiff, tn5250, udev, udpcast, usbmount, usbutils,
|
tcpdump, tiff, tn5250, udev, udpcast, usbmount, usbutils,
|
||||||
which, xlib_libX11, zlib
|
which, xlib_libX11, zlib
|
||||||
|
@ -1,42 +1,36 @@
|
|||||||
LOGROTATE_VERSION:=3.7.7
|
#############################################################
|
||||||
LOGROTATE_SOURCE:=logrotate-$(LOGROTATE_VERSION).tar.gz
|
#
|
||||||
LOGROTATE_SITE:=https://fedorahosted.org/releases/l/o/logrotate/
|
# logrotate
|
||||||
LOGROTATE_DIR:=$(BUILD_DIR)/logrotate-$(LOGROTATE_VERSION)
|
#
|
||||||
LOGROTATE_BINARY:=logrotate
|
#############################################################
|
||||||
LOGROTATE_TARGET_BINARY:=usr/sbin/$(LOGROTATE_BINARY)
|
LOGROTATE_VERSION = 3.7.9
|
||||||
|
LOGROTATE_SOURCE = logrotate-$(LOGROTATE_VERSION).tar.gz
|
||||||
|
LOGROTATE_SITE = https://fedorahosted.org/releases/l/o/logrotate/
|
||||||
|
|
||||||
$(DL_DIR)/$(LOGROTATE_SOURCE):
|
LOGROTATE_DEPENDENCIES = popt
|
||||||
$(call DOWNLOAD,$(LOGROTATE_SITE),$(LOGROTATE_SOURCE))
|
|
||||||
|
|
||||||
$(LOGROTATE_DIR)/.source: $(DL_DIR)/$(LOGROTATE_SOURCE)
|
define LOGROTATE_BUILD_CMDS
|
||||||
$(ZCAT) $(DL_DIR)/$(LOGROTATE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
$(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" LDFLAGS="$(LDFLAGS)" -C $(@D)
|
||||||
toolchain/patch-kernel.sh $(LOGROTATE_DIR) package/logrotate/ logrotate\*.patch
|
endef
|
||||||
touch $@
|
|
||||||
|
|
||||||
$(LOGROTATE_DIR)/$(LOGROTATE_BINARY): $(LOGROTATE_DIR)/.source
|
define LOGROTATE_INSTALL_TARGET_CMDS
|
||||||
$(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" -C $(LOGROTATE_DIR)
|
$(MAKE) PREFIX=$(TARGET_DIR) -C $(@D) install
|
||||||
|
|
||||||
$(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY): $(LOGROTATE_DIR)/$(LOGROTATE_BINARY)
|
|
||||||
$(MAKE) PREFIX=$(TARGET_DIR) -C $(LOGROTATE_DIR) install
|
|
||||||
if [ ! -f $(TARGET_DIR)/etc/logrotate.conf ]; then \
|
if [ ! -f $(TARGET_DIR)/etc/logrotate.conf ]; then \
|
||||||
$(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf; \
|
$(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf; \
|
||||||
fi
|
fi
|
||||||
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d
|
||||||
|
endef
|
||||||
|
|
||||||
logrotate: popt $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
|
define LOGROTATE_UNINSTALL_TARGET_CMDS
|
||||||
|
rm -f $(TARGET_DIR)/usr/sbin/logrotate
|
||||||
logrotate-source: $(DL_DIR)/$(LOGROTATE_SOURCE)
|
|
||||||
|
|
||||||
logrotate-clean:
|
|
||||||
rm -f $(TARGET_DIR)/$(LOGROTATE_TARGET_BINARY)
|
|
||||||
rm -f $(TARGET_DIR)/etc/logrotate.conf
|
rm -f $(TARGET_DIR)/etc/logrotate.conf
|
||||||
-rmdir $(TARGET_DIR)/etc/logrotate.d
|
rm -f $(TARGET_DIR)/usr/man/man5/logrotate.conf.5
|
||||||
-$(MAKE) -C $(LOGROTATE_DIR) clean
|
rm -f $(TARGET_DIR)/usr/man/man8/logrotate.8
|
||||||
|
rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/etc/logrotate.d
|
||||||
|
endef
|
||||||
|
|
||||||
logrotate-dirclean:
|
define LOGROTATE_CLEAN_CMDS
|
||||||
rm -rf $(LOGROTATE_DIR)
|
-$(MAKE) -C $(@D) clean
|
||||||
|
endef
|
||||||
ifeq ($(BR2_PACKAGE_LOGROTATE),y)
|
|
||||||
TARGETS+=logrotate
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
$(eval $(call GENTARGETS,package,logrotate))
|
||||||
|
Loading…
Reference in New Issue
Block a user