c023b5298d9b5d70edc3e81a92c9197c910dfb4f
[feed/packages.git] / libs / libidn2 / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libidn2
11 PKG_VERSION:=2.0.4
12 PKG_RELEASE:=1
13 PKG_MAINTAINER:=Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
14 PKG_LICENSE:=GPL-2.0-or-later LGPL-3.0-or-later
15 PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYING.LESSERv3
16
17 PKG_SOURCE_URL:=@GNU/libidn
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19 PKG_HASH:=644b6b03b285fb0ace02d241d59483d98bc462729d8bb3608d5cad5532f3d2f0
20
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/nls.mk
25
26 define Package/idn2/Default
27 SECTION:=net
28 CATEGORY:=Network
29 URL:=http://www.gnu.org/software/libidn/
30 endef
31
32 define Package/idn2/Default/description
33 Libidn2 is a free software implementation of IDNA2008,
34 Punycode and TR46 in library form. It contains
35 functionality to convert internationalized domain
36 names to and from ASCII Compatible Encoding (ACE),
37 following the IDNA2008 and TR46 standards.
38 endef
39
40 define Package/idn2
41 $(call Package/idn2/Default)
42 SUBMENU:=IP Addresses and Names
43 TITLE:=GNU IDN2 (Internationalized Domain Name) tool
44 DEPENDS:=+libidn2
45 endef
46
47 define Package/idn2/description
48 $(call Package/idn2/Default/description)
49
50 Command line tool using libidn2
51
52 endef
53
54 define Package/libidn2
55 SECTION:=libs
56 CATEGORY:=Libraries
57 DEPENDS:=+libunistring $(ICONV_DEPENDS) $(INTL_DEPENDS)
58 TITLE:=International domain name library (IDNA2008, Punycode and TR46)
59 URL:=https://www.gnu.org/software/libidn/#libidn2
60 endef
61
62 define Package/libidn2/description
63 $(call Package/idn2/Default/description)
64
65 Library only package
66
67 endef
68
69 CONFIGURE_ARGS += \
70 --disable-rpath \
71 --disable-doc
72
73 define Build/InstallDev
74 $(INSTALL_DIR) $(1)/usr/include
75 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/idn2.h $(1)/usr/include
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
78 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn2.pc $(1)/usr/lib/pkgconfig/
80 endef
81
82 define Package/idn2/install
83 $(INSTALL_DIR) $(1)/usr/bin
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
85 endef
86
87 define Package/libidn2/install
88 $(INSTALL_DIR) $(1)/usr/lib/
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
90 endef
91
92 $(eval $(call BuildPackage,idn2))
93 $(eval $(call BuildPackage,libidn2))