File libevhtp.spec of Package libevhtp
#
# spec file for package libevhtp
#
# Copyright (c) 2016 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
Version: 1.2.18
Release: 0
License: BSD-3-Clause
%define c_lib libevhtp1_2_11
Summary: A more flexible replacement for libevent's http API
Url: http://ellzey.github.io/libevhtp/
Group: Development/Libaries/C and C++
Source: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libevent-devel >= 2
BuildRequires: oniguruma-devel
BuildRequires: openssl-devel
BuildRequires: pkg-config
Patch1: libdir_install.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 -n %{c_lib}
Group: Development/Libaries/C and C++
#
Summary: Shared library for libevhtp
%description -n %{c_lib}
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
Group: Development/Libaries/C and C++
Requires: %{c_lib} = %{version}
#
Summary: Development files for libevhtp
%description devel
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.
%prep
%setup -q
%patch1 -p0
%build
%cmake -DEVHTP_BUILD_SHARED:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_FULL_LIBDIR=%{_libdir}
make %{?_smp_mflags}
%install
%cmake_install
%post -n %{c_lib} -p /sbin/ldconfig
%postun -n %{c_lib} -p /sbin/ldconfig
%files -n %{c_lib}
%defattr(-,root,root)
%doc LICENSE
%{_libdir}/libevhtp.so.*
%files devel
%defattr(-,root,root)
%doc LICENSE
%{_includedir}/evhtp.h
%{_includedir}/evhtp/*.h
%{_includedir}/evhtp/sys/*.h
%dir %{_includedir}/evhtp
%dir %{_includedir}/evhtp/sys
%{_libdir}/pkgconfig/evhtp.pc
%{_libdir}/libevhtp.so
%{_libdir}/cmake/libevhtp/*.cmake
%dir %{_libdir}/cmake/libevhtp