move libiconv out of the way and prevent other autoconf based packages to silently...
[openwrt/svn-archive/archive.git] / net / ettercap / Makefile
index 24414b30092010ac9f6cdc24bcc5337ff14cb406..920054922090826c423bd7c9f9fcd07269253e97 100644 (file)
@@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ettercap
 PKG_VERSION:=NG-0.7.3
 PKG_RELEASE:=0
-PKG_MD5SUM:=28fb15cd024162c55249888fe1b97820
 
-PKG_SOURCE_URL:=@SF/ettercap
 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)
@@ -24,36 +24,51 @@ 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
   TITLE:=Ettercap is a suite for man in the middle attacks on LAN.
-  DESCRIPTION:=Ettercap is a suite for man in the middle attacks on LAN. 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.\\\
+  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/conffiles
+/etc/etter.conf
+endef
+
 define Build/Configure
-$(call Build/Configure/Default,--with-libpcap="$(STAGING_DIR)/usr" \
-                       --with-libnet="$(STAGING_DIR)/usr" \
-                       --with-openssl="$(STAGING_DIR)/usr" \
-                       --with-libpcre="$(STAGING_DIR)/usr" \
-                       --with-libiconv="$(STAGING_DIR)/usr" \
-                       --with-libncurses="$(STAGING_DIR)/usr" \
-                       --disable-gtk \
-                       --disable-debug \
-)
+       $(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-iconv="$(STAGING_DIR)/usr/lib/libiconv" \
+               --with-libncurses="$(STAGING_DIR)/usr" \
+               --disable-gtk \
+               --disable-debug \
+               , \
+               LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
+       )
 endef
 
 
 define Build/Compile
-$(call Build/Compile/Default,DESTDIR="$(PKG_INSTALL_DIR)" all install)
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               all install
 endef
 
 define Package/ettercap/install
-       install -d -m0755 $(1)/usr/
-       $(CP) $(PKG_INSTALL_DIR)/* $(1)/
-       rm -rf $(1)/usr/man
+       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/
 endef
 
 $(eval $(call BuildPackage,ettercap))