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.

92 lines
2.4 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=syslog-ng
  3. PKG_VERSION:=3.17.2
  4. PKG_RELEASE:=2
  5. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  6. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  7. PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
  8. PKG_HASH:=73601f7ca13c6b534318d5b0648ec1833aa9ca0516d6c3f90085b090d548c50b
  9. PKG_INSTALL:=1
  10. include $(INCLUDE_DIR)/package.mk
  11. include $(INCLUDE_DIR)/nls.mk
  12. define Package/syslog-ng
  13. SECTION:=admin
  14. CATEGORY:=Administration
  15. DEPENDS:=+libpcre +glib2 +libopenssl +libuuid +libcurl
  16. TITLE:=A powerful syslog daemon
  17. URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
  18. endef
  19. define Package/syslog-ng/description
  20. syslog-ng reads and logs messages to the system console, log
  21. files, other machines and/or users as specified by its
  22. configuration file.
  23. endef
  24. define Package/syslog-ng/conffiles
  25. /etc/syslog-ng.conf
  26. /etc/syslog-ng.d/
  27. endef
  28. define Build/Configure
  29. $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure
  30. $(Build/Configure/Default)
  31. endef
  32. CONFIGURE_ARGS += \
  33. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  34. --disable-dependency-tracking \
  35. --disable-amqp \
  36. --disable-tcp-wrapper \
  37. --disable-glibtest \
  38. --disable-mongodb \
  39. --disable-java \
  40. --disable-json \
  41. --disable-python \
  42. --disable-spoof-source \
  43. --disable-sql \
  44. --disable-linux-caps \
  45. --disable-smtp \
  46. --disable-redis \
  47. --enable-prce \
  48. TARGET_CPPFLAGS += \
  49. -I$(STAGING_DIR)/usr/include/eventlog
  50. CONFIGURE_VARS += \
  51. LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
  52. define Package/syslog-ng/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(MAKE) -C $(PKG_BUILD_DIR) \
  55. install-sbinPROGRAMS install-libLTLIBRARIES \
  56. install-moduleLTLIBRARIES DESTDIR="$(1)"
  57. $(INSTALL_DIR) $(1)/etc/init.d
  58. $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
  59. $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
  60. $(INSTALL_DIR) $(1)/etc/syslog-ng.d/
  61. $(call libtool_remove_files,$(1))
  62. endef
  63. define Package/syslog-ng/prerm
  64. #!/bin/sh
  65. # check if we are on real system
  66. if [ -z "$${IPKG_INSTROOT}" ]; then
  67. # wish we had pidof unconditionally
  68. pid=$(ps | grep syslog | grep -v grep | awk '{ print $$1; }')
  69. [ -n "$$pid" ] && /etc/init.d/syslog-ng stop
  70. [ "$${PKG_UPGRADE}" != "1" ] && {
  71. echo "Removing rc.d symlink for syslog-ng"
  72. /etc/init.d/syslog-ng disable
  73. }
  74. fi
  75. exit 0
  76. endef
  77. $(eval $(call BuildPackage,syslog-ng))