lots of package cleanups/fixes
[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.14.0
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:=46ce665e47d37fce1a0bad935cce58a9
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 --disable-verbose \
69 --with-random="/dev/urandom" \
70 --with-ssl="$(STAGING_DIR)/usr" \
71 --without-ca-bundle \
72 --without-gnutls \
73 --without-libidn \
74 --with-zlib="$(STAGING_DIR)/usr" \
75 --disable-gssapi
76
77 define Build/Compile
78 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
79 endef
80
81 define Build/InstallDev
82 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
83 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
84 $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
86 $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
87 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
88 $(SED) 's,$(TARGET_LDFLAGS),,g' $(1)/usr/lib/pkgconfig/libcurl.pc
89 ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
90 endef
91
92 define Package/curl/install
93 $(INSTALL_DIR) $(1)/usr/bin
94 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
95 endef
96
97 define Package/libcurl/install
98 $(INSTALL_DIR) $(1)/usr/lib
99 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
100 endef
101
102 $(eval $(call BuildPackage,curl))
103 $(eval $(call BuildPackage,libcurl))