[package] fix inverted libcurl/curl descriptions (#7648)
[openwrt/svn-archive/archive.git] / libs / curl / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=curl
11 PKG_VERSION:=7.19.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_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/
22 PKG_MD5SUM:=8402c1f654c51ad7287aad57c3aa79be
23
24 PKG_FIXUP = libtool
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/curl/Default
29 SECTION:=net
30 CATEGORY:=Network
31 URL:=http://curl.haxx.se/
32 endef
33
34 define Package/curl
35 $(call Package/curl/Default)
36 DEPENDS:=+libcurl
37 TITLE:=A client-side URL transfer utility
38 endef
39
40 define Package/libcurl
41 $(call Package/curl/Default)
42 SECTION:=libs
43 CATEGORY:=Libraries
44 DEPENDS:=+libopenssl +zlib
45 TITLE:=A client-side URL transfer library
46 endef
47
48 TARGET_CFLAGS += $(FPIC)
49
50 CONFIGURE_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 --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 --without-libssh2 \
78 --with-zlib="$(STAGING_DIR)/usr" \
79
80 CONFIGURE_VARS += \
81 LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
82 CC="$(filter-out ccache,$(TARGET_CC))"
83
84 define Build/Configure
85 $(call Build/Configure/Default,,bash)
86 endef
87
88 define Build/Compile
89 $(MAKE) -C $(PKG_BUILD_DIR) \
90 DESTDIR="$(PKG_INSTALL_DIR)" \
91 CC="$(TARGET_CC)" \
92 install
93 endef
94
95 define Build/InstallDev
96 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
97 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
98 $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
99 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
100 $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
101 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
102 $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc
103 ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
104 endef
105
106 define Package/curl/install
107 $(INSTALL_DIR) $(1)/usr/bin
108 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
109 endef
110
111 define Package/libcurl/install
112 $(INSTALL_DIR) $(1)/usr/lib
113 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
114 endef
115
116 $(eval $(call BuildPackage,curl))
117 $(eval $(call BuildPackage,libcurl))