prince: refactor to use PKG_BUILD_FLAGS:=no-mips16
[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:=0.4
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/AdvancedNetworkingSystems/prince/archive/refs/tags/v$(PKG_VERSION).tar.gz?
16 PKG_HASH:=9e3ce87343f5ea1d66757f8c704b62ff47d5eb245a191cf1e6a9ec106c5da90e
17
18 PKG_MAINTAINER:=Gabriele Gemmi <gabriel@autistici.org>
19 PKG_LICENSE:=MIT
20 PKG_LICENSE_FILES:=LICENSE
21
22 PKG_BUILD_FLAGS:=no-mips16
23
24 # out of source build
25 CMAKE_BINARY_SUBDIR:=build
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/cmake.mk
29
30 define Package/prince
31 SECTION:=net
32 CATEGORY:=Network
33 SUBMENU:=Routing and Redirection
34 TITLE:=Prince
35 URL:=https://github.com/AdvancedNetworkingSystems/prince
36 DEPENDS:=+libjson-c +libpthread
37 endef
38
39 define Package/prince/description
40 Prince is an open source implementation of the PopRouting Algorithm.
41 It has been developed as a Google Summer of Code Project in collaboration with Freifunk and the University of Trento.
42
43 Prince fetches topology data from a Link State routing daemon (OONF, OLSR, OSPF, etc),
44 calculates the betweenness centrality using the topology and then computes the
45 the timers' optimal values using these data. At the end of the computation the timers are pushed back to the routing daemon.
46 Since v0.4 it supports both OONF and OLSRd.
47 endef
48
49 define Package/prince/install
50 $(INSTALL_DIR) $(1)/usr/bin
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/prince $(1)/usr/bin/prince
52
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/libprince_oonf.so $(1)/usr/lib
55 $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/libprince_olsr.so $(1)/usr/lib
56
57 $(INSTALL_DIR) $(1)/etc/init.d
58 $(INSTALL_BIN) ./files/prince.init $(1)/etc/init.d/prince
59 $(INSTALL_DATA) ./files/prince.conf $(1)/etc/prince.conf
60 endef
61
62 CFLAGS += $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
63 LDFLAGS += $(TARGET_LDFLAGS)
64
65 $(eval $(call BuildPackage,prince))