2 # Copyright (C) 2008-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_Aug13.tgz
15 PKG_SOURCE_URL:=@SF/stun
16 PKG_MD5SUM:=3273abb1a6f299f4e611b658304faefa
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
20 include $(INCLUDE_DIR)/package.mk
22 define Package/stun/Default
26 URL:=http://sourceforge.net/projects/stun
29 define Package/stun/Default/description
30 The STUN protocol (Simple Traversal of UDP through NATs) is described in the
31 IETF RFC 3489, available at http://www.ietf.org/rfc/rfc3489.txt. It's used to
32 help clients behind NAT to tunnel incoming calls through. This server is the
33 counterpart to help the client identify the NAT and have it open the proper
38 $(call Package/stun/Default)
42 define Package/stund/description
43 $(call Package/stun/Default/description)
46 define Package/stun-client
47 $(call Package/stun/Default)
48 TITLE:=STUN test client
51 define Package/stun-client/description
52 $(call Package/stun/Default/description)
56 $(MAKE) -C $(PKG_BUILD_DIR) \
58 CFLAGS="$(TARGET_CFLAGS)" \
59 DESTDIR="$(PKG_INSTALL_DIR)" \
60 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
61 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ $(TARGET_CPPFLAGS)" \
62 LDFLAGS="$$$$LDFLAGS $(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ $(LIBGCC_S)" \
67 define Package/stund/install
68 $(INSTALL_DIR) $(1)/usr/sbin
69 $(INSTALL_BIN) $(PKG_BUILD_DIR)/server $(1)/usr/sbin/stund
70 $(INSTALL_DIR) $(1)/etc/init.d
71 $(INSTALL_BIN) ./files/stund.init $(1)/etc/init.d/stund
72 $(INSTALL_DIR) $(1)/etc/config
73 $(INSTALL_DATA) ./files/stund.config $(1)/etc/config/stund
76 define Package/stun-client/install
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_BUILD_DIR)/client $(1)/usr/sbin/stun-client
81 $(eval $(call BuildPackage,stund))
82 $(eval $(call BuildPackage,stun-client))