d994972896f14ca65253049c0d341482400bbf89
[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.4
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:=471d0d268fae388d18f925ea9dfe0150
19
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
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 endef
36
37 define Package/olsrd/conffiles
38 /etc/olsrd.conf
39 endef
40
41 define Package/olsrd-mod-dot-draw
42 $(call Package/olsrd/template)
43 DEPENDS:=olsrd
44 TITLE:=Dot topology information plugin
45 endef
46
47 define Package/olsrd-mod-bmf
48 $(call Package/olsrd/template)
49 DEPENDS:=olsrd +libpthread +kmod-tun
50 TITLE:=Basic multicast forwarding plugin
51 endef
52
53 define Package/olsrd-mod-dyn-gw
54 $(call Package/olsrd/template)
55 DEPENDS:=olsrd +libpthread
56 TITLE:=Dynamic internet gateway plugin
57 endef
58
59 define Package/olsrd-mod-httpinfo
60 $(call Package/olsrd/template)
61 DEPENDS:=olsrd
62 TITLE:=Small informative web server plugin
63 endef
64
65 define Package/olsrd-mod-nameservice
66 $(call Package/olsrd/template)
67 DEPENDS:=olsrd
68 TITLE:=Lightweight hostname resolver plugin
69 endef
70
71 define Package/olsrd-mod-secure
72 $(call Package/olsrd/template)
73 DEPENDS:=olsrd
74 TITLE:=Message signing plugin to secure routing domain
75 endef
76
77 define Package/olsrd-mod-txtinfo
78 $(call Package/olsrd/template)
79 DEPENDS:=olsrd
80 TITLE:=Small informative web server plugin
81 endef
82
83 define Package/olsrd-mod-secure/conffiles
84 /etc/olsrd.d/olsrd_secure_key
85 endef
86
87 define Package/olsrd-mod-tas
88 $(call Package/olsrd/template)
89 DEPENDS:=olsrd
90 TITLE:=Tiny Application Server (TAS) plugin
91 endef
92
93 define Build/Configure
94 endef
95
96 define Build/Compile
97 rm -rf $(PKG_INSTALL_DIR)
98 mkdir -p $(PKG_INSTALL_DIR)
99 $(MAKE) -C "$(PKG_BUILD_DIR)" \
100 $(TARGET_CONFIGURE_OPTS) \
101 NODEBUG=1 \
102 CFLAGS="$(TARGET_CFLAGS)" \
103 OS="linux" \
104 INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
105 LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
106 SBINDIR="$(PKG_INSTALL_DIR)/usr/sbin/" \
107 ETCDIR="$(PKG_INSTALL_DIR)/etc" \
108 MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
109 STRIP="/bin/true" \
110 all libs install install_libs
111 endef
112
113 define Package/olsrd/install
114 $(INSTALL_DIR) $(1)/etc/config
115 $(INSTALL_DATA) ./files/olsr.config $(1)/etc/config/olsr
116 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/olsrd.conf $(1)/etc/
117 $(INSTALL_DIR) $(1)/usr/sbin
118 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/olsrd $(1)/usr/sbin/
119 $(INSTALL_DIR) $(1)/etc/init.d
120 $(INSTALL_BIN) ./files/olsrd.init $(1)/etc/init.d/olsrd
121 endef
122
123 define Package/olsrd-mod-dot-draw/install
124 $(INSTALL_DIR) $(1)/usr/lib
125 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_dot_draw.so.* $(1)/usr/lib/
126 endef
127
128 define Package/olsrd-mod-bmf/install
129 $(INSTALL_DIR) $(1)/usr/lib
130 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_bmf.so.* $(1)/usr/lib/
131 endef
132
133 define Package/olsrd-mod-dyn-gw/install
134 $(INSTALL_DIR) $(1)/usr/lib
135 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_dyn_gw.so.* $(1)/usr/lib/
136 endef
137
138 define Package/olsrd-mod-httpinfo/install
139 $(INSTALL_DIR) $(1)/usr/lib
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_httpinfo.so.* $(1)/usr/lib/
141 endef
142
143 define Package/olsrd-mod-nameservice/install
144 $(INSTALL_DIR) $(1)/usr/lib
145 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_nameservice.so.* $(1)/usr/lib/
146 endef
147
148 define Package/olsrd-mod-secure/install
149 $(INSTALL_DIR) $(1)/etc/olsrd.d
150 $(CP) ./files/olsrd_secure_key $(1)/etc/olsrd.d/
151 $(INSTALL_DIR) $(1)/usr/lib
152 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_secure.so.* $(1)/usr/lib/
153 endef
154
155 define Package/olsrd-mod-tas/install
156 $(INSTALL_DIR) $(1)/usr/lib
157 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_tas.so.* $(1)/usr/lib/
158 endef
159
160 define Package/olsrd-mod-txtinfo/install
161 $(INSTALL_DIR) $(1)/usr/lib
162 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/olsrd_txtinfo.so.* $(1)/usr/lib/
163 endef
164
165
166
167 $(eval $(call BuildPackage,olsrd))
168 $(eval $(call BuildPackage,olsrd-mod-dot-draw))
169 $(eval $(call BuildPackage,olsrd-mod-bmf))
170 $(eval $(call BuildPackage,olsrd-mod-dyn-gw))
171 $(eval $(call BuildPackage,olsrd-mod-httpinfo))
172 $(eval $(call BuildPackage,olsrd-mod-nameservice))
173 $(eval $(call BuildPackage,olsrd-mod-secure))
174 $(eval $(call BuildPackage,olsrd-mod-tas))
175 $(eval $(call BuildPackage,olsrd-mod-txtinfo))