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.

72 lines
1.9 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. PKG_CPE_ID:=cpe:/a:gentoo:logrotate
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/logrotate
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. DEPENDS:=+libpopt +LOGROTATE_ACL:libacl
  23. TITLE:=rotates, compresses, and mails system logs
  24. URL:=https://github.com/logrotate/logrotate
  25. MENU:=1
  26. endef
  27. define Package/logrotate/config
  28. if PACKAGE_logrotate
  29. config LOGROTATE_ACL
  30. bool
  31. prompt "Enable ACL support"
  32. default y if USE_FS_ACL_ATTR
  33. endif
  34. endef
  35. define Package/logrotate/description
  36. logrotate is designed to ease administration of systems that generate large
  37. numbers of log files. It allows auto-matic rotation, compression, removal and
  38. mailing of log files. Each log file may be handled daily, weekly, monthly or
  39. when it grows too large.
  40. endef
  41. define Package/logrotate/conffiles
  42. /etc/logrotate.conf
  43. endef
  44. CONFIGURE_ARGS += $(if $(CONFIG_LOGROTATE_ACL),--with,--without)-acl
  45. define Build/Compile
  46. $(call Build/Compile/Default, \
  47. RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  48. LDFLAGS="$(TARGET_LDFLAGS)" \
  49. logrotate \
  50. )
  51. endef
  52. define Package/logrotate/install
  53. $(INSTALL_DIR) $(1)/usr/sbin
  54. $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
  55. $(INSTALL_DIR) $(1)/etc
  56. $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/
  57. $(INSTALL_DIR) $(1)/etc/logrotate.d
  58. endef
  59. $(eval $(call BuildPackage,logrotate))