Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Copyright (C) 2017-2018 Daniel Engberg <daniel.engberg.lists@pyret.net>
  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:=libidn2
  9. PKG_VERSION:=2.0.5
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0-or-later LGPL-3.0-or-later
  12. PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYING.LESSERv3
  13. PKG_CPE_ID:=cpe:/a:libidn2_project:libidn2
  14. PKG_SOURCE_URL:=@GNU/libidn
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  16. PKG_HASH:=53f69170886f1fa6fa5b332439c7a77a7d22626a82ef17e2c1224858bb4ca2b8
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk
  20. define Package/idn2/Default
  21. SECTION:=net
  22. CATEGORY:=Network
  23. URL:=http://www.gnu.org/software/libidn/
  24. endef
  25. define Package/idn2/Default/description
  26. Libidn2 is a free software implementation of IDNA2008,
  27. Punycode and TR46 in library form. It contains
  28. functionality to convert internationalized domain
  29. names to and from ASCII Compatible Encoding (ACE),
  30. following the IDNA2008 and TR46 standards.
  31. endef
  32. define Package/idn2
  33. $(call Package/idn2/Default)
  34. SUBMENU:=IP Addresses and Names
  35. TITLE:=GNU IDN2 (Internationalized Domain Name) tool
  36. DEPENDS:=+libidn2
  37. endef
  38. define Package/idn2/description
  39. $(call Package/idn2/Default/description)
  40. Command line tool using libidn2
  41. endef
  42. define Package/libidn2
  43. SECTION:=libs
  44. CATEGORY:=Libraries
  45. DEPENDS:=+libunistring $(ICONV_DEPENDS) $(INTL_DEPENDS)
  46. TITLE:=International domain name library (IDNA2008, Punycode and TR46)
  47. URL:=https://www.gnu.org/software/libidn/#libidn2
  48. endef
  49. define Package/libidn2/description
  50. $(call Package/idn2/Default/description)
  51. Library only package
  52. endef
  53. CONFIGURE_ARGS += \
  54. --disable-rpath \
  55. --disable-doc
  56. define Build/InstallDev
  57. $(INSTALL_DIR) $(1)/usr/include
  58. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/idn2.h $(1)/usr/include
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
  61. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  62. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn2.pc $(1)/usr/lib/pkgconfig/
  63. endef
  64. define Package/idn2/install
  65. $(INSTALL_DIR) $(1)/usr/bin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  67. endef
  68. define Package/libidn2/install
  69. $(INSTALL_DIR) $(1)/usr/lib/
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  71. endef
  72. $(eval $(call BuildPackage,idn2))
  73. $(eval $(call BuildPackage,libidn2))