]>
Commit | Line | Data |
---|---|---|
429b086b JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x binding | |
4 | ||
d79016b6 JB |
5 | Summary: An event system library |
6 | Summary(pl.UTF-8): Biblioteka systemu zdarzeń | |
7 | Name: tevent | |
429b086b | 8 | Version: 0.9.39 |
59de6c57 | 9 | Release: 2 |
d79016b6 JB |
10 | License: LGPL v3+ |
11 | Group: Libraries | |
fc0c01b9 | 12 | Source0: https://www.samba.org/ftp/tevent/%{name}-%{version}.tar.gz |
429b086b | 13 | # Source0-md5: b937d5e980fa9704f20b57df688845c0 |
d79016b6 | 14 | URL: http://tevent.samba.org/ |
429b086b | 15 | %if %{with python2} |
d79016b6 | 16 | BuildRequires: python-devel >= 1:2.4.2 |
429b086b JB |
17 | BuildRequires: python-talloc-devel >= 2:2.1.16 |
18 | %endif | |
19 | BuildRequires: python3-devel >= 1:3.2 | |
20 | BuildRequires: python3-talloc-devel >= 2:2.1.16 | |
d79016b6 | 21 | BuildRequires: rpm-pythonprov |
429b086b JB |
22 | BuildRequires: rpmbuild(macros) >= 1.507 |
23 | BuildRequires: talloc-devel >= 2:2.1.16 | |
d79016b6 JB |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | Tevent is an event system based on the talloc memory management | |
28 | library. It is the core event system used in Samba. | |
29 | ||
30 | The low level tevent has support for many event types, including | |
31 | timers, signals, and the classic file descriptor events. | |
32 | ||
33 | Tevent also provide helpers to deal with asynchronous code providing | |
34 | the tevent_req (tevent request) functions. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | Tevent to system zdarzeń oparty na bibliotece zarządzającej pamięcią | |
38 | talloc. Jest to główny system zdarzeń używany w Sambie. | |
39 | ||
40 | Niskopoziomowo tevent obsługuje wiele rodzajów zdarzeń, w tym | |
41 | zegary, sygnały i zdarzenia związane z klasycznymi deskryptorami | |
42 | plików. | |
43 | ||
44 | Tevent udostępnia także funkcje pomocnicze tevent_req (żądanie tevent) | |
45 | dla kodu asynchronicznego. | |
46 | ||
47 | %package devel | |
48 | Summary: Header files for tevent library | |
49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki tevent | |
50 | Group: Development/Libraries | |
51 | Requires: %{name} = %{version}-%{release} | |
429b086b | 52 | Requires: talloc-devel >= 2:2.1.16 |
d79016b6 JB |
53 | |
54 | %description devel | |
55 | Header files for tevent library. | |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Pliki nagłówkowe biblioteki tevent. | |
59 | ||
60 | %package -n python-tevent | |
429b086b JB |
61 | Summary: Python 2 bindings for tevent |
62 | Summary(pl.UTF-8): Interfejs Pythona 2 do tevent | |
d79016b6 JB |
63 | Group: Libraries/Python |
64 | Requires: %{name} = %{version}-%{release} | |
429b086b | 65 | Requires: python-talloc >= 2:2.1.16 |
d79016b6 JB |
66 | |
67 | %description -n python-tevent | |
429b086b | 68 | Python 2 bindings for tevent. |
d79016b6 JB |
69 | |
70 | %description -n python-tevent -l pl.UTF-8 | |
429b086b JB |
71 | Interfejs Pythona 2 do tevent. |
72 | ||
73 | %package -n python3-tevent | |
74 | Summary: Python 3 bindings for tevent | |
75 | Summary(pl.UTF-8): Interfejs Pythona 3 do tevent | |
76 | Group: Libraries/Python | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | Requires: python3-talloc >= 2:2.1.16 | |
79 | ||
80 | %description -n python3-tevent | |
81 | Python 3 bindings for tevent. | |
82 | ||
83 | %description -n python3-tevent -l pl.UTF-8 | |
84 | Interfejs Pythona 3 do tevent. | |
d79016b6 JB |
85 | |
86 | %prep | |
87 | %setup -q | |
88 | ||
89 | %build | |
429b086b JB |
90 | export JOBS=1 |
91 | ||
d79016b6 JB |
92 | CC="%{__cc}" \ |
93 | CFLAGS="%{rpmcflags}" \ | |
429b086b | 94 | %{__python3} buildtools/bin/waf configure \ |
d79016b6 | 95 | --prefix=%{_prefix} \ |
b23e518b | 96 | --libdir=%{_libdir} \ |
429b086b JB |
97 | --disable-rpath \ |
98 | %{?with_python2:--extra-python=%{__python}} | |
d79016b6 JB |
99 | |
100 | %{__make} \ | |
101 | V=1 | |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} install \ | |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
429b086b | 109 | %if %{with python2} |
70aba668 JB |
110 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
111 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
112 | %py_postclean | |
429b086b JB |
113 | %endif |
114 | ||
115 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
116 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
70aba668 | 117 | |
d79016b6 JB |
118 | %clean |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %post -p /sbin/ldconfig | |
122 | %postun -p /sbin/ldconfig | |
123 | ||
124 | %files | |
125 | %defattr(644,root,root,755) | |
126 | %attr(755,root,root) %{_libdir}/libtevent.so.*.*.* | |
127 | %attr(755,root,root) %ghost %{_libdir}/libtevent.so.0 | |
128 | ||
129 | %files devel | |
130 | %defattr(644,root,root,755) | |
131 | %attr(755,root,root) %{_libdir}/libtevent.so | |
132 | %{_includedir}/tevent.h | |
133 | %{_pkgconfigdir}/tevent.pc | |
134 | ||
429b086b | 135 | %if %{with python2} |
d79016b6 JB |
136 | %files -n python-tevent |
137 | %defattr(644,root,root,755) | |
138 | %attr(755,root,root) %{py_sitedir}/_tevent.so | |
70aba668 | 139 | %{py_sitedir}/tevent.py[co] |
429b086b JB |
140 | %endif |
141 | ||
142 | %files -n python3-tevent | |
143 | %defattr(644,root,root,755) | |
144 | %attr(755,root,root) %{py3_sitedir}/_tevent.cpython-*.so | |
145 | %{py3_sitedir}/tevent.py | |
146 | %{py3_sitedir}/__pycache__/tevent.cpython-*.py[co] |