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.

108 lines
2.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=syslog-ng
  3. PKG_VERSION:=3.21.1
  4. PKG_RELEASE:=2
  5. PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
  6. PKG_LICENSE:=LGPL-2.1+
  7. PKG_LICENSE_FILES:=COPYING
  8. PKG_CPE_ID:=cpe:/a:balabit:syslog-ng
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
  11. PKG_HASH:=8d163da5ad79cf3a5f043b2ed0fe18a4888d0d740542703bf2508f0b9996cd25
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_INSTALL:=1
  14. PKG_CONFIG_DEPENDS:= \
  15. CONFIG_IPV6 \
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/nls.mk
  18. define Package/syslog-ng
  19. SECTION:=admin
  20. CATEGORY:=Administration
  21. DEPENDS:=+libpcre +glib2 +libopenssl +libpthread +librt +zlib +libdbi +libjson-c +libcurl +libuuid
  22. TITLE:=A powerful syslog daemon
  23. URL:=https://www.syslog-ng.com/products/open-source-log-management/
  24. endef
  25. define Package/syslog-ng/description
  26. syslog-ng reads and logs messages to the system console, log
  27. files, other machines and/or users as specified by its
  28. configuration file.
  29. endef
  30. define Package/syslog-ng/conffiles
  31. /etc/syslog-ng.conf
  32. /etc/syslog-ng.d/
  33. /etc/scl.conf
  34. endef
  35. define Build/Configure
  36. $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure
  37. $(Build/Configure/Default)
  38. endef
  39. CONFIGURE_ARGS += \
  40. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  41. --disable-tcp-wrapper \
  42. --disable-spoof-source \
  43. --disable-sql \
  44. --disable-linux-caps \
  45. --with-jsonc=system \
  46. --enable-json=yes \
  47. --enable-http=yes \
  48. --disable-smtp \
  49. --disable-redis \
  50. --disable-dependency-tracking \
  51. --disable-python \
  52. --disable-geoip2 \
  53. --disable-java \
  54. --disable-java-modules \
  55. --with-librabbitmq-client=no \
  56. --with-mongoc=no
  57. CONFIGURE_VARS += \
  58. LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
  59. define Package/syslog-ng/install
  60. cd $(PKG_BUILD_DIR); make DESTDIR=$(1) install
  61. $(call libtool_remove_files,$(1)) # This removes .la files in folder (including subfolders) /usr/lib
  62. rm -rf $(1)/usr/lib/pkgconfig \
  63. $(1)/usr/lib/*.a \
  64. $(1)/usr/include \
  65. $(1)/var
  66. $(INSTALL_DIR) $(1)/etc/init.d
  67. $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
  68. $(INSTALL_DIR) $(1)/etc/syslog-ng.d
  69. $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
  70. touch $(1)/etc/syslog-ng.d/.keep
  71. $(INSTALL_BIN) ./files/logread $(1)/usr/sbin
  72. endef
  73. define Package/syslog-ng/postinst
  74. #!/bin/sh
  75. [ -n "$$IPKG_INSTROOT" ] || {
  76. /etc/init.d/syslog-ng enable
  77. /etc/init.d/syslog-ng restart
  78. }
  79. endef
  80. define Package/syslog-ng/prerm
  81. #!/bin/sh
  82. [ -n "$$IPKG_INSTROOT" ] || {
  83. /etc/init.d/syslog-ng disable
  84. /etc/init.d/syslog-ng stop
  85. }
  86. endef
  87. $(eval $(call BuildPackage,syslog-ng))