add dyn_gw_plain plugin by sven-ola. Very practical stuff. update md5sum
[openwrt/svn-archive/archive.git] / net / olsrd / Makefile
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=olsrd
12 PKG_VERSION:=0.5.6-r2
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=http://www.olsr.org/releases/0.5
18 PKG_MD5SUM:=eb72e4899142daa1a6237831da40eb74
19
20 include $(INCLUDE_DIR)/package.mk
21
22 TARGET_CFLAGS += $(FPIC)
23
24 define Package/olsrd/template
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=OLSR (Optimized Link State Routing) daemon
28 URL:=http://www.olsr.org/
29 MENU:=1
30 endef
31
32 define Package/olsrd
33 $(call Package/olsrd/template)
34 MENU:=1
35 DEPENDS:=+libpthread
36 endef
37
38 define Package/olsrd/conffiles
39 /etc/olsrd.conf
40 endef
41
42 define Package/olsrd-mod-dot-draw
43 $(call Package/olsrd/template)
44 DEPENDS:=olsrd
45 TITLE:=Dot topology information plugin
46 endef
47
48 define Package/olsrd-mod-bmf
49 $(call Package/olsrd/template)
50 DEPENDS:=olsrd +kmod-tun
51 TITLE:=Basic multicast forwarding plugin
52 endef
53
54 define Package/olsrd-mod-dyn-gw
55 $(call Package/olsrd/template)
56 DEPENDS:=olsrd
57 TITLE:=Dynamic internet gateway plugin
58 endef
59
60 define Package/olsrd-mod-dyn-gw-plain
61 $(call Package/olsrd/template)
62 DEPENDS:=olsrd
63 TITLE:=Simplified and more efficient dynamic internet gateway plugin by Sven-Ola Tuecke
64 endef
65
66 define Package/olsrd-mod-httpinfo
67 $(call Package/olsrd/template)
68 DEPENDS:=olsrd
69 TITLE:=Small informative web server plugin
70 endef
71
72 define Package/olsrd-mod-nameservice
73 $(call Package/olsrd/template)
74 DEPENDS:=olsrd
75 TITLE:=Lightweight hostname resolver plugin
76 endef
77
78 define Package/olsrd-mod-secure
79 $(call Package/olsrd/template)
80 DEPENDS:=olsrd
81 TITLE:=Message signing plugin to secure routing domain
82 endef
83
84 define Package/olsrd-mod-txtinfo
85 $(call Package/olsrd/template)
86 DEPENDS:=olsrd
87 TITLE:=Small informative web server plugin
88 endef
89
90 define Package/olsrd-mod-secure/conffiles
91 /etc/olsrd.d/olsrd_secure_key
92 endef
93
94 define Build/Configure
95 endef
96
97 define Build/Compile
98 rm -rf $(PKG_INSTALL_DIR)
99 mkdir -p $(PKG_INSTALL_DIR)
100 $(MAKE) -C "$(PKG_BUILD_DIR)" \
101 $(TARGET_CONFIGURE_OPTS) \
102 NODEBUG=1 \
103 CFLAGS="$(TARGET_CFLAGS)" \
104 OS="linux" \
105 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
106 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
107 SBINDIR="$(PKG_INSTALL_DIR)/usr/sbin/" \
108 ETCDIR="$(PKG_INSTALL_DIR)/etc" \
109 MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
110 STRIP="true" \
111 INSTALL_LIB="true" \
112 SUBDIRS="bmf dot_draw dyn_gw dyn_gw_plain httpinfo nameservice secure txtinfo" \
113 all libs install install_libs
114 endef
115
116 define Package/olsrd/install
117 $(INSTALL_DIR) $(1)/etc/config
118 $(INSTALL_DATA) ./files/olsrd.config $(1)/etc/config/olsrd
119 $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cfgparser/olsrd.conf.example $(1)/etc/olsrd.conf
120 $(INSTALL_DIR) $(1)/usr/sbin
121 $(INSTALL_BIN) $(PKG_BUILD_DIR)/olsrd $(1)/usr/sbin/
122 $(INSTALL_DIR) $(1)/etc/init.d
123 $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd
124 endef
125
126 define Package/olsrd-mod-dot-draw/install
127 $(INSTALL_DIR) $(1)/usr/lib
128 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dot_draw/olsrd_dot_draw.so.* $(1)/usr/lib/
129 endef
130
131 define Package/olsrd-mod-bmf/install
132 $(INSTALL_DIR) $(1)/usr/lib
133 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmf/olsrd_bmf.so.* $(1)/usr/lib/
134 endef
135
136 define Package/olsrd-mod-dyn-gw/install
137 $(INSTALL_DIR) $(1)/usr/lib
138 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw/olsrd_dyn_gw.so.* $(1)/usr/lib/
139 endef
140
141 define Package/olsrd-mod-dyn-gw-plain/install
142 $(INSTALL_DIR) $(1)/usr/lib
143 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/dyn_gw_plain/olsrd_dyn_gw_plain.so.* $(1)/usr/lib/
144 endef
145
146 define Package/olsrd-mod-httpinfo/install
147 $(INSTALL_DIR) $(1)/usr/lib
148 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/httpinfo/olsrd_httpinfo.so.* $(1)/usr/lib/
149 endef
150
151 define Package/olsrd-mod-nameservice/install
152 $(INSTALL_DIR) $(1)/usr/lib
153 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/nameservice/olsrd_nameservice.so.* $(1)/usr/lib/
154 endef
155
156 define Package/olsrd-mod-secure/install
157 $(INSTALL_DIR) $(1)/etc/olsrd.d
158 $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/
159 $(INSTALL_DIR) $(1)/usr/lib
160 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/secure/olsrd_secure.so.* $(1)/usr/lib/
161 endef
162
163 define Package/olsrd-mod-txtinfo/install
164 $(INSTALL_DIR) $(1)/usr/lib
165 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/txtinfo/olsrd_txtinfo.so.* $(1)/usr/lib/
166 endef
167
168 $(eval $(call BuildPackage,olsrd))
169 $(eval $(call BuildPackage,olsrd-mod-dot-draw))
170 $(eval $(call BuildPackage,olsrd-mod-bmf))
171 $(eval $(call BuildPackage,olsrd-mod-dyn-gw))
172 $(eval $(call BuildPackage,olsrd-mod-dyn-gw-plain))
173 $(eval $(call BuildPackage,olsrd-mod-httpinfo))
174 $(eval $(call BuildPackage,olsrd-mod-nameservice))
175 $(eval $(call BuildPackage,olsrd-mod-secure))
176 $(eval $(call BuildPackage,olsrd-mod-txtinfo))