remove the need for C99 math (closes: #1579)
[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.4.10
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.4
18 PKG_MD5SUM:=9807d4451e65cb4ec385155eef7bf3cf
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-dyn-gw
45 $(call Package/olsrd)
46 DEPENDS:=olsrd
47 TITLE:=Dynamic internet gateway plugin
48 MENU:=0
49 endef
50
51 define Package/olsrd-mod-httpinfo
52 $(call Package/olsrd)
53 DEPENDS:=olsrd
54 TITLE:=Small informative web server plugin
55 MENU:=0
56 endef
57
58 define Package/olsrd-mod-nameservice
59 $(call Package/olsrd)
60 DEPENDS:=olsrd
61 TITLE:=Lightweight hostname resolver plugin
62 MENU:=0
63 endef
64
65 define Package/olsrd-mod-power
66 $(call Package/olsrd)
67 DEPENDS:=olsrd
68 TITLE:=Power status 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-secure/conffiles
80 /etc/olsrd.d/olsrd_secure_key
81 endef
82
83 define Package/olsrd-mod-tas
84 $(call Package/olsrd)
85 DEPENDS:=olsrd
86 TITLE:=Tiny Application Server (TAS) plugin
87 MENU:=0
88 endef
89
90 define Build/Configure
91 endef
92
93 define Build/Compile
94 rm -rf $(PKG_INSTALL_DIR)
95 mkdir -p $(PKG_INSTALL_DIR)
96 $(MAKE) -C "$(PKG_BUILD_DIR)" \
97 $(TARGET_CONFIGURE_OPTS) \
98 NODEBUG=1 \
99 OFLAGS="$(TARGET_CFLAGS)" \
100 OS="linux" \
101 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
102 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
103 STRIP="/bin/true" \
104 all libs install install_libs
105 endef
106
107 define Package/olsrd/install
108 $(INSTALL_DIR) $(1)/etc
109 $(CP) $(PKG_INSTALL_DIR)/etc/olsrd.conf $(1)/etc/
110 $(INSTALL_DIR) $(1)/usr/sbin
111 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(1)/usr/sbin/
112 $(INSTALL_DIR) $(1)/etc/init.d
113 $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd
114 endef
115
116 define Package/olsrd-mod-dot-draw/install
117 $(INSTALL_DIR) $(1)/usr/lib
118 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_dot_draw.so.* $(1)/usr/lib/
119 endef
120
121 define Package/olsrd-mod-dyn-gw/install
122 $(INSTALL_DIR) $(1)/usr/lib
123 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_dyn_gw.so.* $(1)/usr/lib/
124 endef
125
126 define Package/olsrd-mod-httpinfo/install
127 $(INSTALL_DIR) $(1)/usr/lib
128 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_httpinfo.so.* $(1)/usr/lib/
129 endef
130
131 define Package/olsrd-mod-nameservice/install
132 $(INSTALL_DIR) $(1)/usr/lib
133 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_nameservice.so.* $(1)/usr/lib/
134 endef
135
136 define Package/olsrd-mod-power/install
137 $(INSTALL_DIR) $(1)/usr/lib
138 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_power.so.* $(1)/usr/lib/
139 endef
140
141 define Package/olsrd-mod-secure/install
142 $(INSTALL_DIR) $(1)/etc/olsrd.d
143 $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/
144 $(INSTALL_DIR) $(1)/usr/lib
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_secure.so.* $(1)/usr/lib/
146 endef
147
148 define Package/olsrd-mod-tas/install
149 $(INSTALL_DIR) $(1)/usr/lib
150 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_tas.so.* $(1)/usr/lib/
151 endef
152
153
154 $(eval $(call BuildPackage,olsrd))
155 $(eval $(call BuildPackage,olsrd-mod-dot-draw))
156 $(eval $(call BuildPackage,olsrd-mod-dyn-gw))
157 $(eval $(call BuildPackage,olsrd-mod-httpinfo))
158 $(eval $(call BuildPackage,olsrd-mod-nameservice))
159 $(eval $(call BuildPackage,olsrd-mod-power))
160 $(eval $(call BuildPackage,olsrd-mod-secure))
161 $(eval $(call BuildPackage,olsrd-mod-tas))