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 Source0: https://github.com/downloads/libevent/libevent/%{name}-%{version}-stable.tar.gz
14 # Source0-md5: cac0f379da35d3b98f83ac16fcfe1df4
15 Patch0: %{name}-fpm.patch
16 Patch1: %{name}-link.patch
17 URL: http://www.monkey.org/~provos/libevent/
18 BuildRequires: autoconf >= 2.60
19 BuildRequires: automake
20 BuildRequires: libtool
21 BuildRequires: openssl-devel
22 BuildRequires: pkgconfig
23 BuildRequires: zlib-devel
24 Obsoletes: libevent-dietlibc
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The libevent API provides a mechanism to execute a callback function
29 when a specific event occurs on a file descriptor or after a timeout
30 has been reached. It is meant to replace the asynchronous event loop
31 found in event-driven network servers.
33 %description -l pl.UTF-8
34 API libevent dostarcza mechanizm do wykonywania funkcji callback,
35 kiedy nastąpiło określone zdarzenie w deskryptorze pliku lub po
36 określonym czasie. Ma to na celu zastąpienie asynchronicznych pętli w
37 sterowanych zdarzeniami usługach sieciowych.
40 Summary: Header files for libevent library
41 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libevent
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
44 Requires: openssl-devel
47 Header files for libevent library.
49 %description devel -l pl.UTF-8
50 Pliki nagłówkowe biblioteki libevent.
53 Summary: Static libevent library
54 Summary(pl.UTF-8): Statyczna biblioteka libevent
55 Group: Development/Libraries
56 Requires: %{name}-devel = %{version}-%{release}
59 Static libevent library.
61 %description static -l pl.UTF-8
62 Statyczna biblioteka libevent.
65 %setup -q -n %{name}-%{version}-stable
75 %{!?with_static_libs:--disable-static}
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT/%{_lib}
83 DESTDIR=$RPM_BUILD_ROOT
85 mv -f $RPM_BUILD_ROOT%{_libdir}/libevent-2.0.so.* $RPM_BUILD_ROOT/%{_lib}
86 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libevent-2.0.so.*.*.*) \
87 $RPM_BUILD_ROOT%{_libdir}/libevent.so
90 rm -rf $RPM_BUILD_ROOT
92 %post -p /sbin/ldconfig
93 %postun -p /sbin/ldconfig
96 %defattr(644,root,root,755)
97 %doc ChangeLog LICENSE README
98 %attr(755,root,root) /%{_lib}/libevent-2.0.so.*.*.*
99 %attr(755,root,root) %ghost /%{_lib}/libevent-2.0.so.5
100 %attr(755,root,root) %{_libdir}/libevent_core-2.0.so.*.*.*
101 %attr(755,root,root) %ghost %{_libdir}/libevent_core-2.0.so.5
102 %attr(755,root,root) %{_libdir}/libevent_extra-2.0.so.*.*.*
103 %attr(755,root,root) %ghost %{_libdir}/libevent_extra-2.0.so.5
104 %attr(755,root,root) %{_libdir}/libevent_openssl-2.0.so.*.*.*
105 %attr(755,root,root) %ghost %{_libdir}/libevent_openssl-2.0.so.5
106 %attr(755,root,root) %{_libdir}/libevent_pthreads-2.0.so.*.*.*
107 %attr(755,root,root) %ghost %{_libdir}/libevent_pthreads-2.0.so.5
110 %defattr(644,root,root,755)
112 %attr(755,root,root) %{_bindir}/event_rpcgen.py
113 %attr(755,root,root) %{_libdir}/libevent.so
114 %attr(755,root,root) %{_libdir}/libevent_core.so
115 %attr(755,root,root) %{_libdir}/libevent_extra.so
116 %attr(755,root,root) %{_libdir}/libevent_openssl.so
117 %attr(755,root,root) %{_libdir}/libevent_pthreads.so
118 %{_libdir}/libevent.la
119 %{_libdir}/libevent_core.la
120 %{_libdir}/libevent_extra.la
121 %{_libdir}/libevent_openssl.la
122 %{_libdir}/libevent_pthreads.la
123 %dir %{_includedir}/event2
124 %{_includedir}/event2/*.h
125 %{_includedir}/evdns.h
126 %{_includedir}/event*.h
127 %{_includedir}/evhttp.h
128 %{_includedir}/evrpc.h
129 %{_includedir}/evutil.h
130 #%%{_mandir}/man3/evdns.3*
131 #%%{_mandir}/man3/event.3*
132 %{_pkgconfigdir}/libevent.pc
133 %{_pkgconfigdir}/libevent_openssl.pc
134 %{_pkgconfigdir}/libevent_pthreads.pc
136 %if %{with static_libs}
138 %defattr(644,root,root,755)
139 %{_libdir}/libevent.a
140 %{_libdir}/libevent_core.a
141 %{_libdir}/libevent_extra.a
142 %{_libdir}/libevent_openssl.a
143 %{_libdir}/libevent_pthreads.a