[net] Firewall Tunnel: Move all programs meant to get tunnel trhough restrictive...
[openwrt/svn-archive/archive.git] / net / airpwn / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=airpwn
11 PKG_RELEASE:=1
12 PKG_VERSION:=1.3
13
14 PKG_SOURCE:=airpwn-$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=@SF/airpwn
16 PKG_MD5SUM:=15b6f1cd287b4bb20dd586bb6c83628d
17
18 PKG_BUILD_DEPENDS:=libnet1 libopenssl libpcap libpcre
19
20 PKG_FIXUP:=libtool
21 PKG_LIBTOOL_PATHS:=. lorcon
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/airpwn
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=Packet injection pwnage
29 DEPENDS:=+libnet1 +libopenssl +libpcap +libpcre
30 URL:=http://airpwn.sourceforge.net/Airpwn.html
31 endef
32
33 define Package/airpwn/description
34 Airpwn is a framework for 802.11 (wireless) packet injection.
35 Airpwn listens to incoming wireless packets, and if the data
36 matches a pattern specified in the config files, custom content
37 is injected "spoofed" from the wireless access point. From the
38 perspective of the wireless client, airpwn becomes the server.
39 endef
40
41 CONFIGURE_VARS:= \
42 CC="$(TARGET_CC)" \
43 LD="$(TARGET_LD)" \
44 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include -I$(STAGING_DIR)/usr/include -I$(PKG_BUILD_DIR)/lorcon" \
45 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib -L$(PKG_BUILD_DIR)/lorcon/.libs -lcrypto -lssl" \
46 LIBTOOL="$(STAGING_DIR)/host/bin/libtool"
47
48 define Build/Configure
49 ( cd $(PKG_BUILD_DIR); tar -xzf lorcon-current.tgz; cd lorcon; \
50 $(CONFIGURE_VARS) ./configure $(CONFIGURE_ARGS); \
51 $(MAKE) -C $(PKG_BUILD_DIR)/lorcon $(CONFIGURE_VARS); cd ..; \
52 $(CONFIGURE_VARS) ./configure $(CONFIGURE_ARGS) )
53 endef
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) $(CONFIGURE_VARS)
57 endef
58
59 define Package/airpwn/install
60 $(INSTALL_DIR) $(1)/etc/airpwn
61 $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/* $(1)/etc/airpwn/
62 $(INSTALL_DIR) $(1)/usr/bin
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/airpwn $(1)/usr/bin/
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lorcon/.libs/liborcon-1.0.0.so $(1)/usr/lib/
66 ( cd $(1)/usr/lib; ln -s liborcon-1.0.0.so liborcon.so )
67 endef
68
69 $(eval $(call BuildPackage,airpwn))