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