8476149dc46b72114d942dd37c9e19fdb7cdbd54
[openwrt/svn-archive/archive.git] / libs / libiconv / Makefile
1 # Copyright (C) 2006 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:=libiconv
11 PKG_VERSION:=1.9.1
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=0c99a05e0c3c153bac1c960f78711155
14
15 PKG_SOURCE_URL:=@GNU/libiconv
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_CAT:=zcat
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libiconv
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=character set conversion library
28 DESCRIPTION:=character set conversion library
29 URL:=http://www.gnu.org/software/libiconv/
30 endef
31
32 define Build/Compile
33 $(MAKE) -C $(PKG_BUILD_DIR) \
34 CC="$(TARGET_CC)"
35 rm -rf $(PKG_INSTALL_DIR)
36 mkdir -p $(PKG_INSTALL_DIR)
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 libdir="$(PKG_INSTALL_DIR)/usr/lib" \
39 includedir="$(PKG_INSTALL_DIR)/usr/include" \
40 install-lib
41 endef
42
43 define Package/libiconv/install
44 install -d -m0755 $(1)/usr/lib
45 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.so* $(1)/usr/lib/
46 chmod 0644 $(1)/usr/lib/*
47 endef
48
49 define Build/InstallDev
50 mkdir -p $(STAGING_DIR)/usr/include/iconv
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(STAGING_DIR)/usr/include/iconv
52 mkdir -p $(STAGING_DIR)/usr/lib/iconv
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.* $(STAGING_DIR)/usr/lib/iconv
54 endef
55
56 define Build/UninstallDev
57 rm -rf \
58 $(STAGING_DIR)/usr/include/iconv \
59 $(STAGING_DIR)/usr/lib/iconv
60 endef
61
62 $(eval $(call BuildPackage,libiconv))