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.

71 lines
1.8 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.15.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:= https://github.com/logrotate/logrotate/releases/download/$(PKG_VERSION)
  13. PKG_HASH:=313612c4776a305393454c874ef590d8acf84c9ffa648717731dfe902284ff8f
  14. PKG_MAINTAINER:=Christian Beier <cb@shoutrlabs.com>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/logrotate
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. DEPENDS:=+libpopt +LOGROTATE_ACL:libacl
  22. TITLE:=rotates, compresses, and mails system logs
  23. URL:=https://github.com/logrotate/logrotate
  24. MENU:=1
  25. endef
  26. define Package/logrotate/config
  27. if PACKAGE_logrotate
  28. config LOGROTATE_ACL
  29. bool
  30. prompt "Enable ACL support"
  31. default y if USE_FS_ACL_ATTR
  32. endif
  33. endef
  34. define Package/logrotate/description
  35. logrotate is designed to ease administration of systems that generate large
  36. numbers of log files. It allows auto-matic rotation, compression, removal and
  37. mailing of log files. Each log file may be handled daily, weekly, monthly or
  38. when it grows too large.
  39. endef
  40. define Package/logrotate/conffiles
  41. /etc/logrotate.conf
  42. endef
  43. CONFIGURE_ARGS += $(if $(CONFIG_LOGROTATE_ACL),--with,--without)-acl
  44. define Build/Compile
  45. $(call Build/Compile/Default, \
  46. RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  47. LDFLAGS="$(TARGET_LDFLAGS)" \
  48. logrotate \
  49. )
  50. endef
  51. define Package/logrotate/install
  52. $(INSTALL_DIR) $(1)/usr/sbin
  53. $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
  54. $(INSTALL_DIR) $(1)/etc
  55. $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/
  56. $(INSTALL_DIR) $(1)/etc/logrotate.d
  57. endef
  58. $(eval $(call BuildPackage,logrotate))