[package] fix inverted libcurl/curl descriptions (#7648)
[openwrt/svn-archive/archive.git] / libs / curl / Makefile
index e429276ad1523984f8ce0bf0bf68d685ddce4c76..411ee0599c025ac50926a7185eaba54beb0e6a50 100644 (file)
@@ -1,15 +1,14 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2007-2009 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
-PKG_VERSION:=7.14.0
+PKG_VERSION:=7.19.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -20,11 +19,9 @@ PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
        ftp://ftp.planetmirror.com/pub/curl/ \
        http://www.mirrormonster.com/curl/download/ \
        http://curl.mirrors.cyberservers.net/download/
-PKG_MD5SUM:=46ce665e47d37fce1a0bad935cce58a9
-PKG_CAT:=bzcat
+PKG_MD5SUM:=8402c1f654c51ad7287aad57c3aa79be
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+PKG_FIXUP = libtool
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -37,7 +34,7 @@ endef
 define Package/curl
   $(call Package/curl/Default)
   DEPENDS:=+libcurl
-  TITLE:=A client-side URL transfer library
+  TITLE:=A client-side URL transfer utility
 endef
 
 define Package/libcurl
@@ -45,69 +42,74 @@ define Package/libcurl
   SECTION:=libs
   CATEGORY:=Libraries
   DEPENDS:=+libopenssl +zlib
-  TITLE:=A client-side URL transfer utility
+  TITLE:=A client-side URL transfer library
 endef
 
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --disable-thread \
+       --enable-cookies \
+       --enable-crypto-auth \
+       --enable-nonblocking \
+       --enable-file \
+       --enable-ftp \
+       --enable-http \
+       --disable-ares \
+       --disable-debug \
+       --disable-dict \
+       --disable-gopher \
+       --disable-ldap \
+       --disable-manual \
+       --disable-sspi \
+       --disable-telnet \
+       --enable-tftp \
+       --disable-verbose \
+       --with-random="/dev/urandom" \
+       --with-ssl="$(STAGING_DIR)/usr" \
+       --without-ca-bundle \
+       --without-gnutls \
+       --without-krb4 \
+       --without-libidn \
+       --without-nss \
+       --without-libssh2 \
+       --with-zlib="$(STAGING_DIR)/usr" \
+
+CONFIGURE_VARS += \
+       LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
+       CC="$(filter-out ccache,$(TARGET_CC))"
+
 define Build/Configure
-       $(call Build/Configure/Default, \
-               --enable-shared \
-               --enable-static \
-               --disable-thread \
-               --enable-cookies \
-               --enable-crypto-auth \
-               --enable-nonblocking \
-               --enable-file \
-               --enable-ftp \
-               --enable-http \
-               --enable-ipv6 \
-               --disable-ares \
-               --disable-debug \
-               --disable-dict \
-               --disable-gopher \
-               --disable-ldap \
-               --disable-manual \
-               --disable-sspi \
-               --disable-telnet \
-               --disable-verbose \
-               --with-random="/dev/urandom" \
-               --with-ssl="$(STAGING_DIR)/usr" \
-               --without-ca-bundle \
-               --without-gnutls \
-               --without-libidn \
-               --with-zlib="$(STAGING_DIR)/usr" \
-       );
+       $(call Build/Configure/Default,,bash)
 endef
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
+               CC="$(TARGET_CC)" \
+               install
 endef
 
 define Build/InstallDev
-       mkdir -p $(STAGING_DIR)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(STAGING_DIR)/usr/bin/
-       mkdir -p $(STAGING_DIR)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(STAGING_DIR)/usr/include/
-       mkdir -p $(STAGING_DIR)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(STAGING_DIR)/usr/lib/
-       $(SED) 's,-I/usr/include,,g' $(STAGING_DIR)/usr/bin/curl-config
-       $(SED) 's,-L/usr/lib,,g' $(STAGING_DIR)/usr/bin/curl-config
-endef
-
-define Build/UninstallDev
-       rm -rf  $(STAGING_DIR)/usr/bin/curl-config \
-               $(STAGING_DIR)/usr/include/curl \
-               $(STAGING_DIR)/usr/lib/libcurl.{a,so*}
+       $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
+       $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
+       $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
+       $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc
+       ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
 endef
 
 define Package/curl/install
-       install -d -m0755 $(1)/usr/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
 endef
 
 define Package/libcurl/install
-       install -d -m0755 $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
 endef