[packages] glib2: fix autoreconf
[openwrt/svn-archive/archive.git] / net / ettercap / Makefile
index eac85be67314d32f6d0c9b0a4d486b637c41fe7b..2bbabe1e2ebbb79003c6a037e880de04d493834a 100644 (file)
@@ -1,72 +1,75 @@
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id: Makefile 4603 2006-08-18 21:21:06Z mbm $
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ettercap
 PKG_VERSION:=NG-0.7.3
-PKG_RELEASE:=0
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ettercap
 PKG_MD5SUM:=28fb15cd024162c55249888fe1b97820
-PKG_CAT:=zcat
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ettercap
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libpcap +libnet1 +libopenssl +libpcre +libiconv +libncurses
+  DEPENDS:=+libpcap +libnet1 +libopenssl +libpcre +libiconv +libncurses +libltdl +libpthread +zlib
   TITLE:=Ettercap is a suite for man in the middle attacks on LAN.
-  DESCRIPTION:=\
-       It features sniffing of live connections, content filtering on the fly \\\
-       and many other interesting tricks.\\\
-       It supports active and passive dissection of many protocols (even \\\
-       ciphered ones) and includes many feature for network and host analysis.\\\
   URL:=http://ettercap.sourceforge.net
 endef
 
+define Package/ettercap/description
+       It features sniffing of live connections, content filtering on the fly 
+       and many other interesting tricks. 
+       It supports active and passive dissection of many protocols (even 
+       ciphered ones) and includes many feature for network and host analysis.
+endef
+
 define Package/ettercap/conffiles
 /etc/etter.conf
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default, \
-               --with-libpcap="$(STAGING_DIR)/usr" \
-               --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.1.x" \
-               --with-openssl="$(STAGING_DIR)/usr" \
-               --with-libpcre="$(STAGING_DIR)/usr" \
-               --with-libiconv="$(STAGING_DIR)/usr" \
-               --with-libncurses="$(STAGING_DIR)/usr" \
-               --disable-gtk \
-               --disable-debug \
-       )
+define Build/Prepare
+       $(call Build/Prepare/Default)
+       # remove default optimization flags set by configure
+       $(SED) 's,DEBUG_FLAGS=.*,DEBUG_FLAGS=,g' $(PKG_BUILD_DIR)/configure
 endef
 
+CONFIGURE_ARGS += \
+       --with-libpcap="$(STAGING_DIR)/usr" \
+       --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.1.x" \
+       --with-openssl="$(STAGING_DIR)/usr" \
+       --with-libpcre="$(STAGING_DIR)/usr" \
+       --with-iconv="$(STAGING_DIR)/usr/lib/libiconv" \
+       --with-libncurses="$(STAGING_DIR)/usr" \
+       --disable-gtk \
+       --disable-debug \
+       --enable-plugins
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
+MAKE_FLAGS += \
+       DESTDIR="$(PKG_INSTALL_DIR)" \
+       AM_LDFLAGS="-L$(STAGING_DIR)/usr/lib/libiconv/lib"
 
 define Package/ettercap/install
-       install -d -m0755 $(1)/etc
-       $(CP) $(PKG_INSTALL_DIR)/etc/etter.conf $(1)/etc/
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/etter{cap,filter,log} $(1)/usr/bin/
-       install -d -m0755 $(1)/usr/lib/ettercap
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/ettercap/*.so $(1)/usr/lib/ettercap/
-       install -d -m0755 $(1)/usr/share/ettercap
-       $(CP) $(PKG_INSTALL_DIR)/usr/share/ettercap/* $(1)/usr/share/ettercap/
+       $(INSTALL_DIR) $(1)/etc
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/etter.conf $(1)/etc/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/etter{cap,filter,log} $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib/ettercap
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ettercap/*.so $(1)/usr/lib/ettercap/
+       $(INSTALL_DIR) $(1)/usr/share/ettercap
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ettercap/* $(1)/usr/share/ettercap/
 endef
 
 $(eval $(call BuildPackage,ettercap))