]> git.pld-linux.org Git - packages/libevent.git/blob - libevent.spec
- versioned Obsoletes
[packages/libevent.git] / libevent.spec
1 # TODO: %{_bindir}/event_rpcgen.py - rename to event_rpcgen?
2 #
3 # Conditional build:
4 %bcond_without  static_libs     # don't build static library
5 #
6 Summary:        libevent - an event notification library
7 Summary(pl.UTF-8):      libevent - biblioteka powiadamiająca o zdarzeniach
8 Name:           libevent
9 Version:        2.1.12
10 Release:        2
11 License:        BSD
12 Group:          Libraries
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)
28
29 %description
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.
34
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.
40
41 %package devel
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
47
48 %description devel
49 Header files for libevent library.
50
51 %description devel -l pl.UTF-8
52 Pliki nagłówkowe biblioteki libevent.
53
54 %package static
55 Summary:        Static libevent library
56 Summary(pl.UTF-8):      Statyczna biblioteka libevent
57 Group:          Development/Libraries
58 Requires:       %{name}-devel = %{version}-%{release}
59
60 %description static
61 Static libevent library.
62
63 %description static -l pl.UTF-8
64 Statyczna biblioteka libevent.
65
66 %prep
67 %setup -q -n %{name}-%{version}-stable
68 %patch0 -p1
69 %patch1 -p1
70
71 %{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' \
72         event_rpcgen.py \
73         test/check-dumpevents.py
74
75 %build
76 %{__libtoolize}
77 %{__aclocal} -I m4
78 %{__autoconf}
79 %{__autoheader}
80 %{__automake}
81 %configure \
82         --disable-silent-rules \
83         %{!?with_static_libs:--disable-static}
84 %{__make}
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT/%{_lib}
89
90 %{__make} install \
91         DESTDIR=$RPM_BUILD_ROOT
92
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
96
97 # obsoleted by pkg-config
98 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libevent*.la
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post   -p /sbin/ldconfig
104 %postun -p /sbin/ldconfig
105
106 %files
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
119
120 %files devel
121 %defattr(644,root,root,755)
122 # R: python3
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
140
141 %if %{with static_libs}
142 %files static
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
149 %endif
This page took 0.124568 seconds and 3 git commands to generate.