Update makefiles to use the autotools stuff put in the template, remove bogus stamp...
[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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://www.packetfactory.net/projects/libnids/dist/
18 PKG_MD5SUM:=9ee6dcdfac97bae6fe611aa27d2594a5
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libnids
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libnet0
29 TITLE:=A network intrusion detection library
30 DESCRIPTION:=\
31 An implementation of an E-component of Network Intrusion Detection \\\
32 System.
33 URL:=http://www.packetfactory.net/projects/libnids/
34 endef
35
36 define Build/Configure
37 $(call Build/Configure/Default, \
38 --enable-shared \
39 --enable-static \
40 --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.0.x" \
41 --with-libpcap="$(STAGING_DIR)/usr" \
42 , \
43 CFLAGS="$$$$CFLAGS $$$$CPPFLAGS" \
44 )
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 LNETLIB="-L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnet" \
50 PCAPLIB="-L$(STAGING_DIR)/usr/lib -lpcap" \
51 install_prefix="$(PKG_INSTALL_DIR)" \
52 all install
53 endef
54
55 define Build/InstallDev
56 mkdir -p $(STAGING_DIR)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/nids.h $(STAGING_DIR)/usr/include/
58 mkdir -p $(STAGING_DIR)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.{a,so*} $(STAGING_DIR)/usr/lib/
60 endef
61
62 define Build/UninstallDev
63 rm -rf $(STAGING_DIR)/usr/include/nids.h \
64 $(STAGING_DIR)/usr/lib/libnids.{a,so*}
65 endef
66
67 define Package/libnids/install
68 install -m0755 -d $(1)/usr/lib
69 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(1)/usr/lib/
70 endef
71
72 $(eval $(call BuildPackage,libnids))