Fresh pull from upstream (stable) package feed
[librecmc/package-feed.git] / libs / libidn / Makefile
1 #
2 # Copyright (C) 2009-2016 OpenWrt.org
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:=libidn
11 PKG_VERSION:=1.33
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/libidn
16 PKG_MD5SUM:=a9aa7e003665de9c82bd3f9fc6ccf308
17
18 PKG_LICENSE:=GPL-2.0+ GPL-3.0+ LGPL-2.1+ LGPL-3.0+ Apache-2.0
19 PKG_LICENSE_FILES:=COPYING COPYINGv2 COPYINGv3 COPYING.LESSERv2 COPYING.LESSERv3 java/LICENSE-2.0.txt
20
21 PKG_FIXUP:=autoreconf
22 PKG_REMOVE_FILES:=GNUmakefile aclocal.m4
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/idn/Default
28   SECTION:=net
29   CATEGORY:=Network
30   URL:=http://www.gnu.org/software/libidn/
31   MAINTAINER:=Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
32 endef
33
34 define Package/idn/Default/description
35   GNU Libidn is a fully documented implementation of the Stringprep,
36   Punycode and IDNA specifications. Libidn's purpose is to encode and
37   decode internationalized domain names.
38 endef
39
40 define Package/idn
41   $(call Package/idn/Default)
42   SUBMENU:=IP Addresses and Names
43   TITLE:=GNU IDN (Internationalized Domain Name) tool
44   DEPENDS:=+libidn
45 endef
46
47 define Package/idn/description
48 $(call Package/idn/Default/description)
49
50   Command line tool using libidn
51
52 endef
53
54 define Package/libidn
55   $(call Package/idn/Default)
56   SECTION:=libs
57   CATEGORY:=Libraries
58   TITLE:=Stringprep, Punycode and IDNA implementation
59 endef
60
61 define Package/libidn/description
62 $(call Package/idn/Default/description)
63
64   Library only package
65
66 endef
67
68 TARGET_CFLAGS += $(FPIC)
69
70 CONFIGURE_ARGS += \
71         --enable-shared \
72         --enable-static \
73
74 MAKE_FLAGS += \
75         CC="$(TARGET_CC)" \
76
77 define Build/InstallDev
78         $(INSTALL_DIR) $(1)/usr/include
79         $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
80         $(INSTALL_DIR) $(1)/usr/lib
81         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/
82         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
83         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libidn.pc $(1)/usr/lib/pkgconfig/
84 endef
85
86 define Package/idn/install
87         $(INSTALL_DIR) $(1)/usr/bin
88         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
89 endef
90
91 define Package/libidn/install
92         $(INSTALL_DIR) $(1)/usr/lib
93         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.so* $(1)/usr/lib/
94 endef
95
96 $(eval $(call BuildPackage,idn))
97 $(eval $(call BuildPackage,libidn))