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.

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