0f82e03ede8792de18cf6bcc7cd21cc76a08d31d
[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 PKG_BUILDDEP:=libnet
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/libnids
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=A network intrusion detection library
31 DESCRIPTION:=A network intrusion detection library.\\\
32 An implementation of an E-component of Network Intrusion Detection \\\
33 System.
34 URL:=http://www.packetfactory.net/projects/libnids/
35 endef
36
37 define Build/Configure
38 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(TARGET_CFLAGS)" \
41 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
42 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
43 ./configure \
44 --target=$(GNU_TARGET_NAME) \
45 --host=$(GNU_TARGET_NAME) \
46 --build=$(GNU_HOST_NAME) \
47 --program-prefix="" \
48 --program-suffix="" \
49 --prefix=/usr \
50 --exec-prefix=/usr \
51 --bindir=/usr/bin \
52 --datadir=/usr/share \
53 --includedir=/usr/include \
54 --infodir=/usr/share/info \
55 --libdir=/usr/lib \
56 --libexecdir=/usr/lib \
57 --localstatedir=/var \
58 --mandir=/usr/share/man \
59 --sbindir=/usr/sbin \
60 --sysconfdir=/etc \
61 $(DISABLE_NLS) \
62 $(DISABLE_LARGEFILE) \
63 --enable-shared \
64 --enable-static \
65 --with-libnet="$(STAGING_DIR)/usr" \
66 --with-libpcap="$(STAGING_DIR)/usr" \
67 );
68 endef
69
70 define Build/Compile
71 rm -rf $(PKG_INSTALL_DIR)
72 mkdir -p $(PKG_INSTALL_DIR)
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 $(TARGET_CONFIGURE_OPTS) \
75 install_prefix="$(PKG_INSTALL_DIR)" \
76 all install
77 endef
78
79 define Package/libnids/install
80 install -m0755 -d $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.so.* $(1)/usr/lib/
82 endef
83
84 define Build/InstallDev
85 mkdir -p $(STAGING_DIR)/usr/include
86 $(CP) $(PKG_INSTALL_DIR)/usr/include/nids.h $(STAGING_DIR)/usr/include/
87 mkdir -p $(STAGING_DIR)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnids.{a,so*} $(STAGING_DIR)/usr/lib/
89 endef
90
91 define Build/UninstallDev
92 rm -rf \
93 $(STAGING_DIR)/usr/include/nids.h \
94 $(STAGING_DIR)/usr/lib/libnids.{a,so*}
95 endef
96
97 $(eval $(call BuildPackage,libnids))