[package] add a config file and init script to mini_snmpd (#5496)
[packages.git] / net / nprobe / Makefile
index 5527cc1..d83c589 100644 (file)
@@ -4,7 +4,6 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
@@ -15,7 +14,6 @@ PKG_RELEASE:=1
 PKG_SOURCE:=nProbe-$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
 PKG_MD5SUM:=32ed12f60eab771a79bd5f90622fa2a3
-PKG_CAT:=zcat
 
 BUILD_DEPENDS:=libwrap
 
@@ -24,15 +22,28 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/nProbe
 include $(INCLUDE_DIR)/package.mk
 
 define Package/nprobe
-       SECTION:=utils
-       CATEGORY:=Utilities
-       DEPENDS:=+libpcap +libpcre +libpthread +libwrap
-       TITLE:=nProbe
-       DESCRIPTION:=\
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libpcap +libpcre +libpthread +NPROBE_MYSQL_SUPPORT:libmysqlclient
+  TITLE:=nProbe
+  URL:=http://invisible-island.net/dialog/
+endef
+
+define Package/nprobe/config
+       config NPROBE_MYSQL_SUPPORT
+               depends on PACKAGE_nprobe
+               bool "MySQL support"
+
+endef
+
+define Package/nprobe/description
                nprobe
-       URL=http://invisible-island.net/dialog/
 endef
 
+ifndef CONFIG_NPROBE_MYSQL_SUPPORT
+  CONFIGURE_VARS += ac_cv_prog_MYSQL=no
+endif
+
 define Build/Configure
        # patch creates these, so we make them executable
        chmod +x $(PKG_BUILD_DIR)/configure
@@ -55,7 +66,7 @@ define Package/nprobe/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nprobe \
                $(1)/usr/bin/
-       $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/* \
+       $(CP) -a $(PKG_INSTALL_DIR)/usr/lib/*.so* \
                $(1)/usr/lib
 endef