[package] fix location of miredo sample configuration files, patch from Russell Senior
[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.1.6
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:=bf49c1ddc068746760787d0cf76e40de
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 --without-Judy \
57
58 CONFIGURE_VARS += \
59 CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
60 CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \
61 LIBS="-nodefaultlibs -luClibc++ -lm" \
62 ac_cv_file__proc_self_maps=yes\
63
64 define Build/Compile
65 $(MAKE) -C $(PKG_BUILD_DIR) \
66 CXXLINK="\$$$$(LINK)" \
67 DESTDIR="$(PKG_INSTALL_DIR)" \
68 all install
69 endef
70
71 define Package/miredo-server/install
72 $(INSTALL_DIR) $(1)/etc/
73 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo-server.conf $(1)/etc/miredo-server.conf
74 $(INSTALL_DIR) $(1)/etc/init.d
75 $(INSTALL_BIN) ./files/miredo-server.init $(1)/etc/init.d/miredo-server
76 $(INSTALL_DIR) $(1)/usr/sbin
77 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo-server $(1)/usr/sbin/
78 endef
79
80 define Package/miredo-client/install
81 $(INSTALL_DIR) $(1)/etc
82 $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/miredo/examples/miredo.conf $(1)/etc/miredo.conf
83 $(INSTALL_DIR) $(1)/etc/init.d
84 $(INSTALL_BIN) ./files/miredo.init $(1)/etc/init.d/miredo
85 $(INSTALL_DIR) $(1)/usr/sbin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/miredo $(1)/usr/sbin/
87 endef
88
89 $(eval $(call BuildPackage,miredo-server))
90 $(eval $(call BuildPackage,miredo-client))