You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=logrotate
  9. PKG_VERSION:=3.10.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:= https://github.com/logrotate/logrotate/releases/download/$(PKG_VERSION)
  13. PKG_MD5SUM:=888f58caf07082c76f5dd39e5d30ec12
  14. PKG_LICENSE:=GPL-2.0
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/logrotate
  17. SECTION:=utils
  18. CATEGORY:=Utilities
  19. DEPENDS:=+libpopt
  20. TITLE:=rotates, compresses, and mails system logs
  21. URL:=https://github.com/logrotate/logrotate
  22. MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
  23. endef
  24. define Package/logrotate/description
  25. logrotate is designed to ease administration of systems that generate large
  26. numbers of log files. It allows auto-matic rotation, compression, removal and
  27. mailing of log files. Each log file may be handled daily, weekly, monthly or
  28. when it grows too large.
  29. endef
  30. define Package/logrotate/conffiles
  31. /etc/logrotate.conf
  32. endef
  33. CONFIGURE_ARGS += --with-acl=no
  34. EXTRA_CFLAGS += $(TARGET_CPPFLAGS) -Wno-nonnull-compare
  35. EXTRA_LDFLAGS += $(TARGET_LDFLAGS)
  36. define Build/Compile
  37. $(call Build/Compile/Default, \
  38. RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
  39. LDFLAGS="$(EXTRA_LDFLAGS)" \
  40. logrotate \
  41. )
  42. endef
  43. define Package/logrotate/install
  44. $(INSTALL_DIR) $(1)/usr/sbin
  45. $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
  46. $(INSTALL_DIR) $(1)/etc
  47. $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/
  48. $(INSTALL_DIR) $(1)/etc/logrotate.d
  49. endef
  50. $(eval $(call BuildPackage,logrotate))