source: packages/libs/curl/Makefile @ 16105

Last change on this file since 16105 was 16105, checked in by florian, 8 years ago

[package] update curl to 7.19.5 (#5219)

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=curl
11PKG_VERSION:=7.19.5
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:=426d161661dce70c8ea9ad8f553363a3
23
24PKG_FIXUP = libtool
25
26include $(INCLUDE_DIR)/package.mk
27
28define Package/curl/Default
29  SECTION:=net
30  CATEGORY:=Network
31  URL:=http://curl.haxx.se/
32endef
33
34define Package/curl
35  $(call Package/curl/Default)
36  DEPENDS:=+libcurl
37  TITLE:=A client-side URL transfer library
38endef
39
40define Package/libcurl
41  $(call Package/curl/Default)
42  SECTION:=libs
43  CATEGORY:=Libraries
44  DEPENDS:=+libopenssl +zlib
45  TITLE:=A client-side URL transfer utility
46endef
47
48TARGET_CFLAGS += $(FPIC)
49
50CONFIGURE_ARGS += \
51        --enable-shared \
52        --enable-static \
53        --disable-thread \
54        --enable-cookies \
55        --enable-crypto-auth \
56        --enable-nonblocking \
57        --enable-file \
58        --enable-ftp \
59        --enable-http \
60        --enable-ipv6 \
61        --disable-ares \
62        --disable-debug \
63        --disable-dict \
64        --disable-gopher \
65        --disable-ldap \
66        --disable-manual \
67        --disable-sspi \
68        --disable-telnet \
69        --enable-tftp \
70        --disable-verbose \
71        --with-random="/dev/urandom" \
72        --with-ssl="$(STAGING_DIR)/usr" \
73        --without-ca-bundle \
74        --without-gnutls \
75        --without-krb4 \
76        --without-libidn \
77        --without-nss \
78        --without-libssh2 \
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.