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.

60 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:=1
  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. EXTRA_CFLAGS += $(TARGET_CPPFLAGS) -Wno-nonnull-compare
  34. EXTRA_LDFLAGS += $(TARGET_LDFLAGS)
  35. define Build/Compile
  36. $(call Build/Compile/Default, \
  37. RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
  38. LDFLAGS="$(EXTRA_LDFLAGS)" \
  39. logrotate \
  40. )
  41. endef
  42. define Package/logrotate/install
  43. $(INSTALL_DIR) $(1)/usr/sbin
  44. $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/
  45. $(INSTALL_DIR) $(1)/etc
  46. $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/
  47. $(INSTALL_DIR) $(1)/etc/logrotate.d
  48. endef
  49. $(eval $(call BuildPackage,logrotate))