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