firewall3 - a C implementation of the current firewall scripts
[openwrt.git] / package / network / services / ead / Makefile
1
2 # Copyright (C) 2006-2008 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:=ead
11 PKG_RELEASE:=1
12
13 PKG_BUILD_DEPENDS:=libpcap
14 PKG_BUILD_DIR:=$(BUILD_DIR)/ead
15
16 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
17
18 include $(INCLUDE_DIR)/package.mk
19 include $(INCLUDE_DIR)/kernel.mk
20
21 define Package/ead
22   SECTION:=net
23   CATEGORY:=Base system
24   TITLE:=Emergency Access Daemon
25   URL:=http://bridge.sourceforge.net/
26 endef
27
28 define Package/ead/description
29   Provides remote access to your device even if IP and firewall
30   configuration settings are defunct
31 endef
32
33 CONFIGURE_PATH = tinysrp
34
35 TARGET_CFLAGS += \
36         -I$(LINUX_DIR)/include \
37         -I$(PKG_BUILD_DIR) \
38         -I$(PKG_BUILD_DIR)/tinysrp \
39         $(TARGET_CPPFLAGS)
40
41 MAKE_FLAGS += \
42         CONFIGURE_ARGS="$(CONFIGURE_ARGS)" \
43         LIBS_EADCLIENT="$(PKG_BUILD_DIR)/tinysrp/libtinysrp.a" \
44         LIBS_EAD="$(PKG_BUILD_DIR)/tinysrp/libtinysrp.a $(STAGING_DIR)/usr/lib/libpcap.a" \
45         CFLAGS="$(TARGET_CFLAGS)"
46
47 define Build/Prepare
48         mkdir -p $(PKG_BUILD_DIR)
49         $(CP) ./src/* $(PKG_BUILD_DIR)/
50 endef
51
52 define Package/ead/install
53         $(INSTALL_DIR) $(1)/sbin
54         $(INSTALL_BIN) $(PKG_BUILD_DIR)/ead $(1)/sbin/
55 endef
56
57 $(eval $(call BuildPackage,ead))