upgrade wireless-tools to v28 pre13
[openwrt.git] / package / curl / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=curl
6 PKG_VERSION:=7.14.0
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=46ce665e47d37fce1a0bad935cce58a9
9
10 PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
11 http://www.mirrorspace.org/curl/ \
12 http://curl.mirror.internet.tp/download/ \
13 ftp://ftp.sunet.se/pub/www/utilities/curl/ \
14 ftp://ftp.planetmirror.com/pub/curl/ \
15 http://www.mirrormonster.com/curl/download/ \
16 http://curl.mirrors.cyberservers.net/download/
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(TOPDIR)/package/rules.mk
24
25 $(eval $(call PKG_template,CURL,curl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
26 $(eval $(call PKG_template,LIBCURL,libcurl,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
27
28 $(PKG_BUILD_DIR)/.configured:
29 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
30 $(TARGET_CONFIGURE_OPTS) \
31 CFLAGS="$(strip $(TARGET_CFLAGS))" \
32 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
33 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
34 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
35 ./configure \
36 --target=$(GNU_TARGET_NAME) \
37 --host=$(GNU_TARGET_NAME) \
38 --build=$(GNU_HOST_NAME) \
39 --program-prefix="" \
40 --program-suffix="" \
41 --prefix=/usr \
42 --exec-prefix=/usr \
43 --bindir=/usr/bin \
44 --datadir=/usr/share \
45 --includedir=/usr/include \
46 --infodir=/usr/share/info \
47 --libdir=/usr/lib \
48 --libexecdir=/usr/lib \
49 --localstatedir=/var \
50 --mandir=/usr/share/man \
51 --sbindir=/usr/sbin \
52 --sysconfdir=/etc \
53 $(DISABLE_LARGEFILE) \
54 $(DISABLE_NLS) \
55 --enable-shared \
56 --enable-static \
57 --disable-rpath \
58 --with-gnu-ld \
59 --disable-thread \
60 --enable-cookies \
61 --enable-crypto-auth \
62 --enable-nonblocking \
63 --enable-file \
64 --enable-ftp \
65 --enable-http \
66 --enable-ipv6 \
67 --disable-ares \
68 --disable-debug \
69 --disable-dict \
70 --disable-gopher \
71 --disable-ldap \
72 --disable-manual \
73 --disable-sspi \
74 --disable-telnet \
75 --disable-verbose \
76 --with-random="/dev/urandom" \
77 --with-ssl="$(STAGING_DIR)/usr" \
78 --without-ca-bundle \
79 --without-gnutls \
80 --without-libidn \
81 )
82 touch $@
83
84 $(PKG_BUILD_DIR)/.built:
85 rm -rf $(PKG_INSTALL_DIR)
86 mkdir -p $(PKG_INSTALL_DIR)
87 $(MAKE) -C $(PKG_BUILD_DIR) \
88 DESTDIR="$(PKG_INSTALL_DIR)" \
89 all install
90 touch $@
91
92 $(IPKG_CURL):
93 install -m0755 -d $(IDIR_CURL)/usr/bin
94 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/curl $(IDIR_CURL)/usr/bin/
95 $(RSTRIP) $(IDIR_CURL)
96 $(IPKG_BUILD) $(IDIR_CURL) $(PACKAGE_DIR)
97
98 $(IPKG_LIBCURL):
99 install -m0755 -d $(IDIR_LIBCURL)/usr/lib
100 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(IDIR_LIBCURL)/usr/lib/
101 $(RSTRIP) $(IDIR_LIBCURL)
102 $(IPKG_BUILD) $(IDIR_LIBCURL) $(PACKAGE_DIR)
103
104 $(STAGING_DIR)/usr/lib/libcurl.so: $(PKG_BUILD_DIR)/.built
105 mkdir -p $(STAGING_DIR)/usr/bin
106 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/curl-config $(STAGING_DIR)/usr/bin/
107 mkdir -p $(STAGING_DIR)/usr/include
108 cp -fpR $(PKG_INSTALL_DIR)/usr/include/curl $(STAGING_DIR)/usr/include/
109 mkdir -p $(STAGING_DIR)/usr/lib
110 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurl.a $(STAGING_DIR)/usr/lib/
111 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libcurl.so* $(STAGING_DIR)/usr/lib/
112 $(SED) 's,-I/usr/include,,g' $(STAGING_DIR)/usr/bin/curl-config
113 $(SED) 's,-L/usr/lib,,g' $(STAGING_DIR)/usr/bin/curl-config
114 touch $@
115
116 install-dev: $(STAGING_DIR)/usr/lib/libcurl.so
117
118 uninstall-dev:
119 rm -rf \
120 $(STAGING_DIR)/usr/bin/curl-config \
121 $(STAGING_DIR)/usr/include/curl \
122 $(STAGING_DIR)/usr/lib/libcurl.a \
123 $(STAGING_DIR)/usr/lib/libcurl.so* \
124
125 compile-targets: install-dev
126 clean-targets: uninstall-dev
127
128 mostlyclean:
129 -$(MAKE) -C $(PKG_BUILD_DIR) clean
130 rm -f $(PKG_BUILD_DIR)/.built
131
This page took 0.043443 seconds and 5 git commands to generate.