Fix syslog-ng build and cleanup Makefile.
[openwrt/svn-archive/archive.git] / admin / syslog-ng / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=syslog-ng
12 PKG_VERSION:=1.6.12
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=a3cbfdb6e1e5beea181a7349749719f3
15
16 PKG_SOURCE_URL:= \
17 http://www.balabit.com/downloads/files/syslog-ng/sources/1.6/src \
18 http://www.balabit.com/downloads/files/syslog-ng/stable/src
19 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/syslog-ng
24 SECTION:=admin
25 CATEGORY:=Administration
26 DEPENDS:=+libol
27 TITLE:=A powerful syslog daemon
28 URL:=http://www.balabit.com/products/syslog_ng/
29 endef
30
31 define Package/syslog-ng/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-ng/conffiles
38 /etc/syslog-ng/syslog-ng.conf
39 endef
40
41 define Build/Configure
42 $(call Build/Configure/Default, \
43 --disable-dependency-tracking \
44 --disable-full-static \
45 --enable-tcp-wrapper \
46 --with-libol="$(STAGING_DIR)/host/bin" \
47 , \
48 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/libol" \
49 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libol" \
50 )
51 endef
52
53 define Build/Compile
54 $(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" all install)
55 endef
56
57 define Package/syslog-ng/install
58 $(INSTALL_DIR) $(1)/usr/sbin
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/syslog-ng $(1)/usr/sbin/
60 $(INSTALL_DIR) $(1)/etc/init.d
61 $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
62 $(INSTALL_DIR) $(1)/etc/syslog-ng
63 $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc/syslog-ng/
64 endef
65
66 $(eval $(call BuildPackage,syslog-ng))