Update to 7.17.1 and add tftp support
[openwrt/svn-archive/archive.git] / libs / curl / Makefile
1 #
2 # Copyright (C) 2006 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 define Build/Compile
81 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
82 endef
83
84 define Build/InstallDev
85 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
87 $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
89 $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
90 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
91 $(SED) 's,$(TARGET_LDFLAGS),,g' $(1)/usr/lib/pkgconfig/libcurl.pc
92 ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
93 endef
94
95 define Package/curl/install
96 $(INSTALL_DIR) $(1)/usr/bin
97 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
98 endef
99
100 define Package/libcurl/install
101 $(INSTALL_DIR) $(1)/usr/lib
102 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
103 endef
104
105 $(eval $(call BuildPackage,curl))
106 $(eval $(call BuildPackage,libcurl))