fix olsrd build
[openwrt.git] / openwrt / package / olsrd / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=olsrd
6 PKG_VERSION:=0.4.9
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=593c0861fa10d2a8d0e7d8617479c5cf
9
10 PKG_SOURCE_URL:=http://www.olsr.org/releases/0.4
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12 PKG_CAT:=bzcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15
16 include $(TOPDIR)/package/rules.mk
17
18 define PKG_mod_template
19
20 $$(IPKG_$(1)):
21 install -d -m0755 $$(IDIR_$(1))/usr/lib
22 install -m0755 $(PKG_BUILD_DIR)/lib/$(2)*/olsrd_$(2).so.* $$(IDIR_$(1))/usr/lib/
23 $(RSTRIP) $$(IDIR_$(1))
24 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
25
26 endef
27
28 $(eval $(call PKG_template,OLSRD,olsrd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
29 $(eval $(call PKG_template,OLSRD_MOD_DOT_DRAW,olsrd-mod-dot-draw,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
30 $(eval $(call PKG_template,OLSRD_MOD_DYN_GW,olsrd-mod-dyn-gw,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
31 $(eval $(call PKG_template,OLSRD_MOD_HTTPINFO,olsrd-mod-httpinfo,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
32 $(eval $(call PKG_template,OLSRD_MOD_NAMESERVICE,olsrd-mod-nameservice,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
33 $(eval $(call PKG_template,OLSRD_MOD_POWER,olsrd-mod-power,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
34 $(eval $(call PKG_template,OLSRD_MOD_SECURE,olsrd-mod-secure,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
35
36 $(eval $(call PKG_mod_template,OLSRD_MOD_DOT_DRAW,dot_draw))
37 $(eval $(call PKG_mod_template,OLSRD_MOD_DYN_GW,dyn_gw))
38 $(eval $(call PKG_mod_template,OLSRD_MOD_HTTPINFO,httpinfo))
39 $(eval $(call PKG_mod_template,OLSRD_MOD_NAMESERVICE,nameservice))
40 $(eval $(call PKG_mod_template,OLSRD_MOD_POWER,power))
41 $(eval $(call PKG_mod_template,OLSRD_MOD_SECURE,secure))
42
43 $(PKG_BUILD_DIR)/.configured:
44 touch $(PKG_BUILD_DIR)/.configured
45
46 $(PKG_BUILD_DIR)/.built:
47 $(MAKE) -C "$(PKG_BUILD_DIR)" \
48 OS="linux" \
49 CC="$(TARGET_CC)" \
50 CFLAGS="$(TARGET_CFLAGS) -DOLSR_PLUGIN -I. -Isrc -Dlinux -I../../src -DNODEBUG" \
51 libs
52 $(MAKE) -C "$(PKG_BUILD_DIR)" \
53 OS="linux" \
54 CC="$(TARGET_CC)" \
55 CFLAGS="$(TARGET_CFLAGS) -I. -Isrc -Dlinux -I../../src -DNODEBUG" \
56 all
57 touch $(PKG_BUILD_DIR)/.built
58
59 $(IPKG_OLSRD):
60 install -d -m0755 $(IDIR_OLSRD)/etc
61 cp -fpR $(PKG_BUILD_DIR)/files/olsrd.conf.default.rfc $(IDIR_OLSRD)/etc/olsrd.conf
62 install -d -m0755 $(IDIR_OLSRD)/usr/sbin
63 cp -fpR $(PKG_BUILD_DIR)/olsrd $(IDIR_OLSRD)/usr/sbin/
64 install -d -m0755 $(IDIR_OLSRD)/etc/init.d
65 cp -fpR ./files/olsrd.init $(IDIR_OLSRD)/etc/init.d/olsrd
66 $(RSTRIP) $(IDIR_OLSRD)
67 $(IPKG_BUILD) $(IDIR_OLSRD) $(PACKAGE_DIR)
68
69 $(IPKG_OLSRD_MOD_SECURE): $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key
70
71 $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/olsrd_secure_key:
72 install -d -m0755 $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d
73 cp -fpR ./files/olsrd_secure_key $(IDIR_OLSRD_MOD_SECURE)/etc/olsrd.d/
This page took 0.040291 seconds and 5 git commands to generate.