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.

74 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.17.0
  10. PKG_RELEASE:=1
  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:=58cc2178ff57faa3c0490181cce041345aeca6cff18dba1c5cd1398bf1c19294
  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 += \
  45. $(if $(CONFIG_LOGROTATE_ACL),--with,--without)-acl \
  46. --without-selinux
  47. define Build/Compile
  48. $(call Build/Compile/Default, \
  49. RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  50. LDFLAGS="$(TARGET_LDFLAGS)" \
  51. logrotate \
  52. )
  53. endef
  54. define Package/logrotate/install
  55. $(INSTALL_DIR) $(1)/usr/sbin
  56. $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
  57. $(INSTALL_DIR) $(1)/etc
  58. $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/
  59. $(INSTALL_DIR) $(1)/etc/logrotate.d
  60. endef
  61. $(eval $(call BuildPackage,logrotate))