d763b0b74b7ca2b5ea694bf17b49b29558000b5e
[openwrt/svn-archive/archive.git] / net / miredo / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=miredo
11 PKG_VERSION:=1.0.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=http://www.remlab.net/files/miredo/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_MD5SUM:=b5a51cb98732decc2ada96b2caee5d3c
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/miredo/Default
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+libpthread +uclibcxx +kmod-ipv6 +kmod-tun
24 SUBMENU:=miredo: Teredo (IPv6 tunneling over UDP through NAT)
25 URL:=http://www.simphalempin.com/dev/miredo/
26 endef
27
28 define Package/miredo-server
29 $(call Package/miredo/Default)
30 TITLE:=Teredo (IPv6 tunneling over UDP through NAT) server daemon
31 endef
32
33 define Package/miredo-server/conffiles
34 /etc/miredo-server.conf
35 endef
36
37 define Package/miredo-client
38 $(call Package/miredo/Default)
39 TITLE:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon
40 endef
41
42 define Package/miredo-client/conffiles
43 /etc/miredo.conf
44 endef
45
46 CONFIGURE_ARGS += \
47 --disable-shared \
48 --enable-static \
49 --with-gnu-ld \
50 --disable-rpath \
51 --disable-chroot \
52 --enable-teredo-client \
53 --enable-teredo-relay \
54 --enable-teredo-server \
55 --enable-miredo-user=root \
56
57 CONFIGURE_VARS += \
58 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
59 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
60 LIBS="-nodefaultlibs -luClibc++ -lm" \
61 ac_cv_file__proc_self_maps=yes\
62
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 CXXLINK="\$$$$(LINK)" \
66 DESTDIR="$(PKG_INSTALL_DIR)" \
67 all install
68 endef
69
70 define Package/miredo-server/install
71 $(INSTALL_DIR) $(1)/etc/
72 $(CP) $(PKG_INSTALL_DIR)/etc/miredo-server.conf-dist $(1)/etc/miredo-server.conf
73 $(INSTALL_DIR) $(1)/etc/init.d
74 $(INSTALL_BIN) ./files/miredo-server.init $(1)/etc/init.d/miredo-server
75 $(INSTALL_DIR) $(1)/usr/sbin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(1)/usr/sbin/
77 endef
78
79 define Package/miredo-client/install
80 $(INSTALL_DIR) $(1)/etc
81 $(CP) $(PKG_INSTALL_DIR)/etc/miredo.conf-dist $(1)/etc/miredo.conf
82 $(INSTALL_DIR) $(1)/etc/init.d
83 $(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo
84 $(INSTALL_DIR) $(1)/usr/sbin
85 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/
86 endef
87
88 $(eval $(call BuildPackage,miredo-server))
89 $(eval $(call BuildPackage,miredo-client))