0a07441eb4aff8372784bd4bff6737011ad28c85
[openwrt/svn-archive/archive.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
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=libidn
10 PKG_VERSION:=1.15
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=@GNU/libidn
15 PKG_MD5SUM:=482a25b7b223e52f967fafd284a1a992
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/libidn
20 SECTION:=libs
21 CATEGORY:=Libraries
22 TITLE:=Stringprep, Punycode and IDNA implementation
23 URL:=http://www.gnu.org/software/libidn/
24 endef
25
26 define Package/libidn/description
27 GNU Libidn is a fully documented implementation of the Stringprep,
28 Punycode and IDNA specifications. Libidn's purpose is to encode and
29 decode internationalized domain names.
30 endef
31
32 TARGET_CFLAGS += $(FPIC)
33
34 CONFIGURE_ARGS += \
35 --enable-shared \
36 --enable-static \
37
38 define Build/Compile
39 $(call Build/Compile/Default, \
40 DESTDIR="$(PKG_INSTALL_DIR)" \
41 CC="$(TARGET_CC)" \
42 all install \
43 )
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)/usr/include
48 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
49 $(INSTALL_DIR) $(1)/usr/lib
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.{a,so*} $(1)/usr/lib/
51 endef
52
53 define Package/libidn/install
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libidn.so.* $(1)/usr/lib/
56 endef
57
58 $(eval $(call BuildPackage,libidn))