[packages] libiconv: extend the library to support more charset conversions
[packages.git] / libs / libiconv / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This Makefile and the code shipped in src/ is free software, licensed
5 # under the GNU Lesser General Public License, version 2.1 and later.
6 # See src/COPYING for more information.
7 #
8 # Refer to src/COPYRIGHT for copyright statements on the source files.
9 #
10
11 include $(TOPDIR)/rules.mk
12
13 PKG_NAME:=libiconv
14 PKG_RELEASE:=3
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/libiconv
19   SECTION:=libs
20   CATEGORY:=Libraries
21   TITLE:=Tiny drop-in replacement for the GNU Character set conversion library
22 endef
23
24 define Build/Prepare
25         $(INSTALL_DIR) $(PKG_BUILD_DIR)
26         $(CP) ./src/* $(PKG_BUILD_DIR)/
27 endef      
28
29 define Build/Configure
30 endef
31
32 define Build/Compile
33         $(TARGET_CC) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC)
34         $(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o
35 endef
36
37 define Build/InstallDev
38         $(INSTALL_DIR) $(1)/usr/lib
39         $(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/
40
41         $(INSTALL_DIR) $(1)/usr/include
42         $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/include/
43
44         $(INSTALL_DIR) $(1)/usr/share/aclocal
45         $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/
46 endef
47
48 define Package/libiconv/install
49         $(INSTALL_DIR) $(1)/tmp
50         touch $(1)/tmp/.libiconv-placeholder
51 endef
52
53 $(eval $(call BuildPackage,libiconv))