[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[openwrt/svn-archive/archive.git] / libs / libnids / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=libnids
11 PKG_VERSION:=1.18
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.packetfactory.net/projects/libnids/dist/
16 PKG_MD5SUM:=9ee6dcdfac97bae6fe611aa27d2594a5
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libnids
21 SECTION:=libs
22 CATEGORY:=Libraries
23 DEPENDS:=+libnet0
24 TITLE:=A network intrusion detection library
25 URL:=http://www.packetfactory.net/projects/libnids/
26 endef
27
28 define Package/libnids/description
29 An implementation of an E-component of Network Intrusion Detection
30 System.
31 endef
32
33 define Build/Configure
34 $(call Build/Configure/Default, \
35 --enable-shared \
36 --enable-static \
37 --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.0.x" \
38 --with-libpcap="$(STAGING_DIR)/usr" \
39 , \
40 CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
41 )
42 endef
43
44 TARGET_CFLAGS += $(FPIC)
45
46 define Build/Compile
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 LNETLIB="-L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnet" \
49 PCAPLIB="$(TARGET_LDFLAGS) -lpcap" \
50 install_prefix="$(PKG_INSTALL_DIR)" \
51 all install
52 endef
53
54 define Build/InstallDev
55 mkdir -p $(1)/usr/include
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/nids.h $(1)/usr/include/
57 mkdir -p $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.{a,so*} $(1)/usr/lib/
59 endef
60
61 define Package/libnids/install
62 $(INSTALL_DIR) $(1)/usr/lib
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(1)/usr/lib/
64 endef
65
66 $(eval $(call BuildPackage,libnids))