packages/ushare: add /etc/config/ushare to conffiles define
[openwrt/svn-archive/archive.git] / net / stun / Makefile
1 #
2 # Copyright (C) 2008-2011 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:=stund
11 PKG_VERSION:=0.96
12 PKG_RELEASE:=4
13
14 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_Aug13.tgz
15 PKG_SOURCE_URL:=@SF/stun
16 PKG_MD5SUM:=3273abb1a6f299f4e611b658304faefa
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/stun/Default
23 SECTION:=net
24 CATEGORY:=Network
25 DEPENDS:=+uclibcxx
26 URL:=http://sourceforge.net/projects/stun
27 endef
28
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
34 ports for it.
35 endef
36
37 define Package/stund
38 $(call Package/stun/Default)
39 TITLE:=STUN server
40 endef
41
42 define Package/stund/description
43 $(call Package/stun/Default/description)
44 endef
45
46 define Package/stun-client
47 $(call Package/stun/Default)
48 TITLE:=STUN test client
49 endef
50
51 define Package/stun-client/description
52 $(call Package/stun/Default/description)
53 endef
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) \
57 CXX="$(TARGET_CXX)" \
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)" \
63 all
64 endef
65
66
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
74 endef
75
76 define Package/stun-client/install
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) $(PKG_BUILD_DIR)/client $(1)/usr/sbin/stun-client
79 endef
80
81 $(eval $(call BuildPackage,stund))
82 $(eval $(call BuildPackage,stun-client))