babeld: Improve Makefile formatting
[feed/routing.git] / prince / Makefile
1 #
2 # Copyright (C) 2009-2018 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=prince
11 PKG_VERSION:=v0.4
12 PKG_RELEASE:=1
13
14 # out of source build
15 CMAKE_BINARY_SUBDIR:=build
16
17 PKG_BUILD_DIR:=$(BUILD_DIR)/prince-$(PKG_VERSION)
18 PKG_MIRROR_HASH:=19a3cae09f28a5ef07fc0f5ff12cf62c776a94fbf1626336ab04951775c104de
19 PKG_INSTALL:=0
20 PKG_LICENSE:=MIT
21 PKG_SOURCE:=prince-$(PKG_VERSION).tar.xz
22 PKG_SOURCE_PROTO:=git
23 PKG_SOURCE_SUBDIR:=prince-$(PKG_VERSION)
24 PKG_SOURCE_URL:=https://github.com/AdvancedNetworkingSystems/prince.git
25 PKG_SOURCE_VERSION:=v0.4
26 PKG_USE_MIPS16:=0
27
28 include $(INCLUDE_DIR)/package.mk
29 include $(INCLUDE_DIR)/cmake.mk
30
31 define Package/prince
32 SECTION :=net
33 CATEGORY :=Network
34 SUBMENU :=Routing and Redirection
35 Mantainer :=Gabriele Gemmi <gabriel@autistici.org>
36 TITLE :=Prince
37 URL :=https://github.com/AdvancedNetworkingSystems/prince
38 MENU :=0
39 DEPENDS := +libjson-c +libpthread
40 endef
41
42 define Package/prince/description
43 Prince is an open source implementation of the PopRouting Algorithm.
44 It has been developed as a Google Summer of Code Project in collaboration with Freifunk and the University of Trento.
45
46 Prince fetches topology data from a Link State routing daemon (OONF, OLSR, OSPF, etc),
47 calculates the betweenness centrality using the topology and then computes the
48 the timers' optimal values using these data. At the end of the computation the timers are pushed back to the routing daemon.
49 Since v0.4 it supports both OONF and OLSRd.
50 endef
51
52 define Package/prince/install
53 $(INSTALL_DIR) $(1)/usr/bin
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(INSTALL_DIR) $(1)/etc/init.d
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/prince $(1)/usr/bin/prince
57 $(INSTALL_BIN) ./files/prince.init $(1)/etc/init.d/prince
58 $(INSTALL_DATA) ./files/prince.conf $(1)/etc/prince.conf
59 $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/libprince_oonf.so $(1)/usr/lib
60 $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/libprince_olsr.so $(1)/usr/lib
61 endef
62
63 CFLAGS += $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
64 LDFLAGS += $(TARGET_LDFLAGS)
65
66 $(eval $(call BuildPackage,prince))