6733f54f4180b40d102a029026d5d5418b1673f2
[platform/upstream/curl.git] / packaging / curl.spec
1 Name:       curl
2 Summary:    A utility for getting files from remote servers (FTP, HTTP, and others)
3 Version:    7.50.2
4 Release:    1
5 Group:      Applications/Internet
6 License:    MIT
7 URL:        http://curl.haxx.se/
8 #Source0:    http://curl.haxx.se/download/%{name}-%{version}.tar.bz2
9 Source0:    %{name}-%{version}.tar.gz
10 Source1001:     %{name}.manifest
11
12 BuildRequires:  pkgconfig(openssl)
13 BuildRequires:  pkgconfig(libidn)
14 BuildRequires:  pkgconfig(zlib)
15 BuildRequires:  pkgconfig(libcares)
16 BuildRequires:  pkgconfig(libnghttp2)
17 Provides:   webclient
18
19
20 %description
21 curl is a client to get documents/files from servers, using any of the
22 supported protocols. The command is designed to work without user
23 interaction or any kind of interactivity.
24
25 curl offers a busload of useful tricks like proxy support, user
26 authentication, ftp upload, HTTP post, file transfer resume and more.
27
28 %package -n libcurl
29 Summary:    A library for getting files from web servers
30 Group:      System/Libraries
31 License:    MIT
32 Requires(post): /sbin/ldconfig
33 Requires(postun): /sbin/ldconfig
34
35 %description -n libcurl
36 This package provides a way for applications to use FTP, HTTP, Gopher and
37 other servers for getting files.
38
39
40 %package -n libcurl-devel
41 Summary:    Files needed for building applications with libcurl
42 Group:      Development/Libraries
43 License:    MIT
44 Requires:   libcurl = %{version}-%{release}
45 Requires:   libidn-devel
46 Provides:   curl-devel = %{version}-%{release}
47 Obsoletes:   curl-devel < %{version}-%{release}
48
49 %description -n libcurl-devel
50 libcurl is the core engine of curl; this packages contains all the libs,
51 headers, and manual pages to develop applications using libcurl.
52
53 %prep
54 %setup -q
55 cp %{SOURCE1001} .
56
57 #%patch01 -p1
58 #%patch02 -p1
59
60 %build
61
62 export CPPFLAGS="-DHAVE_PK11_CREATEGENERICOBJECT"
63
64 %if "%{TIZEN_PROFILE_TV}" == "1"
65 CFLAGS+=" -DTIZEN_TV_EXT"
66 %reconfigure --without-nss --without-gnutls --with-openssl --disable-ipv6 \
67 %else
68 %reconfigure --without-nss --without-gnutls --with-openssl --enable-ipv6 \
69 %endif
70 --with-ca-path=/etc/ssl/certs \
71 --with-libidn \
72 --with-lber-lib=lber \
73 --enable-manual --enable-versioned-symbols --enable-ares --enable-debug --enable-curldebug \
74 --disable-static \
75 --with-nghttp2 \
76 --without-zsh-functions-dir \
77
78 #--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt 
79
80 sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64 ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \
81 Makefile libcurl.pc
82 # Remove bogus rpath
83 sed -i \
84 -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
85 -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
86
87 make %{?_smp_mflags}
88
89 %install
90 rm -rf %{buildroot}
91
92 rm -rf $RPM_BUILD_ROOT
93
94 make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install
95
96 rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
97 install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal
98 install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
99
100
101 # don't need curl's copy of the certs; use openssl's
102 find ${RPM_BUILD_ROOT} -name ca-bundle.crt -exec rm -f '{}' \;
103 rm -rf ${RPM_BUILD_ROOT}/usr/share/man
104
105 # LICENSE
106 rm -rf %{buildroot}/usr/share/license
107 mkdir -p %{buildroot}/usr/share/license
108 cp COPYING %{buildroot}/usr/share/license/%{name}
109
110 %post -n libcurl -p /sbin/ldconfig
111
112 %postun -n libcurl -p /sbin/ldconfig
113
114 %files
115 %{_bindir}/curl
116
117 %files -n libcurl
118 %manifest %{name}.manifest
119 %{_libdir}/libcurl.so.*
120 /usr/share/license/%{name}
121
122 %files -n libcurl-devel
123 %{_bindir}/curl-config*
124 %{_includedir}/curl
125 %{_libdir}/*.so
126 %{_libdir}/pkgconfig/*.pc
127 %{_datadir}/aclocal/libcurl.m4
128