replace lots of manual install commands with INSTALL_* variables
[openwrt/svn-archive/archive.git] / libs / libiconv / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libiconv
12 PKG_VERSION:=1.9.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/libiconv
17 PKG_MD5SUM:=0c99a05e0c3c153bac1c960f78711155
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libiconv
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Character set conversion library
29 URL:=http://www.gnu.org/software/libiconv/
30 endef
31
32 define Build/Configure
33 $(call Build/Configure/Default, \
34 --enable-shared \
35 --enable-static \
36 --disable-rpath \
37 )
38 endef
39
40 define Build/Compile
41 $(MAKE) -C $(PKG_BUILD_DIR) \
42 CC="$(TARGET_CC)"
43 $(MAKE) -C $(PKG_BUILD_DIR) \
44 includedir="$(PKG_INSTALL_DIR)/usr/include" \
45 libdir="$(PKG_INSTALL_DIR)/usr/lib" \
46 all install-lib
47 endef
48
49 define Build/InstallDev
50 mkdir -p $(STAGING_DIR)/usr/lib/libiconv/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(STAGING_DIR)/usr/lib/libiconv/include/
52 mkdir -p $(STAGING_DIR)/usr/lib/libiconv/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.{a,so*} $(STAGING_DIR)/usr/lib/libiconv/lib/
54 endef
55
56 define Build/UninstallDev
57 rm -rf $(STAGING_DIR)/usr/lib/libiconv
58 endef
59
60 define Package/libiconv/install
61 $(INSTALL_DIR) $(1)/usr/lib
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiconv.so.* $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,libiconv))