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