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.

121 lines
3.0 KiB

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