You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2019-2020 CZ.NIC z.s.p.o. (http://www.nic.cz/)
  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:=measurement-kit
  9. PKG_VERSION:=0.10.12
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/measurement-kit/measurement-kit/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=508d9db72579efbe4747dd791771f47299bc5867c72d67a86e371d66d20fd19e
  14. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_DEPENDS:=curl libevent2 libmaxminddb openssl
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_CONFIG_DEPENDS:=MEASUREMENT_KIT_BUILD_DEPENDS
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/measurement-kit
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=library for open network measurement
  27. URL:=https://measurement-kit.github.io/
  28. DEPENDS:=+libstdcpp +libcurl +libevent2-pthreads +libevent2-extra +libevent2-openssl +libevent2-core +libmaxminddb +libopenssl +ca-bundle
  29. endef
  30. define Package/measurement-kit/description
  31. Measurement Kit is a C++14 library that implements open network measurement methodologies (performance, censorship, etc.)
  32. endef
  33. define Package/measurement-kit/config
  34. config MEASUREMENT_KIT_BUILD_DEPENDS
  35. bool
  36. default PACKAGE_measurement-kit
  37. config MEASUREMENT_KIT_BUILD_SELECT
  38. tristate
  39. default m if MEASUREMENT_KIT_BUILD_DEPENDS
  40. select PACKAGE_libevent2-openssl
  41. select PACKAGE_libevent2-pthreads
  42. endef
  43. CONFIGURE_ARGS+= --with-ca-bundle=/etc/ssl/cert.pem
  44. TARGET_CFLAGS += $(if $(CONFIG_USE_UCLIBC),-DCATCH_CONFIG_GLOBAL_NEXTAFTER)
  45. define Build/Configure
  46. ( cd $(PKG_BUILD_DIR); ./autogen.sh )
  47. $(call Build/Configure/Default)
  48. endef
  49. define Build/InstallDev
  50. $(INSTALL_DIR) $(1)/usr/include
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  54. endef
  55. define Package/measurement-kit/install
  56. $(INSTALL_DIR) $(1)/usr/bin
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/measurement_kit $(1)/usr/bin/
  58. $(INSTALL_DIR) $(1)/etc/measurement_kit
  59. $(CP) $(PKG_BUILD_DIR)/*.mmdb $(1)/etc/measurement_kit
  60. endef
  61. $(eval $(call BuildPackage,measurement-kit))