adding txtinfo plugin (by tetzlav at leipzig.freifunk.net)
[openwrt/svn-archive/archive.git] / net / olsrd / 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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=olsrd
12 PKG_VERSION:=0.5.2
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:=a61029e11c001be2997c1e088576d0f5
19 PKG_CAT:=bzcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/olsrd
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=OLSR (Optimized Link State Routing) daemon
29 URL:=http://www.olsr.org/
30 MENU:=1
31 endef
32
33 define Package/olsrd/conffiles
34 /etc/olsrd.conf
35 endef
36
37 define Package/olsrd-mod-dot-draw
38 $(call Package/olsrd)
39 DEPENDS:=olsrd
40 TITLE:=Dot topology information plugin
41 MENU:=0
42 endef
43
44 define Package/olsrd-mod-bmf
45 $(call Package/olsrd)
46 DEPENDS:=olsrd +libpthread +kmod-tun
47 TITLE:=Basic multicast forwarding plugin
48 MENU:=0
49 endef
50
51 define Package/olsrd-mod-dyn-gw
52 $(call Package/olsrd)
53 DEPENDS:=olsrd +libpthread
54 TITLE:=Dynamic internet gateway plugin
55 MENU:=0
56 endef
57
58 define Package/olsrd-mod-httpinfo
59 $(call Package/olsrd)
60 DEPENDS:=olsrd
61 TITLE:=Small informative web server plugin
62 MENU:=0
63 endef
64
65 define Package/olsrd-mod-nameservice
66 $(call Package/olsrd)
67 DEPENDS:=olsrd
68 TITLE:=Lightweight hostname resolver plugin
69 MENU:=0
70 endef
71
72 define Package/olsrd-mod-secure
73 $(call Package/olsrd)
74 DEPENDS:=olsrd
75 TITLE:=Message signing plugin to secure routing domain
76 MENU:=0
77 endef
78
79 define Package/olsrd-mod-txtinfo
80 $(call Package/olsrd)
81 DEPENDS:=olsrd
82 TITLE:=Small informative web server plugin
83 MENU:=0
84 endef
85
86 define Package/olsrd-mod-secure/conffiles
87 /etc/olsrd.d/olsrd_secure_key
88 endef
89
90 define Package/olsrd-mod-tas
91 $(call Package/olsrd)
92 DEPENDS:=olsrd
93 TITLE:=Tiny Application Server (TAS) plugin
94 MENU:=0
95 endef
96
97 define Build/Configure
98 endef
99
100 define Build/Compile
101 rm -rf $(PKG_INSTALL_DIR)
102 mkdir -p $(PKG_INSTALL_DIR)
103 $(MAKE) -C "$(PKG_BUILD_DIR)" \
104 $(TARGET_CONFIGURE_OPTS) \
105 NODEBUG=1 \
106 OFLAGS="$(TARGET_CFLAGS)" \
107 OS="linux" \
108 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
109 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
110 SBINDIR="$(PKG_INSTALL_DIR)/usr/sbin/" \
111 ETCDIR="$(PKG_INSTALL_DIR)/etc" \
112 MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
113 STRIP="/bin/true" \
114 all libs install install_libs
115 endef
116
117 define Package/olsrd/install
118 $(INSTALL_DIR) $(1)/etc
119 $(CP) $(PKG_INSTALL_DIR)/etc/olsrd.conf $(1)/etc/
120 $(INSTALL_DIR) $(1)/usr/sbin
121 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/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_INSTALL_DIR)/usr/lib/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_INSTALL_DIR)/usr/lib/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_INSTALL_DIR)/usr/lib/olsrd_dyn_gw.so.* $(1)/usr/lib/
139 endef
140
141 define Package/olsrd-mod-httpinfo/install
142 $(INSTALL_DIR) $(1)/usr/lib
143 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_httpinfo.so.* $(1)/usr/lib/
144 endef
145
146 define Package/olsrd-mod-nameservice/install
147 $(INSTALL_DIR) $(1)/usr/lib
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_nameservice.so.* $(1)/usr/lib/
149 endef
150
151 define Package/olsrd-mod-secure/install
152 $(INSTALL_DIR) $(1)/etc/olsrd.d
153 $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/
154 $(INSTALL_DIR) $(1)/usr/lib
155 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_secure.so.* $(1)/usr/lib/
156 endef
157
158 define Package/olsrd-mod-tas/install
159 $(INSTALL_DIR) $(1)/usr/lib
160 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_tas.so.* $(1)/usr/lib/
161 endef
162
163 define Package/olsrd-mod-txtinfo/install
164 $(INSTALL_DIR) $(1)/usr/lib
165 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_txtinfo.so.* $(1)/usr/lib/
166 endef
167
168
169
170 $(eval $(call BuildPackage,olsrd))
171 $(eval $(call BuildPackage,olsrd-mod-dot-draw))
172 $(eval $(call BuildPackage,olsrd-mod-bmf))
173 $(eval $(call BuildPackage,olsrd-mod-dyn-gw))
174 $(eval $(call BuildPackage,olsrd-mod-httpinfo))
175 $(eval $(call BuildPackage,olsrd-mod-nameservice))
176 $(eval $(call BuildPackage,olsrd-mod-secure))
177 $(eval $(call BuildPackage,olsrd-mod-tas))
178 $(eval $(call BuildPackage,olsrd-mod-txtinfo))