]> git.pld-linux.org Git - packages/libevent.git/blobdiff - libevent.spec
- versioned Obsoletes
[packages/libevent.git] / libevent.spec
index 9f8f0f95259772cc590c7ded26cf9c2275e0b42e..9fda4fb22810c6987a731873ed9a0f529f3aa15f 100644 (file)
@@ -1,5 +1,4 @@
-# TODO
-# - %attr(755,root,root) %{_bindir}/event_rpcgen.py
+# TODO: %{_bindir}/event_rpcgen.py - rename to event_rpcgen?
 #
 # Conditional build:
 %bcond_without static_libs     # don't build static library
@@ -7,20 +6,24 @@
 Summary:       libevent - an event notification library
 Summary(pl.UTF-8):     libevent - biblioteka powiadamiająca o zdarzeniach
 Name:          libevent
-Version:       2.0.10
+Version:       2.1.12
 Release:       2
 License:       BSD
 Group:         Libraries
-Source0:       http://www.monkey.org/~provos/%{name}-%{version}-stable.tar.gz
-# Source0-md5: a37401d26cbbf28185211d582741a3d4
+#Source0Download: https://github.com/libevent/libevent/releases
+Source0:       https://github.com/libevent/libevent/releases/download/release-%{version}-stable/%{name}-%{version}-stable.tar.gz
+# Source0-md5: b5333f021f880fe76490d8a799cd79f4
 Patch0:                %{name}-fpm.patch
 Patch1:                %{name}-link.patch
-URL:           http://www.monkey.org/~provos/libevent/
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: libtool
+URL:           https://libevent.org/
+BuildRequires: autoconf >= 2.67
+BuildRequires: automake >= 1:1.13
+BuildRequires: libtool >= 2:2.4.2
+BuildRequires: openssl-devel
 BuildRequires: pkgconfig
-Obsoletes:     libevent-dietlibc
+BuildRequires: sed >= 4.0
+BuildRequires: zlib-devel
+Obsoletes:     libevent-dietlibc < 2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -40,6 +43,7 @@ Summary:      Header files for libevent library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libevent
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
+Requires:      openssl-devel
 
 %description devel
 Header files for libevent library.
@@ -64,21 +68,35 @@ Statyczna biblioteka libevent.
 %patch0 -p1
 %patch1 -p1
 
+%{__sed} -i -e '1s,/usr/bin/env python$,%{__python3},' \
+       event_rpcgen.py \
+       test/check-dumpevents.py
+
 %build
 %{__libtoolize}
 %{__aclocal} -I m4
 %{__autoconf}
+%{__autoheader}
 %{__automake}
 %configure \
+       --disable-silent-rules \
        %{!?with_static_libs:--disable-static}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/%{_lib}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libevent-2.1.so.* $RPM_BUILD_ROOT/%{_lib}
+ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libevent-2.1.so.*.*.*) \
+       $RPM_BUILD_ROOT%{_libdir}/libevent.so
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libevent*.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -87,41 +105,36 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libevent-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libevent-2.0.so.5
-%attr(755,root,root) %{_libdir}/libevent_core-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libevent_core-2.0.so.5
-%attr(755,root,root) %{_libdir}/libevent_extra-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libevent_extra-2.0.so.5
-%attr(755,root,root) %{_libdir}/libevent_openssl-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libevent_openssl-2.0.so.5
-%attr(755,root,root) %{_libdir}/libevent_pthreads-2.0.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libevent_pthreads-2.0.so.5
+%doc ChangeLog* LICENSE
+%attr(755,root,root) /%{_lib}/libevent-2.1.so.*.*.*
+%attr(755,root,root) %ghost /%{_lib}/libevent-2.1.so.7
+%attr(755,root,root) %{_libdir}/libevent_core-2.1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libevent_core-2.1.so.7
+%attr(755,root,root) %{_libdir}/libevent_extra-2.1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libevent_extra-2.1.so.7
+%attr(755,root,root) %{_libdir}/libevent_openssl-2.1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libevent_openssl-2.1.so.7
+%attr(755,root,root) %{_libdir}/libevent_pthreads-2.1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libevent_pthreads-2.1.so.7
 
 %files devel
 %defattr(644,root,root,755)
-# R: python
+# R: python3
 %attr(755,root,root) %{_bindir}/event_rpcgen.py
 %attr(755,root,root) %{_libdir}/libevent.so
 %attr(755,root,root) %{_libdir}/libevent_core.so
 %attr(755,root,root) %{_libdir}/libevent_extra.so
 %attr(755,root,root) %{_libdir}/libevent_openssl.so
 %attr(755,root,root) %{_libdir}/libevent_pthreads.so
-%{_libdir}/libevent.la
-%{_libdir}/libevent_core.la
-%{_libdir}/libevent_extra.la
-%{_libdir}/libevent_openssl.la
-%{_libdir}/libevent_pthreads.la
-%dir %{_includedir}/event2
-%{_includedir}/event2/*.h
+%{_includedir}/event2
 %{_includedir}/evdns.h
-%{_includedir}/event*.h
+%{_includedir}/event.h
 %{_includedir}/evhttp.h
 %{_includedir}/evrpc.h
 %{_includedir}/evutil.h
-#%%{_mandir}/man3/evdns.3*
-#%%{_mandir}/man3/event.3*
 %{_pkgconfigdir}/libevent.pc
+%{_pkgconfigdir}/libevent_core.pc
+%{_pkgconfigdir}/libevent_extra.pc
 %{_pkgconfigdir}/libevent_openssl.pc
 %{_pkgconfigdir}/libevent_pthreads.pc
 
This page took 0.292397 seconds and 4 git commands to generate.