8c68c12d1d71769f2eb594bffbd6b826b0457f18
[openwrt/staging/mkresin.git] / package / libs / libiconv-full / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=libiconv-full
11 PKG_VERSION:=1.11.1
12 PKG_RELEASE:=1
13
14 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
15
16 PKG_SOURCE:=libiconv-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@GNU/libiconv
18 PKG_MD5SUM:=d42b97f6ef5dd0ba4469d520ed732fed
19 PKG_BUILD_DIR:=$(BUILD_DIR)/libiconv-$(PKG_VERSION)
20
21 PKG_LICENSE:=LGPL-2.0+
22 PKG_LICENSE_FILES:=COPYING.LIB
23
24 PKG_FIXUP:=patch-libtool
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libiconv-full/Default
29 URL:=http://www.gnu.org/software/libiconv/
30 TITLE:=Character set conversion
31 endef
32
33 define Package/libiconv-full
34 $(call Package/libiconv-full/Default)
35 SECTION:=libs
36 CATEGORY:=Libraries
37 TITLE+= library
38 endef
39
40 define Package/libcharset
41 $(call Package/libiconv-full/Default)
42 SECTION:=libs
43 CATEGORY:=Libraries
44 TITLE+= library
45 endef
46
47 define Package/iconv
48 $(call Package/libiconv-full/Default)
49 DEPENDS:=+libiconv-full +libcharset
50 SECTION:=utils
51 CATEGORY:=Utilities
52 TITLE+= utility
53 endef
54
55 TARGET_CFLAGS += $(FPIC) -DUSE_DOS
56
57 CONFIGURE_ARGS += \
58 --enable-shared \
59 --enable-static \
60 --disable-rpath \
61 --enable-relocatable
62
63 define Build/Compile
64 $(MAKE) -C $(PKG_BUILD_DIR) \
65 CC="$(TARGET_CC)" \
66 DESTDIR="$(PKG_INSTALL_DIR)" \
67 install
68 endef
69
70 define Build/InstallDev
71 $(INSTALL_DIR) $(1)/usr/lib/libiconv-full/include
72 $(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(1)/usr/lib/libiconv-full/include/
73
74 $(INSTALL_DIR) $(1)/usr/lib/libiconv-full/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcharset.{a,so*} $(1)/usr/lib/libiconv-full/lib/
76 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.{a,so*} $(1)/usr/lib/libiconv-full/lib/
77 endef
78
79 define Package/libcharset/install
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcharset.so* $(1)/usr/lib/
82 endef
83
84 define Package/libiconv-full/install
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.so* $(1)/usr/lib/
87 endef
88
89 define Package/iconv/install
90 $(INSTALL_DIR) $(1)/usr/bin
91 $(CP) $(PKG_INSTALL_DIR)/usr/bin/iconv $(1)/usr/bin/
92 endef
93
94 $(eval $(call BuildPackage,libcharset))
95 $(eval $(call BuildPackage,libiconv-full))
96 $(eval $(call BuildPackage,iconv))