This repository has been archived by the owner on Jan 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlibiconv.mk
83 lines (63 loc) · 2.14 KB
/
libiconv.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#########################################################
# libiconv.mk
# David Rowe March 2008
#
# usage: make -f libiconv.mk libiconv-package
#
# Required for PHP to ./configure OK, but doesn't seem to be
# required at run time. Perhaps PHP links with the static
# lib, not sure. It get errors from PHP build re the
# the inconv.h if this is not built.
#
#########################################################
include rules.mk
LIBICONV_SITE=http://ftp.gnu.org/pub/gnu/libiconv/
LIBICONV_VERSION=1.12
LIBICONV_SOURCE=libiconv-$(LIBICONV_VERSION).tar.gz
LIBICONV_UNZIP=zcat
LIBICONV_DIR=$(BUILD_DIR)/libiconv-$(LIBICONV_VERSION)
LIBICONV_CONFIGURE_OPTS=--host=bfin-linux-uclibc --enable-shared \
--disable-rpath --prefix=$(TARGET_DIR)
TARGET_DIR=$(BUILD_DIR)/tmp/libiconv/ipkg/libiconv
PKG_NAME:=libiconv
PKG_VERSION:=$(LIBICONV_VERSION)
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/tmp/libiconv
$(DL_DIR)/$(LIBICONV_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBICONV_SITE)/$(LIBICONV_SOURCE)
libiconv-source: $(DL_DIR)/$(LIBICONV_SOURCE)
$(LIBICONV_DIR)/.unpacked: $(DL_DIR)/$(LIBICONV_SOURCE)
tar -xzvf $(DL_DIR)/$(LIBICONV_SOURCE)
touch $(LIBICONV_DIR)/.unpacked
$(LIBICONV_DIR)/.configured: $(LIBICONV_DIR)/.unpacked
cd $(LIBICONV_DIR); ./configure $(LIBICONV_CONFIGURE_OPTS)
#setup directories for package
rm -Rf $(TARGET_DIR)
mkdir -p $(TARGET_DIR)/lib
touch $(LIBICONV_DIR)/.configured
libiconv: $(LIBICONV_DIR)/.configured
make -C $(LIBICONV_DIR)
make -C $(LIBICONV_DIR) install
cp $(TARGET_DIR)/include/* $(STAGING_DIR)/usr/include
cp $(TARGET_DIR)/lib/* $(STAGING_DIR)/usr/lib
rm -Rf $(TARGET_DIR)/bin
rm -Rf $(TARGET_DIR)/share
rm -Rf $(TARGET_DIR)/include
touch $(PKG_BUILD_DIR)/.built
all: libiconv
dirclean:
rm -rf $(LIBICONV_DIR)
define Package/$(PKG_NAME)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Character set conversion library
URL:=http://www.gnu.org/software/libiconv/
endef
#post installation - do nothing
define Package/$(PKG_NAME)/postinst
endef
#pre-remove
define Package/$(PKG_NAME)/prerm
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
libiconv-package: libiconv $(PACKAGE_DIR)/$(PKG_NAME)_$(VERSION)_$(PKGARCH).ipk