Makefile 2.0 KB

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