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