File libevhtp.spec of Package libevhtp
#
# spec file for package libevhtp
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libevhtp
Summary: A more flexible replacement for libevent's httpd API
Version: 1.2.15
Release: 0
License: BSD-3-Clause
Group: System/Libraries
Url: https://github.com/ellzey/libevhtp
Source0: https://github.com/ellzey/libevhtp/archive/refs/tags/%{version}.tar.gz
Patch0: fix-cmake.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libevent-devel
BuildRequires: libtool
BuildRequires: oniguruma-devel
BuildRequires: openssl-devel
%description
Libevhtp was created as a replacement API for Libevent's current HTTP API.
The reality of libevent's http interface is that it was created as a JIT
server, meaning the developer never thought of it being used for creating
a full-fledged HTTP service. Infact I am under the impression that the
libevent http API was designed almost as an example of what you can do with
libevent. It's not Apache in a box, but more and more developers are
attempting to use it as so.
%package devel
Summary: Development files for libevhtp
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%description devel
The libraries and header files for developing applications that
use libevhtp
%prep
%autosetup
%build
%cmake -DEVHTP_BUILD_SHARED=ON .
%make_build
%install
%cmake_install
mv %{buildroot}/usr/lib/pkgconfig/ %{buildroot}/%{_libdir}/
%post -n %{name} -p /sbin/ldconfig
%postun -n %{name} -p /sbin/ldconfig
%files
#%doc LICENSE
%{_libdir}/%{name}.so
%files devel
%doc ChangeLog LICENSE README.markdown
%{_libdir}/pkgconfig/*.pc
%{_includedir}/evhtp.h
%dir %{_includedir}/evhtp/
%{_includedir}/evhtp/*.h
%changelog