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 pathlibcurl.mk
103 lines (82 loc) · 2.92 KB
/
libcurl.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#########################################################
# libcurl for uClinux and Asterisk,
# Keith Huang Feb 2008
# SSL supported added by Nick Basil Sep 2008
#
# usage: make -f libcurl.mk libcurl-package
#
# Run after building uClinux-dist, copies shared libs to
# uClinux-dist/staging, ready for use in Asterisk if
# required.
#
# Requires libssl (make -f libssl.mk libssl) which transfers
# libcrypto and libssl to the staging area.
#
#########################################################
include rules.mk
LIBCURL_SITE=http://curl.haxx.se/download
LIBCURL_VERSION=7.18.0
LIBCURL_SOURCE=curl-7.18.0.tar.gz
LIBCURL_UNZIP=zcat
LIBCURL_DIR=$(BUILD_DIR)/curl-$(LIBCURL_VERSION)
LIBCURL_CFLAGS="CFLAGS=-I$(STAGING_DIR)/usr/include"
LIBCURL_LDFLAGS="LDFLAGS=-L$(STAGING_DIR)/usr/lib -lcrypto -lssl"
LIBCURL_CONFIGURE_OPTS=--host=bfin-linux-uclibc \
--prefix=$(TARGET_DIR) \
--disable-nls \
--without-libidn \
--disable-ldap \
--disable-ipv6 \
--without-ca-path \
--without-ca-bundle \
--with-random="/dev/urandom"
TARGET_DIR=$(BUILD_DIR)/tmp/libcurl/ipkg/libcurl
PKG_NAME:=libcurl
PKG_VERSION:=$(LIBCURL_VERSION)
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/tmp/libcurl
$(DL_DIR)/$(LIBCURL_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBCURL_SITE)/$(LIBCURL_SOURCE)
libcurl-source: $(DL_DIR)/$(LIBCURL_SOURCE)
$(LIBCURL_DIR)/.unpacked: $(DL_DIR)/$(LIBCURL_SOURCE)
tar -xzvf $(DL_DIR)/$(LIBCURL_SOURCE)
touch $(LIBCURL_DIR)/.unpacked
$(LIBCURL_DIR)/.configured: $(LIBCURL_DIR)/.unpacked
cd $(LIBCURL_DIR); ./configure $(LIBCURL_CONFIGURE_OPTS) $(LIBCURL_CFLAGS) $(LIBCURL_LDFLAGS)
#setup directories for package
rm -Rf $(TARGET_DIR)
mkdir -p $(TARGET_DIR)/lib
mkdir -p $(TARGET_DIR)/bin
touch $(LIBCURL_DIR)/.configured
libcurl: $(LIBCURL_DIR)/.configured
make -C $(LIBCURL_DIR)/ STAGEDIR=$(STAGING_DIR)
cp -f $(LIBCURL_DIR)/src/.libs/curl* $(TARGET_DIR)/bin
#copy tp package location
cp -f $(LIBCURL_DIR)/lib/.libs/libcurl.so.4 $(TARGET_DIR)/lib
cp -f $(STAGING_DIR)/usr/lib/libcrypto.so.0.9.8 $(TARGET_DIR)/lib
cp -f $(STAGING_DIR)/usr/lib/libssl.so.0.9.8 $(TARGET_DIR)/lib
touch $(PKG_BUILD_DIR)/.built
all: libcurl
dirclean:
rm -rf $(LIBCURL_DIR)
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=Libcurl
DESCRIPTION:=\
Curl is a command line tool for transferring files with URL syntax,\
supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP.\
Curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos,\ HTTP form based upload, proxies, cookies, user+password authentication,\
file transfer resume, http proxy tunneling and a busload of other useful\
tricks.
LIBCURL_SECTION=libs
URL:=http://www.libcurl.org
endef
#post installation - do nothing
define Package/$(PKG_NAME)/postinst
endef
#pre-remove
define Package/$(PKG_NAME)/prerm
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
libcurl-package: libcurl $(PACKAGE_DIR)/$(PKG_NAME)_$(VERSION)_$(PKGARCH).ipk