1 |
< |
### RPM external curl 7.15.3 |
2 |
< |
Source: http://curl.haxx.se/download/%n-%v.tar.gz |
1 |
> |
### RPM external curl 7.21.6 |
2 |
> |
Source: http://curl.haxx.se/download/%n-%realversion.tar.gz |
3 |
> |
Provides: libcurl.so.3()(64bit) |
4 |
> |
Requires: openssl |
5 |
> |
Requires: zlib |
6 |
> |
|
7 |
> |
%prep |
8 |
> |
%setup -n %n-%{realversion} |
9 |
|
|
10 |
|
%build |
11 |
< |
./configure --prefix=%i |
11 |
> |
export OPENSSL_ROOT |
12 |
> |
export ZLIB_ROOT |
13 |
> |
./configure --prefix=%i --disable-static --without-libidn --disable-ldap --with-ssl=${OPENSSL_ROOT} --with-zlib=${ZLIB_ROOT} |
14 |
> |
# This should change link from "-lz" to "-lrt -lz", needed by gold linker |
15 |
> |
# This is a fairly ugly way to do it, however. |
16 |
> |
perl -p -i -e "s!\(LIBS\)!(LIBCURL_LIBS)!" src/Makefile |
17 |
|
make %makeprocesses |
18 |
+ |
|
19 |
+ |
%install |
20 |
+ |
make install |
21 |
+ |
case %cmsos in |
22 |
+ |
osx*) SONAME=dylib ;; |
23 |
+ |
*) SONAME=so ;; |
24 |
+ |
esac |
25 |
+ |
|
26 |
+ |
ln -s libcurl.$SONAME %i/lib/libcurl.$SONAME.3 |
27 |
+ |
# Trick to get our version of curl pick up our version of its associated shared |
28 |
+ |
# library (which is different from the one coming from the system!). |
29 |
+ |
case %cmsos in |
30 |
+ |
osx*) |
31 |
+ |
install_name_tool -id %i/lib/libcurl-cms.dylib -change %i/lib/libcurl.4.dylib %i/lib/libcurl-cms.dylib %i/lib/libcurl.4.dylib |
32 |
+ |
install_name_tool -change %i/lib/libcurl.4.dylib %i/lib/libcurl-cms.dylib %i/bin/curl |
33 |
+ |
ln -s libcurl.4.dylib %i/lib/libcurl-cms.dylib |
34 |
+ |
;; |
35 |
+ |
esac |
36 |
+ |
|
37 |
+ |
# Remove pkg-config to avoid rpm-generated dependency on /usr/bin/pkg-config |
38 |
+ |
# which we neither need nor use at this time. |
39 |
+ |
rm -rf %i/lib/pkgconfig |
40 |
+ |
|
41 |
+ |
# Strip libraries, we are not going to debug them. |
42 |
+ |
%define strip_files %i/lib |
43 |
+ |
# Read documentation online. |
44 |
+ |
%define drop_files %i/share |
45 |
+ |
|
46 |
|
%post |
47 |
|
%{relocateConfig}bin/curl-config |