]>
Commit | Line | Data |
---|---|---|
b1fb8cbd | 1 | # TODO: %{_bindir}/event_rpcgen.py - rename to event_rpcgen? |
0b200561 | 2 | # |
0fdea969 | 3 | # Conditional build: |
d721b57f | 4 | %bcond_without static_libs # don't build static library |
0fdea969 | 5 | # |
2f6b5b28 | 6 | Summary: libevent - an event notification library |
2861f0b5 | 7 | Summary(pl.UTF-8): libevent - biblioteka powiadamiająca o zdarzeniach |
2f6b5b28 | 8 | Name: libevent |
b651eab0 AM |
9 | Version: 2.0.21 |
10 | Release: 1 | |
2f6b5b28 | 11 | License: BSD |
12 | Group: Libraries | |
763304c3 | 13 | Source0: https://github.com/downloads/libevent/libevent/%{name}-%{version}-stable.tar.gz |
b651eab0 | 14 | # Source0-md5: b2405cc9ebf264aa47ff615d9de527a2 |
9032065c | 15 | Patch0: %{name}-fpm.patch |
daa02bbf | 16 | Patch1: %{name}-link.patch |
17186bab | 17 | Patch2: %{name}-am.patch |
b651eab0 | 18 | URL: http://libevent.org/ |
7cf3abb0 | 19 | BuildRequires: autoconf >= 2.60 |
de06d5db | 20 | BuildRequires: automake |
de06d5db | 21 | BuildRequires: libtool |
f0c985cf | 22 | BuildRequires: openssl-devel |
d108ad96 | 23 | BuildRequires: pkgconfig |
f0c985cf | 24 | BuildRequires: zlib-devel |
4fe092b0 | 25 | Obsoletes: libevent-dietlibc |
2f6b5b28 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
cc2a3b05 | 29 | The libevent API provides a mechanism to execute a callback function |
30 | when a specific event occurs on a file descriptor or after a timeout | |
31 | has been reached. It is meant to replace the asynchronous event loop | |
32 | found in event-driven network servers. | |
2f6b5b28 | 33 | |
72b92345 | 34 | %description -l pl.UTF-8 |
cc2a3b05 | 35 | API libevent dostarcza mechanizm do wykonywania funkcji callback, |
72b92345 JR |
36 | kiedy nastąpiło określone zdarzenie w deskryptorze pliku lub po |
37 | określonym czasie. Ma to na celu zastąpienie asynchronicznych pętli w | |
38 | sterowanych zdarzeniami usługach sieciowych. | |
2f6b5b28 | 39 | |
40 | %package devel | |
41 | Summary: Header files for libevent library | |
2861f0b5 | 42 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libevent |
2f6b5b28 | 43 | Group: Development/Libraries |
f1748484 | 44 | Requires: %{name} = %{version}-%{release} |
f0c985cf | 45 | Requires: openssl-devel |
2f6b5b28 | 46 | |
47 | %description devel | |
48 | Header files for libevent library. | |
49 | ||
72b92345 JR |
50 | %description devel -l pl.UTF-8 |
51 | Pliki nagłówkowe biblioteki libevent. | |
2f6b5b28 | 52 | |
53 | %package static | |
54 | Summary: Static libevent library | |
2861f0b5 | 55 | Summary(pl.UTF-8): Statyczna biblioteka libevent |
2f6b5b28 | 56 | Group: Development/Libraries |
f1748484 | 57 | Requires: %{name}-devel = %{version}-%{release} |
2f6b5b28 | 58 | |
59 | %description static | |
60 | Static libevent library. | |
61 | ||
72b92345 | 62 | %description static -l pl.UTF-8 |
2f6b5b28 | 63 | Statyczna biblioteka libevent. |
64 | ||
65 | %prep | |
1eb83c63 | 66 | %setup -q -n %{name}-%{version}-stable |
9032065c | 67 | %patch0 -p1 |
daa02bbf | 68 | %patch1 -p1 |
17186bab | 69 | %patch2 -p1 |
2f6b5b28 | 70 | |
71 | %build | |
de06d5db | 72 | %{__libtoolize} |
d108ad96 | 73 | %{__aclocal} -I m4 |
de06d5db | 74 | %{__autoconf} |
75 | %{__automake} | |
d721b57f | 76 | %configure \ |
77 | %{!?with_static_libs:--disable-static} | |
2f6b5b28 | 78 | %{__make} |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
a999810b | 82 | install -d $RPM_BUILD_ROOT/%{_lib} |
2f6b5b28 | 83 | |
84 | %{__make} install \ | |
85 | DESTDIR=$RPM_BUILD_ROOT | |
86 | ||
a999810b JR |
87 | mv -f $RPM_BUILD_ROOT%{_libdir}/libevent-2.0.so.* $RPM_BUILD_ROOT/%{_lib} |
88 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libevent-2.0.so.*.*.*) \ | |
89 | $RPM_BUILD_ROOT%{_libdir}/libevent.so | |
90 | ||
2f6b5b28 | 91 | %clean |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %post -p /sbin/ldconfig | |
95 | %postun -p /sbin/ldconfig | |
96 | ||
86376cba JB |
97 | %files |
98 | %defattr(644,root,root,755) | |
7cf3abb0 | 99 | %doc ChangeLog LICENSE README |
a999810b JR |
100 | %attr(755,root,root) /%{_lib}/libevent-2.0.so.*.*.* |
101 | %attr(755,root,root) %ghost /%{_lib}/libevent-2.0.so.5 | |
d108ad96 | 102 | %attr(755,root,root) %{_libdir}/libevent_core-2.0.so.*.*.* |
103 | %attr(755,root,root) %ghost %{_libdir}/libevent_core-2.0.so.5 | |
104 | %attr(755,root,root) %{_libdir}/libevent_extra-2.0.so.*.*.* | |
105 | %attr(755,root,root) %ghost %{_libdir}/libevent_extra-2.0.so.5 | |
106 | %attr(755,root,root) %{_libdir}/libevent_openssl-2.0.so.*.*.* | |
107 | %attr(755,root,root) %ghost %{_libdir}/libevent_openssl-2.0.so.5 | |
108 | %attr(755,root,root) %{_libdir}/libevent_pthreads-2.0.so.*.*.* | |
109 | %attr(755,root,root) %ghost %{_libdir}/libevent_pthreads-2.0.so.5 | |
86376cba | 110 | |
2f6b5b28 | 111 | %files devel |
112 | %defattr(644,root,root,755) | |
94621965 | 113 | # R: python |
d108ad96 | 114 | %attr(755,root,root) %{_bindir}/event_rpcgen.py |
94621965 | 115 | %attr(755,root,root) %{_libdir}/libevent.so |
1eb83c63 JB |
116 | %attr(755,root,root) %{_libdir}/libevent_core.so |
117 | %attr(755,root,root) %{_libdir}/libevent_extra.so | |
d108ad96 | 118 | %attr(755,root,root) %{_libdir}/libevent_openssl.so |
119 | %attr(755,root,root) %{_libdir}/libevent_pthreads.so | |
94621965 | 120 | %{_libdir}/libevent.la |
1eb83c63 JB |
121 | %{_libdir}/libevent_core.la |
122 | %{_libdir}/libevent_extra.la | |
d108ad96 | 123 | %{_libdir}/libevent_openssl.la |
124 | %{_libdir}/libevent_pthreads.la | |
125 | %dir %{_includedir}/event2 | |
126 | %{_includedir}/event2/*.h | |
1eb83c63 JB |
127 | %{_includedir}/evdns.h |
128 | %{_includedir}/event*.h | |
129 | %{_includedir}/evhttp.h | |
130 | %{_includedir}/evrpc.h | |
131 | %{_includedir}/evutil.h | |
d108ad96 | 132 | #%%{_mandir}/man3/evdns.3* |
133 | #%%{_mandir}/man3/event.3* | |
134 | %{_pkgconfigdir}/libevent.pc | |
135 | %{_pkgconfigdir}/libevent_openssl.pc | |
136 | %{_pkgconfigdir}/libevent_pthreads.pc | |
2f6b5b28 | 137 | |
d721b57f | 138 | %if %{with static_libs} |
2f6b5b28 | 139 | %files static |
140 | %defattr(644,root,root,755) | |
94621965 | 141 | %{_libdir}/libevent.a |
1eb83c63 JB |
142 | %{_libdir}/libevent_core.a |
143 | %{_libdir}/libevent_extra.a | |
d108ad96 | 144 | %{_libdir}/libevent_openssl.a |
145 | %{_libdir}/libevent_pthreads.a | |
1f15e3da | 146 | %endif |