[packages] syslog-ng3: set IPv6 support explicitly, rebuild when CONFIG_IPV6 is chang...
[packages.git] / admin / syslog-ng3 / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=syslog-ng
11 PKG_VERSION:=3.0.5
12 PKG_RELEASE:=2
13
14 PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/$(PKG_VERSION)/source/
15 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
16 PKG_MD5SUM:=28f0d9ff2243b330e8cd6311ef9b2f12
17
18 PKG_CONFIG_DEPENDS:= \
19         CONFIG_IPV6 \
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/syslog-ng3
24   SECTION:=admin
25   CATEGORY:=Administration
26   DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libwrap
27   TITLE:=A powerful syslog daemon
28   URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
29 endef
30
31 define Package/syslog-ng3/description
32   syslog-ng reads and logs messages to the system console, log
33   files, other machines and/or users as specified by its
34   configuration file.
35 endef
36
37 define Package/syslog-ng3/conffiles
38 /etc/syslog-ng.conf
39 endef
40
41 define Build/Configure
42         $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure
43         $(Build/Configure/Default)
44 endef
45
46 CONFIGURE_ARGS +=  \
47         $(call autoconf_bool,CONFIG_IPV6,ipv6) \
48         --disable-dependency-tracking \
49         --enable-tcp-wrapper \
50         --disable-glibtest \
51         --disable-spoof-source \
52         --disable-sql \
53         --enable-prce \
54         --disable-linux-caps \
55
56 TARGET_CPPFLAGS += \
57         -I$(STAGING_DIR)/usr/include/eventlog
58
59 TARGET_LDFLAGS += \
60         -L$(STAGING_DIR)/usr/lib/libintl/lib \
61         -L$(STAGING_DIR)/usr/lib/libiconv/lib
62
63 CONFIGURE_VARS += \
64         LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
65
66 define Package/syslog-ng3/install
67         $(INSTALL_DIR) $(1)/usr/sbin
68         $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/syslog-ng $(1)/usr/sbin/
69         $(INSTALL_DIR) $(1)/etc/init.d
70         $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
71         $(INSTALL_DIR) $(1)/etc
72         $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
73 endef
74
75 $(eval $(call BuildPackage,syslog-ng3))