[Packages] libs/curl: LDFLAGS required after upgrade to 7.17.1
[openwrt/svn-archive/archive.git] / libs / curl / Makefile
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
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=curl
12 PKG_VERSION:=7.17.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_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/
23 PKG_MD5SUM:=1fa635d1dfde8337c98c82749d75c1de
24
25 PKG_FIXUP = libtool
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/curl/Default
30 SECTION:=net
31 CATEGORY:=Network
32 URL:=http://curl.haxx.se/
33 endef
34
35 define Package/curl
36 $(call Package/curl/Default)
37 DEPENDS:=+libcurl
38 TITLE:=A client-side URL transfer library
39 endef
40
41 define 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
47 endef
48
49 CONFIGURE_ARGS += \
50 --enable-shared \
51 --enable-static \
52 --disable-thread \
53 --enable-cookies \
54 --enable-crypto-auth \
55 --enable-nonblocking \
56 --enable-file \
57 --enable-ftp \
58 --enable-http \
59 --enable-ipv6 \
60 --disable-ares \
61 --disable-debug \
62 --disable-dict \
63 --disable-gopher \
64 --disable-ldap \
65 --disable-manual \
66 --disable-sspi \
67 --disable-telnet \
68 --enable-tftp \
69 --disable-verbose \
70 --with-random="/dev/urandom" \
71 --with-ssl="$(STAGING_DIR)/usr" \
72 --without-ca-bundle \
73 --without-gnutls \
74 --without-krb4 \
75 --without-libidn \
76 --without-nss \
77 --with-zlib="$(STAGING_DIR)/usr" \
78 --disable-gssapi \
79
80 CONFIGURE_VARS += \
81 LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
82
83 define Build/Compile
84 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
85 endef
86
87 define Build/InstallDev
88 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
90 $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
92 $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
93 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
94 $(SED) 's,$(TARGET_LDFLAGS),,g' $(1)/usr/lib/pkgconfig/libcurl.pc
95 ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
96 endef
97
98 define Package/curl/install
99 $(INSTALL_DIR) $(1)/usr/bin
100 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
101 endef
102
103 define Package/libcurl/install
104 $(INSTALL_DIR) $(1)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
106 endef
107
108 $(eval $(call BuildPackage,curl))
109 $(eval $(call BuildPackage,libcurl))