d61506f18178219991e486251e90b3413d36e430
[packages.git] / libs / libidn / Makefile
1 # Copyright (C) 2009 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id: $
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libidn
11 PKG_VERSION:=1.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/libidn
16 PKG_MD5SUM:=49db2165868d3ec2af00e0b7d0924dd8
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libidn
21   SECTION:=libs
22   CATEGORY:=Libraries
23   TITLE:=Stringprep, Punycode and IDNA implementation
24   URL:=http://www.gnu.org/software/libidn/
25 endef
26
27 define Package/libgmp/description
28   GNU Libidn is a fully documented implementation of the Stringprep,
29   Punycode and IDNA specifications. Libidn's purpose is to encode and
30   decode internationalized domain names.
31 endef
32
33 TARGET_CFLAGS += $(FPIC)
34 CONFIGURE_VARS += CC="$(TARGET_CROSS)gcc"
35 CONFIGURE_ARGS += \
36         --enable-shared \
37         --enable-static \
38
39 define Build/Compile
40         $(call Build/Compile/Default, \
41                 DESTDIR="$(PKG_INSTALL_DIR)" \
42                 CC="$(TARGET_CC)" \
43                 all install \
44         )
45 endef
46
47 define Build/InstallDev
48         mkdir -p $(1)/usr/include
49         $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
50         mkdir -p $(1)/usr/lib
51         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/
52 endef
53
54 define Package/libidn/install
55         $(INSTALL_DIR) $(1)/usr/lib
56         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.so.* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,libidn))