1 # TODO: %{_bindir}/event_rpcgen.py - rename to event_rpcgen?
4 %bcond_without static_libs # don't build static library
6 Summary: libevent - an event notification library
7 Summary(pl.UTF-8): libevent - biblioteka powiadamiająca o zdarzeniach
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
15 # Source0-md5: b5333f021f880fe76490d8a799cd79f4
16 Patch0: %{name}-fpm.patch
17 Patch1: %{name}-link.patch
18 URL: https://libevent.org/
19 BuildRequires: autoconf >= 2.67
20 BuildRequires: automake >= 1:1.13
21 BuildRequires: libtool >= 2:2.4.2
22 BuildRequires: openssl-devel
23 BuildRequires: pkgconfig
24 BuildRequires: sed >= 4.0
25 BuildRequires: zlib-devel
26 Obsoletes: libevent-dietlibc < 2
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
35 %description -l pl.UTF-8
36 API libevent dostarcza mechanizm do wykonywania funkcji callback,
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.
42 Summary: Header files for libevent library
43 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libevent
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
46 Requires: openssl-devel
49 Header files for libevent library.
51 %description devel -l pl.UTF-8
52 Pliki nagłówkowe biblioteki libevent.
55 Summary: Static libevent library
56 Summary(pl.UTF-8): Statyczna biblioteka libevent
57 Group: Development/Libraries
58 Requires: %{name}-devel = %{version}-%{release}
61 Static libevent library.
63 %description static -l pl.UTF-8
64 Statyczna biblioteka libevent.
67 %setup -q -n %{name}-%{version}-stable
71 %{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' \
73 test/check-dumpevents.py
82 --disable-silent-rules \
83 %{!?with_static_libs:--disable-static}
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT/%{_lib}
91 DESTDIR=$RPM_BUILD_ROOT
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.*.*.*) \
95 $RPM_BUILD_ROOT%{_libdir}/libevent.so
97 # obsoleted by pkg-config
98 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libevent*.la
101 rm -rf $RPM_BUILD_ROOT
103 %post -p /sbin/ldconfig
104 %postun -p /sbin/ldconfig
107 %defattr(644,root,root,755)
108 %doc ChangeLog* LICENSE
109 %attr(755,root,root) /%{_lib}/libevent-2.1.so.*.*.*
110 %attr(755,root,root) %ghost /%{_lib}/libevent-2.1.so.7
111 %attr(755,root,root) %{_libdir}/libevent_core-2.1.so.*.*.*
112 %attr(755,root,root) %ghost %{_libdir}/libevent_core-2.1.so.7
113 %attr(755,root,root) %{_libdir}/libevent_extra-2.1.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libevent_extra-2.1.so.7
115 %attr(755,root,root) %{_libdir}/libevent_openssl-2.1.so.*.*.*
116 %attr(755,root,root) %ghost %{_libdir}/libevent_openssl-2.1.so.7
117 %attr(755,root,root) %{_libdir}/libevent_pthreads-2.1.so.*.*.*
118 %attr(755,root,root) %ghost %{_libdir}/libevent_pthreads-2.1.so.7
121 %defattr(644,root,root,755)
123 %attr(755,root,root) %{_bindir}/event_rpcgen.py
124 %attr(755,root,root) %{_libdir}/libevent.so
125 %attr(755,root,root) %{_libdir}/libevent_core.so
126 %attr(755,root,root) %{_libdir}/libevent_extra.so
127 %attr(755,root,root) %{_libdir}/libevent_openssl.so
128 %attr(755,root,root) %{_libdir}/libevent_pthreads.so
129 %{_includedir}/event2
130 %{_includedir}/evdns.h
131 %{_includedir}/event.h
132 %{_includedir}/evhttp.h
133 %{_includedir}/evrpc.h
134 %{_includedir}/evutil.h
135 %{_pkgconfigdir}/libevent.pc
136 %{_pkgconfigdir}/libevent_core.pc
137 %{_pkgconfigdir}/libevent_extra.pc
138 %{_pkgconfigdir}/libevent_openssl.pc
139 %{_pkgconfigdir}/libevent_pthreads.pc
141 %if %{with static_libs}
143 %defattr(644,root,root,755)
144 %{_libdir}/libevent.a
145 %{_libdir}/libevent_core.a
146 %{_libdir}/libevent_extra.a
147 %{_libdir}/libevent_openssl.a
148 %{_libdir}/libevent_pthreads.a