source: branches/packages_8.09/libs/curl/Makefile @ 17309

Last change on this file since 17309 was 17309, checked in by nico, 7 years ago

[packages] curl: fix handling of '\0' character in domain names of x509 certificates

  • CVE-2009-2417
  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1#
2# Copyright (C) 2007 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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=curl
12PKG_VERSION:=7.17.1
13PKG_RELEASE:=1.1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
17        http://www.mirrorspace.org/curl/ \
18        http://curl.mirror.internet.tp/download/ \
19        ftp://ftp.sunet.se/pub/www/utilities/curl/ \
20        ftp://ftp.planetmirror.com/pub/curl/ \
21        http://www.mirrormonster.com/curl/download/ \
22        http://curl.mirrors.cyberservers.net/download/
23PKG_MD5SUM:=1fa635d1dfde8337c98c82749d75c1de
24
25PKG_FIXUP = libtool
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  DEPENDS:=+libcurl
38  TITLE:=A client-side URL transfer library
39endef
40
41define Package/libcurl
42  $(call Package/curl/Default)
43  SECTION:=libs
44  CATEGORY:=Libraries
45  DEPENDS:=+libopenssl +zlib
46  TITLE:=A client-side URL transfer utility
47endef
48
49TARGET_CFLAGS += $(FPIC)
50
51CONFIGURE_ARGS += \
52        --enable-shared \
53        --enable-static \
54        --disable-thread \
55        --enable-cookies \
56        --enable-crypto-auth \
57        --enable-nonblocking \
58        --enable-file \
59        --enable-ftp \
60        --enable-http \
61        --enable-ipv6 \
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        --with-zlib="$(STAGING_DIR)/usr" \
80
81CONFIGURE_VARS += \
82        LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
83        CC="$(filter-out ccache,$(TARGET_CC))"
84
85define Build/Configure
86        $(call Build/Configure/Default,,bash)
87endef
88
89define Build/Compile
90        $(MAKE) -C $(PKG_BUILD_DIR) \
91                DESTDIR="$(PKG_INSTALL_DIR)" \
92                CC="$(TARGET_CC)" \
93                install
94endef
95
96define Build/InstallDev
97        $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
98        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
99        $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
100        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
101        $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
102        $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
103        $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc
104        ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
105endef
106
107define Package/curl/install
108        $(INSTALL_DIR) $(1)/usr/bin
109        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
110endef
111
112define Package/libcurl/install
113        $(INSTALL_DIR) $(1)/usr/lib
114        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
115endef
116
117$(eval $(call BuildPackage,curl))
118$(eval $(call BuildPackage,libcurl))
Note: See TracBrowser for help on using the repository browser.