rsyslog: preserve existing configuration
[feed/packages.git] / admin / rsyslog / Makefile
1 #
2 # Copyright (C) 2006-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=rsyslog
11 PKG_VERSION:=8.2110.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:= \
16 https://fossies.org/linux/misc \
17 https://www.rsyslog.com/files/download/rsyslog
18 PKG_HASH:=3f904ec137ca6412e8273f7896d962ecb589f7d0c589bdf16b1709ec27e24f31
19
20 PKG_MAINTAINER:=
21 PKG_LICENSE:=GPL-3.0-or-later
22 PKG_LICENSE_FILES:=COPYING
23 PKG_CPE_ID:=cpe:/a:rsyslog:rsyslog
24
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/rsyslog
31 SECTION:=admin
32 CATEGORY:=Administration
33 TITLE:=Enhanced system logging and kernel message trapping daemons
34 URL:=https://www.rsyslog.com/
35 DEPENDS:= \
36 +RSYSLOG_gssapi_krb5:krb5-libs +RSYSLOG_elasticsearch:libcurl \
37 +RSYSLOG_libdbi:libdbi +libestr +libfastjson +RSYSLOG_gnutls:libgnutls \
38 +RSYSLOG_mmdblookup:libmaxminddb +RSYSLOG_mysql:libmysqlclient \
39 +RSYSLOG_omhttp:libcurl +RSYSLOG_openssl:libopenssl \
40 +RSYSLOG_pgsql:libpq +libuuid +zlib
41 MENU:=1
42 endef
43
44 define Package/rsyslog/conffiles
45 /etc/rsyslog.conf
46 endef
47
48 CONFIGURE_ARGS+= \
49 --disable-libgcrypt \
50 --disable-fmhttp \
51 --disable-default-tests \
52 --disable-libsystemd \
53 $(if $(CONFIG_RSYSLOG_gssapi_krb5),--enable-gssapi-krb5) \
54 $(if $(CONFIG_RSYSLOG_mysql),--enable-mysql) \
55 $(if $(CONFIG_RSYSLOG_pgsql),--enable-pgsql) \
56 $(if $(CONFIG_RSYSLOG_libdbi),--enable-libdbi) \
57 $(if $(CONFIG_RSYSLOG_elasticsearch),--enable-elasticsearch) \
58 $(if $(CONFIG_RSYSLOG_omhttp),--enable-omhttp) \
59 $(if $(CONFIG_RSYSLOG_openssl),--enable-openssl) \
60 $(if $(CONFIG_RSYSLOG_gnutls),--enable-gnutls) \
61 $(if $(CONFIG_RSYSLOG_mail),--enable-mail) \
62 $(if $(CONFIG_RSYSLOG_mmjsonparse),--enable-mmjsonparse) \
63 $(if $(CONFIG_RSYSLOG_mmdblookup),--enable-mmdblookup) \
64 $(if $(CONFIG_RSYSLOG_imfile),--enable-imfile)
65
66 define Package/rsyslog/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rsyslogd $(1)/usr/sbin/
69 $(INSTALL_DIR) $(1)/usr/lib/rsyslog
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/rsyslog/* $(1)/usr/lib/rsyslog/
71 $(INSTALL_DIR) $(1)/etc
72 $(INSTALL_CONF) ./files/rsyslog.conf $(1)/etc
73 $(INSTALL_DIR) $(1)/etc/init.d
74 $(INSTALL_BIN) ./files/rsyslog.init $(1)/etc/init.d/rsyslog
75 $(INSTALL_DIR) $(1)/etc/uci-defaults
76 $(INSTALL_CONF) ./files/20_rsyslog $(1)/etc/uci-defaults
77 endef
78
79 define Package/rsyslog/config
80 source "$(SOURCE)/Config.in"
81 endef
82
83 $(eval $(call BuildPackage,rsyslog))