bdc5f83d891e746ba500eb07f82ea0f04fb91c5c
[openwrt/svn-archive/archive.git] / ipv6 / miredo / Makefile
1 #
2 # Copyright (C) 2006-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:=miredo
11 PKG_VERSION:=1.2.3
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:=6ba484ad5e331514a8a3452da2b144e7
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/miredo/Default
24 SECTION:=ipv6
25 CATEGORY:=IPv6
26 SUBMENU:=miredo: Teredo (IPv6 tunneling over UDP through NAT)
27 URL:=http://www.simphalempin.com/dev/miredo/
28 endef
29
30 define Package/miredo-common
31 $(call Package/miredo/Default)
32 TITLE:=Teredo (IPv6 tunneling over UDP through NAT) shared libraries
33 DEPENDS+= +libpthread +uclibcxx +kmod-ipv6 +kmod-tun
34 endef
35
36 define Package/miredo-server
37 $(call Package/miredo/Default)
38 TITLE:=Teredo (IPv6 tunneling over UDP through NAT) server daemon
39 DEPENDS+= +miredo-common
40 endef
41
42 define Package/miredo-server/conffiles
43 /etc/miredo/miredo-server.conf
44 endef
45
46 define Package/miredo-client
47 $(call Package/miredo/Default)
48 TITLE:=Teredo (IPv6 tunneling over UDP through NAT) client and relay daemon
49 DEPENDS+= +miredo-common
50 endef
51
52 define Package/miredo-client/conffiles
53 /etc/miredo/miredo.conf
54 endef
55
56 CONFIGURE_ARGS += \
57 --enable-shared \
58 --enable-static \
59 --with-gnu-ld \
60 --disable-rpath \
61 --disable-chroot \
62 --enable-teredo-client \
63 --enable-miredo-user=root \
64 --without-Judy \
65
66 CONFIGURE_VARS += \
67 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
68 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
69 LIBS="-nodefaultlibs -luClibc++ -lm" \
70 ac_cv_file__proc_self_maps=yes\
71
72 # XXX: override (:=), don't append (+=)
73 MAKE_FLAGS := \
74 CXXLINK="\$$$$(LINK)" \
75
76 define Package/miredo-common/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{teredo,tun6}.so.* $(1)/usr/lib/
79 $(INSTALL_DIR) $(1)/usr/lib/miredo
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/miredo/miredo-privproc $(1)/usr/lib/miredo
81 endef
82
83 define Package/miredo-server/install
84 $(INSTALL_DIR) $(1)/etc/miredo
85 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo-server.conf $(1)/etc/miredo/miredo-server.conf
86 $(INSTALL_BIN) ./files/client-hook $(1)/etc/miredo/
87 $(INSTALL_DIR) $(1)/etc/init.d
88 $(INSTALL_BIN) ./files/miredo-server.init $(1)/etc/init.d/miredo-server
89 $(INSTALL_DIR) $(1)/usr/sbin
90 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(1)/usr/sbin/
91 endef
92
93 define Package/miredo-client/install
94 $(INSTALL_DIR) $(1)/etc/miredo
95 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo.conf $(1)/etc/miredo/miredo.conf
96 $(INSTALL_BIN) ./files/client-hook $(1)/etc/miredo/
97 $(INSTALL_DIR) $(1)/etc/init.d
98 $(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo
99 $(INSTALL_DIR) $(1)/usr/sbin
100 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/
101 endef
102
103 $(eval $(call BuildPackage,miredo-common))
104 $(eval $(call BuildPackage,miredo-server))
105 $(eval $(call BuildPackage,miredo-client))