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