branch Attitude Adjustment packages
[12.09/packages.git] / net / nprobe / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=nprobe
11 PKG_VERSION:=4.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=nProbe-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
16 PKG_MD5SUM:=32ed12f60eab771a79bd5f90622fa2a3
17
18 BUILD_DEPENDS:=libwrap
19 PKG_FIXUP:=autoreconf
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/nProbe
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/nprobe
26   SECTION:=utils
27   CATEGORY:=Utilities
28   DEPENDS:=+libpcap +libpcre +libpthread +NPROBE_MYSQL_SUPPORT:libmysqlclient +zlib
29   TITLE:=nProbe
30   URL:=http://invisible-island.net/dialog/
31 endef
32
33 define Package/nprobe/config
34         config NPROBE_MYSQL_SUPPORT
35                 depends on PACKAGE_nprobe
36                 bool "MySQL support"
37
38 endef
39
40 define Package/nprobe/description
41                 nprobe
42 endef
43
44 ifndef CONFIG_NPROBE_MYSQL_SUPPORT
45   CONFIGURE_VARS += ac_cv_prog_MYSQL=no
46 endif
47
48 define Build/Configure
49         # patch creates these, so we make them executable
50         chmod +x $(PKG_BUILD_DIR)/configure
51         chmod +x $(PKG_BUILD_DIR)/config.guess
52         $(call Build/Configure/Default, \
53                 --with-only-ipv4 \
54                 PCAP_ROOT="$(STAGING_DIR)/usr" \
55         )
56 endef
57
58 define Build/Compile
59         DESTDIR=$(PKG_INSTALL_DIR) \
60                 LDFLAGS="$(TARGET_LDFLAGS) -ldl" \
61                 $(MAKE) -C $(PKG_BUILD_DIR) \
62                 all install
63 endef
64
65 define Package/nprobe/install
66         $(INSTALL_DIR) $(1)/usr/bin
67         $(INSTALL_DIR) $(1)/usr/lib
68         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nprobe \
69                 $(1)/usr/bin/
70         $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/*.so* \
71                 $(1)/usr/lib
72 endef
73
74 $(eval $(call BuildPackage,nprobe))
75