source: packages/libs/curl/Makefile @ 26066

Last change on this file since 26066 was 26066, checked in by cshore, 5 years ago

[net] File Transfer: Moved old FTP category and combined with other file transfer programs (HTTP, uucp, rsync, TFTP) to create the FIle Transfer submenu.

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1#
2# Copyright (C) 2007-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=curl
11PKG_VERSION:=7.21.3
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
16        http://www.mirrorspace.org/curl/ \
17        http://curl.mirror.internet.tp/download/ \
18        ftp://ftp.sunet.se/pub/www/utilities/curl/ \
19        ftp://ftp.planetmirror.com/pub/curl/ \
20        http://www.mirrormonster.com/curl/download/ \
21        http://curl.mirrors.cyberservers.net/download/
22PKG_MD5SUM:=5b57fee22090b5c43a6886fdd35af2ce
23
24PKG_FIXUP:=libtool
25PKG_BUILD_PARALLEL:=1
26
27include $(INCLUDE_DIR)/package.mk
28
29define Package/curl/Default
30  SECTION:=net
31  CATEGORY:=Network
32  URL:=http://curl.haxx.se/
33endef
34
35define Package/curl
36  $(call Package/curl/Default)
37  SUBMENU:=File Transfer
38  DEPENDS:=+libcurl
39  TITLE:=A client-side URL transfer utility
40endef
41
42define Package/libcurl
43  $(call Package/curl/Default)
44  SECTION:=libs
45  CATEGORY:=Libraries
46  DEPENDS:=+libopenssl +zlib
47  TITLE:=A client-side URL transfer library
48endef
49
50TARGET_CFLAGS += $(FPIC)
51
52CONFIGURE_ARGS += \
53        --enable-shared \
54        --enable-static \
55        --disable-thread \
56        --enable-cookies \
57        --enable-crypto-auth \
58        --enable-nonblocking \
59        --enable-file \
60        --enable-ftp \
61        --enable-http \
62        --disable-ares \
63        --disable-debug \
64        --disable-dict \
65        --disable-gopher \
66        --disable-ldap \
67        --disable-manual \
68        --disable-sspi \
69        --disable-telnet \
70        --enable-tftp \
71        --disable-verbose \
72        --with-random="/dev/urandom" \
73        --with-ssl="$(STAGING_DIR)/usr" \
74        --without-ca-bundle \
75        --without-gnutls \
76        --without-krb4 \
77        --without-libidn \
78        --without-nss \
79        --without-libssh2 \
80        --with-zlib="$(STAGING_DIR)/usr" \
81        $(call autoconf_bool,CONFIG_IPV6,ipv6) \
82
83CONFIGURE_VARS += \
84        LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
85        CC="$(filter-out ccache,$(TARGET_CC))"
86
87#define Build/Configure
88#       (cd $(PKG_BUILD_DIR); \
89#               autoreconf -v --install || exit 1 \
90#       );
91#       $(call Build/Configure/Default)
92#endef
93
94define Build/Compile
95        $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
96                DESTDIR="$(PKG_INSTALL_DIR)" \
97                CC="$(TARGET_CC)" \
98                install
99endef
100
101define Build/InstallDev
102        $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
103        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
104        $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
105        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
106        $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
107        $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
108        $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc
109        ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
110endef
111
112define Package/curl/install
113        $(INSTALL_DIR) $(1)/usr/bin
114        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
115endef
116
117define Package/libcurl/install
118        $(INSTALL_DIR) $(1)/usr/lib
119        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
120endef
121
122$(eval $(call BuildPackage,curl))
123$(eval $(call BuildPackage,libcurl))
Note: See TracBrowser for help on using the repository browser.