aboutsummaryrefslogtreecommitdiff
path: root/libs/libidn2/Makefile
blob: d8919c03e2d96e3e54c0f540a906635a81210cc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# Copyright (C) 2017-2018 Daniel Engberg <daniel.engberg.lists@pyret.net>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=libidn2
PKG_VERSION:=2.3.7
PKG_RELEASE:=1

PKG_SOURCE_URL:=@GNU/libidn
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=4c21a791b610b9519b9d0e12b8097bf2f359b12f8dd92647611a929e6bfd7d64

PKG_MAINTAINER:=
PKG_CPE_ID:=cpe:/a:gnu:libidn2

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk

define Package/idn2/Default
  SECTION:=net
  CATEGORY:=Network
  URL:=http://www.gnu.org/software/libidn/
endef

define Package/idn2/Default/description
  Libidn2 is a free software implementation of IDNA2008,
  Punycode and TR46 in library form. It contains
  functionality to convert internationalized domain
  names to and from ASCII Compatible Encoding (ACE),
  following the IDNA2008 and TR46 standards.
endef

define Package/idn2
  $(call Package/idn2/Default)
  SUBMENU:=IP Addresses and Names
  TITLE:=GNU IDN2 (Internationalized Domain Name) tool
  DEPENDS:=+libidn2
  LICENSE:=GPL-2.0-or-later
  LICENSE_FILES:=COPYINGv2
endef

define Package/idn2/description
$(call Package/idn2/Default/description)

  Command line tool using libidn2

endef

define Package/libidn2
  SECTION:=libs
  CATEGORY:=Libraries
  DEPENDS:=+libunistring $(ICONV_DEPENDS) $(INTL_DEPENDS)
  TITLE:=International domain name library (IDNA2008, Punycode and TR46)
  URL:=https://www.gnu.org/software/libidn/#libidn2
  LICENSE:=LGPL-3.0-or-later
  LICENSE_FILES:=COPYING.LESSERv3
endef

define Package/libidn2/description
$(call Package/idn2/Default/description)

  Library only package

endef

CONFIGURE_ARGS += \
	--disable-rpath \
	--disable-doc

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include
	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/idn2.h $(1)/usr/include
	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn2.pc $(1)/usr/lib/pkgconfig/
endef

define Package/idn2/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef

define Package/libidn2/install
	$(INSTALL_DIR) $(1)/usr/lib/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,idn2))
$(eval $(call BuildPackage,libidn2))