]>
Commit | Line | Data |
---|---|---|
efb0ee87 ER |
1 | # During its initialization, PycURL checks that the actual libcurl version |
2 | # is not lower than the one used when PycURL was built. | |
3 | # Yes, that should be handled by library versioning (which would then get | |
4 | # automatically reflected by rpm). | |
5 | # For now, we have to reflect that dependency. | |
60fb6c2b | 6 | %define libcurl_ver %(rpm -q --qf '%|E?{%{E}:}|%{V}' curl-devel | sed 's/package .* is not installed/ERROR/' || echo ERROR) |
efb0ee87 | 7 | |
e398d76c | 8 | %define module pycurl |
04d94dc1 | 9 | Summary: Free and easy-to-use client-side URL transfer library |
a9a9bfa0 | 10 | Summary(pl.UTF-8): Łatwa w użyciu biblioteka obsługi URL od strony klienta |
3769ac61 | 11 | Name: python-%{module} |
65ea823f JB |
12 | Version: 7.19.0.2 |
13 | Release: 1 | |
6624131b | 14 | License: LGPL v2 or MIT-like |
3769ac61 | 15 | Group: Libraries/Python |
c19edfde | 16 | Source0: http://pycurl.sourceforge.net/download/%{module}-%{version}.tar.gz |
65ea823f | 17 | # Source0-md5: 518be33976dbc6838e42495ada64b43f |
efb0ee87 | 18 | Patch0: %{name}-no-static-libs.patch |
3769ac61 | 19 | URL: http://pycurl.sourceforge.net/ |
489c9ba4 | 20 | BuildRequires: curl-devel >= 7.19 |
65ea823f | 21 | BuildRequires: pkgconfig >= 1:0.20 |
16282af9 JB |
22 | BuildRequires: python >= 1:2.5 |
23 | BuildRequires: python-devel >= 1:2.5 | |
24 | BuildRequires: python-modules >= 1:2.5 | |
08471c94 | 25 | BuildRequires: rpm-pythonprov |
efb0ee87 | 26 | BuildRequires: rpmbuild(macros) >= 1.219 |
cf34cae5 | 27 | %pyrequires_eq python-libs |
efb0ee87 | 28 | Requires: curl-libs >= %{libcurl_ver} |
3769ac61 MK |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
32 | pycurl is Python interface to curl library - free and easy-to-use | |
33 | client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, | |
34 | GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS | |
35 | certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form | |
36 | based upload, proxies, cookies, user+password authentication, file | |
99a94b9f | 37 | transfer resume, HTTP proxy tunneling and more! |
3769ac61 | 38 | |
3ce68208 JR |
39 | %description -l pl.UTF-8 |
40 | pycurl jest interfejsem języka Python do biblioteki libcurl - | |
41 | wolnodostępnej i łatwej w użyciu biblioteki operacji na URL-ach od | |
42 | strony klienta, obsługującej FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, | |
43 | DICT, FILE i LDAP. libcurl obsługuje także certyfikaty HTTPS, HTTP | |
44 | POST, HTTP PUT, uploady FTP, kerberos, upload plików przez HTTP oparty | |
4a62681d | 45 | na formularzach, proxy, ciasteczka, uwierzytelnienie, wznawianie |
3ce68208 | 46 | przesyłania plików, tunelowanie proxy i wiele innych. |
3769ac61 | 47 | |
659c2ce7 MG |
48 | %package doc |
49 | Summary: Documentation for pycurl Python module | |
a9a9bfa0 | 50 | Summary(pl.UTF-8): Dokumentacja do modułu Pythona pycurl |
659c2ce7 MG |
51 | Group: Libraries/Python |
52 | Requires: %{name} = %{version}-%{release} | |
53 | ||
54 | %description doc | |
55 | This module contains documentation files for pycurl Python module. | |
56 | ||
3ce68208 JR |
57 | %description doc -l pl.UTF-8 |
58 | Moduł zawierający dokumentację dla modułu Pythona pucurl. | |
659c2ce7 MG |
59 | |
60 | %package examples | |
61 | Summary: Examples for pycurl Python module | |
a9a9bfa0 | 62 | Summary(pl.UTF-8): Przykładowe programy do modułu Pythona pycurl |
659c2ce7 MG |
63 | Group: Libraries/Python |
64 | Requires: %{name} = %{version}-%{release} | |
65 | ||
66 | %description examples | |
67 | This module contains examples for pycurl Python module. | |
68 | ||
3ce68208 JR |
69 | %description examples -l pl.UTF-8 |
70 | Moduł zawierający przykładowe programy do modułu Pythona pycurl. | |
659c2ce7 | 71 | |
3769ac61 MK |
72 | %prep |
73 | %setup -q -n %{module}-%{version} | |
65ea823f | 74 | %patch0 -p1 |
3769ac61 | 75 | |
429ffea5 | 76 | %build |
65ea823f JB |
77 | CC="%{__cc}" \ |
78 | CFLAGS="%{rpmcflags}" \ | |
79 | LDFLAGS="%{rpmldflags}" \ | |
efb0ee87 | 80 | %{__python} setup.py build \ |
429ffea5 PZ |
81 | --debug |
82 | ||
3769ac61 MK |
83 | %install |
84 | rm -rf $RPM_BUILD_ROOT | |
659c2ce7 MG |
85 | install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_examplesdir}/%{name}-%{version}} |
86 | ||
efb0ee87 | 87 | %{__python} setup.py install \ |
dc38d556 PG |
88 | --root=$RPM_BUILD_ROOT \ |
89 | --optimize=2 | |
3769ac61 | 90 | |
efb0ee87 | 91 | %py_postclean |
659c2ce7 MG |
92 | |
93 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
6624131b | 94 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/pycurl |
659c2ce7 | 95 | |
3769ac61 MK |
96 | %clean |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
3769ac61 MK |
99 | %files |
100 | %defattr(644,root,root,755) | |
65ea823f | 101 | %doc COPYING2 ChangeLog README.rst TODO |
6624131b | 102 | %attr(755,root,root) %{py_sitedir}/pycurl.so |
493320ce MK |
103 | %dir %{py_sitedir}/curl |
104 | %{py_sitedir}/curl/*.py[co] | |
16282af9 | 105 | %{py_sitedir}/pycurl-*.egg-info |
659c2ce7 MG |
106 | |
107 | %files doc | |
108 | %defattr(644,root,root,755) | |
6624131b | 109 | %doc doc/*.html |
659c2ce7 MG |
110 | |
111 | %files examples | |
112 | %defattr(644,root,root,755) | |
113 | %{_examplesdir}/%{name}-%{version} |