96c1c3781a1fc81846a9f93ace662dec010057ab
[openwrt/svn-archive/archive.git] / net / ettercap / 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:=ettercap
12 PKG_VERSION:=NG-0.7.3
13 PKG_RELEASE:=0
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/ettercap
17 PKG_MD5SUM:=28fb15cd024162c55249888fe1b97820
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/ettercap
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libpcap +libnet1 +libopenssl +libpcre +libiconv +libncurses +libltdl
29 TITLE:=Ettercap is a suite for man in the middle attacks on LAN.
30 DESCRIPTION:=\
31 It features sniffing of live connections, content filtering on the fly \\\
32 and many other interesting tricks.\\\
33 It supports active and passive dissection of many protocols (even \\\
34 ciphered ones) and includes many feature for network and host analysis.
35 URL:=http://ettercap.sourceforge.net
36 endef
37
38 define Package/ettercap/conffiles
39 /etc/etter.conf
40 endef
41
42 define Build/Prepare
43 $(call Build/Prepare/Default)
44 # remove default optimization flags set by configure
45 $(SED) 's,DEBUG_FLAGS=.*,DEBUG_FLAGS=,g' $(PKG_BUILD_DIR)/configure
46 endef
47
48 define Build/Configure
49 $(call Build/Configure/Default, \
50 --with-libpcap="$(STAGING_DIR)/usr" \
51 --with-libnet="$(STAGING_DIR)/usr/lib/libnet-1.1.x" \
52 --with-openssl="$(STAGING_DIR)/usr" \
53 --with-libpcre="$(STAGING_DIR)/usr" \
54 --with-iconv="$(STAGING_DIR)/usr/lib/libiconv" \
55 --with-libncurses="$(STAGING_DIR)/usr" \
56 --disable-gtk \
57 --disable-debug \
58 , \
59 LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
60 )
61 endef
62
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 DESTDIR="$(PKG_INSTALL_DIR)" \
66 all install
67 endef
68
69 define Package/ettercap/install
70 install -d -m0755 $(1)/etc
71 $(CP) $(PKG_INSTALL_DIR)/etc/etter.conf $(1)/etc/
72 install -d -m0755 $(1)/usr/bin
73 $(CP) $(PKG_INSTALL_DIR)/usr/bin/etter{cap,filter,log} $(1)/usr/bin/
74 install -d -m0755 $(1)/usr/lib/ettercap
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/ettercap/*.so $(1)/usr/lib/ettercap/
76 install -d -m0755 $(1)/usr/share/ettercap
77 $(CP) $(PKG_INSTALL_DIR)/usr/share/ettercap/* $(1)/usr/share/ettercap/
78 endef
79
80 $(eval $(call BuildPackage,ettercap))