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.

114 lines
2.8 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=syslog-ng
  3. PKG_VERSION:=3.33.2
  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:=0b786a06077b9150191d714f45a1b4b3792952cb58163a3af336f074da9fb14b
  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. TITLE:=A powerful syslog daemon
  22. URL:=https://www.syslog-ng.com/products/open-source-log-management/
  23. DEPENDS:=+libpcre +glib2 +libopenssl +libpthread +librt +zlib +libdbi +libjson-c +libcurl +libuuid
  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. --disable-afsnmp \
  41. $(call autoconf_bool,CONFIG_IPV6,ipv6) \
  42. --disable-tcp-wrapper \
  43. --disable-spoof-source \
  44. --disable-sql \
  45. --disable-linux-caps \
  46. --with-jsonc=system \
  47. --enable-json=yes \
  48. --enable-http=yes \
  49. --disable-smtp \
  50. --disable-mqtt \
  51. --disable-redis \
  52. --disable-dependency-tracking \
  53. --disable-python \
  54. --disable-geoip2 \
  55. --disable-java \
  56. --disable-java-modules \
  57. --with-librabbitmq-client=no \
  58. --with-mongoc=no
  59. CONFIGURE_VARS += \
  60. LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
  61. define Package/syslog-ng/install
  62. cd $(PKG_BUILD_DIR); make DESTDIR=$(1) install
  63. $(call libtool_remove_files,$(1)) # This removes .la files in folder (including subfolders) /usr/lib
  64. rm -rf $(1)/usr/lib/pkgconfig \
  65. $(1)/usr/lib/*.a \
  66. $(1)/usr/include \
  67. $(1)/var
  68. $(INSTALL_DIR) $(1)/etc/init.d
  69. $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
  70. $(INSTALL_DIR) $(1)/etc/syslog-ng.d
  71. $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
  72. touch $(1)/etc/syslog-ng.d/.keep
  73. $(INSTALL_DIR) $(1)/sbin
  74. $(INSTALL_BIN) ./files/logread $(1)/sbin
  75. $(INSTALL_DIR) $(1)/usr/share/syslog-ng/include/
  76. $(CP) -r ./files/scl $(1)/usr/share/syslog-ng/include/
  77. endef
  78. define Package/syslog-ng/postinst
  79. #!/bin/sh
  80. [ -n "$$IPKG_INSTROOT" ] || {
  81. /etc/init.d/syslog-ng enable
  82. /etc/init.d/syslog-ng restart
  83. }
  84. endef
  85. define Package/syslog-ng/prerm
  86. #!/bin/sh
  87. [ -n "$$IPKG_INSTROOT" ] || {
  88. /etc/init.d/syslog-ng disable
  89. /etc/init.d/syslog-ng stop
  90. }
  91. endef
  92. $(eval $(call BuildPackage,syslog-ng))