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.

54 lines
1.5 KiB

  1. #
  2. # Copyright (C) 2019-2021 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:=libmaxminddb
  9. PKG_VERSION:=1.6.0
  10. PKG_RELEASE=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/maxmind/libmaxminddb/releases/download/$(PKG_VERSION)/
  13. PKG_HASH:=7620ac187c591ce21bcd7bf352376a3c56a933e684558a1f6bef4bd4f3f98267
  14. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
  15. PKG_LICENSE:=Apache-2.0
  16. PKG_LICENSE_FILES:=LICENSE
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/libmaxminddb
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=A library for working with MaxMind DB files
  23. URL:=https://maxmind.github.io/libmaxminddb/
  24. endef
  25. define Package/libmaxminddb/description
  26. The libmaxminddb library provides functions for working MaxMind DB files.
  27. endef
  28. CMAKE_OPTIONS += \
  29. -DBUILD_SHARED_LIBS=ON \
  30. -DBUILD_TESTING=OFF
  31. define Build/InstallDev
  32. $(INSTALL_DIR) $(1)/usr/include/
  33. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  34. $(INSTALL_DIR) $(1)/usr/lib/
  35. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmaxminddb.so* $(1)/usr/lib/
  36. endef
  37. define Package/libmaxminddb/install
  38. $(INSTALL_DIR) $(1)/usr/bin
  39. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmdblookup $(1)/usr/bin/
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmaxminddb.so* $(1)/usr/lib/
  42. endef
  43. $(eval $(call BuildPackage,libmaxminddb))