701de1bcf4
+ support for epoll-based event loops (Linux-only) + various new options: - MHD_USE_DUAL_STACK for binding to IPv4 and IPv6 at the same time - MHD_USE_PIPE_FOR_SHUTDOWN to cleanly support MHD_quiesce_daemon on non-Linux systems - MHD_CONNECTION_INFO_CONNECTION_FD to allow COMET applications to disable TCP Nagle - MHD_OPTION_CONNECTION_MEMORY_INCREMENT for better control over buffer size allocations + and fixes various minor bugs OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmicrohttpd?expand=0&rev=23
220 lines
8.0 KiB
RPMSpec
220 lines
8.0 KiB
RPMSpec
#
|
|
# spec file for package libmicrohttpd
|
|
#
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2010,2011,2012 Stephan Kleine
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define soname 10
|
|
|
|
Name: libmicrohttpd
|
|
Version: 0.9.28
|
|
Release: 0
|
|
Summary: Small Embeddable HTTP Server Library
|
|
License: LGPL-2.1+
|
|
Group: Productivity/Networking/Web/Servers
|
|
Url: http://gnunet.org/libmicrohttpd/
|
|
|
|
Source0: http://ftpmirror.gnu.org/libmicrohttpd/%{name}-%{version}.tar.gz
|
|
Source1: http://ftpmirror.gnu.org/libmicrohttpd/%{name}-%{version}.tar.gz.sig
|
|
Source2: libmicrohttpd.keyring
|
|
#PATCH-FIX-OPENSUSE: test_tls_options fails when running in OBS, so lets drop that one
|
|
Patch0: libmicrohttpd-drop-test_tls_options.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: libcurl-devel
|
|
BuildRequires: libgcrypt-devel >= 1.2.4
|
|
BuildRequires: libtasn1-devel
|
|
%if 0%{?suse_version}
|
|
BuildRequires: libgnutls-devel
|
|
BuildRequires: pkg-config
|
|
%if 0%{?suse_version} >= 1230
|
|
BuildRequires: gpg-offline
|
|
%endif
|
|
%else
|
|
BuildRequires: gnutls-devel
|
|
BuildRequires: pkgconfig
|
|
%endif
|
|
|
|
%description
|
|
GNU libmicrohttpd is a small C library that is supposed to make it easy to run
|
|
an HTTP server as part of another application. GNU libmicrohttpd is free software
|
|
and part of the GNU project. Key features that distinguish libmicrohttpd from
|
|
other projects are:
|
|
|
|
* C library: fast and small
|
|
* API is simple, expressive and fully reentrant
|
|
* Implementation is http 1.1 compliant
|
|
* HTTP server can listen on multiple ports
|
|
* Support for IPv6
|
|
* Support for incremental processing of POST data
|
|
* Creates binary of only 30k (without TLS/SSL support)
|
|
* Three different threading models
|
|
* Supported platforms include GNU/Linux, FreeBSD, OpenBSD, NetBSD, OS X, W32,
|
|
Symbian and z/OS
|
|
* Optional support for SSL3 and TLS (requires libgcrypt)
|
|
|
|
libmicrohttpd was started because the author needed an easy way to add a concurrent
|
|
HTTP server to other projects. Existing alternatives were either non-free, not
|
|
reentrant, standalone, of terrible code quality or a combination thereof. Do not
|
|
use libmicrohttpd if you are looking for a standalone http server, there are many
|
|
other projects out there that provide that kind of functionality already. However,
|
|
if you want to be able to serve simple WWW pages from within your C or C++
|
|
application, check it out.
|
|
|
|
%package -n %{name}%{soname}
|
|
|
|
Summary: Small Embeddable HTTP Server Library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{name}%{soname}
|
|
GNU libmicrohttpd is a small C library that is supposed to make it easy to run
|
|
an HTTP server as part of another application. GNU libmicrohttpd is free software
|
|
and part of the GNU project. Key features that distinguish libmicrohttpd from
|
|
other projects are:
|
|
|
|
* C library: fast and small
|
|
* API is simple, expressive and fully reentrant
|
|
* Implementation is http 1.1 compliant
|
|
* HTTP server can listen on multiple ports
|
|
* Support for IPv6
|
|
* Support for incremental processing of POST data
|
|
* Creates binary of only 30k (without TLS/SSL support)
|
|
* Three different threading models
|
|
* Supported platforms include GNU/Linux, FreeBSD, OpenBSD, NetBSD, OS X, W32,
|
|
Symbian and z/OS
|
|
* Optional support for SSL3 and TLS (requires libgcrypt)
|
|
|
|
libmicrohttpd was started because the author needed an easy way to add a concurrent
|
|
HTTP server to other projects. Existing alternatives were either non-free, not
|
|
reentrant, standalone, of terrible code quality or a combination thereof. Do not
|
|
use libmicrohttpd if you are looking for a standalone http server, there are many
|
|
other projects out there that provide that kind of functionality already. However,
|
|
if you want to be able to serve simple WWW pages from within your C or C++
|
|
application, check it out.
|
|
|
|
%package devel
|
|
Requires: %{name}%{soname} = %{version}
|
|
Requires(post): info
|
|
Requires(postun): info
|
|
Summary: Small Embeddable HTTP Server Library
|
|
Group: Development/Libraries/C and C++
|
|
|
|
%description devel
|
|
GNU libmicrohttpd is a small C library that is supposed to make it easy to run
|
|
an HTTP server as part of another application. GNU libmicrohttpd is free software
|
|
and part of the GNU project. Key features that distinguish libmicrohttpd from
|
|
other projects are:
|
|
|
|
* C library: fast and small
|
|
* API is simple, expressive and fully reentrant
|
|
* Implementation is http 1.1 compliant
|
|
* HTTP server can listen on multiple ports
|
|
* Support for IPv6
|
|
* Support for incremental processing of POST data
|
|
* Creates binary of only 30k (without TLS/SSL support)
|
|
* Three different threading models
|
|
* Supported platforms include GNU/Linux, FreeBSD, OpenBSD, NetBSD, OS X, W32,
|
|
Symbian and z/OS
|
|
* Optional support for SSL3 and TLS (requires libgcrypt)
|
|
|
|
libmicrohttpd was started because the author needed an easy way to add a concurrent
|
|
HTTP server to other projects. Existing alternatives were either non-free, not
|
|
reentrant, standalone, of terrible code quality or a combination thereof. Do not
|
|
use libmicrohttpd if you are looking for a standalone http server, there are many
|
|
other projects out there that provide that kind of functionality already. However,
|
|
if you want to be able to serve simple WWW pages from within your C or C++
|
|
application, check it out.
|
|
|
|
|
|
%prep
|
|
%if 0%{?suse_version} >= 1230
|
|
%gpg_verify %{SOURCE1}
|
|
%endif
|
|
%setup -q
|
|
|
|
#XXX: test fail inside OBS only
|
|
%if 0%{?opensuse_bs}
|
|
%patch0 -p1
|
|
%endif
|
|
|
|
%build
|
|
%configure --disable-static \
|
|
--enable-curl
|
|
%__make %{?_smp_mflags}
|
|
|
|
%install
|
|
make install DESTDIR="%buildroot"
|
|
find %{buildroot} -name "*.la" -delete
|
|
|
|
%check
|
|
%__make %{?_smp_mflags} check
|
|
|
|
%post -n %{name}%{soname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{name}%{soname} -p /sbin/ldconfig
|
|
|
|
%post devel
|
|
%if 0%{?fedora_version}
|
|
/sbin/install-info --info-dir=%{_infodir} --info-file=%{_infodir}/microhttpd.info%{ext_info}
|
|
/sbin/install-info --info-dir=%{_infodir} --info-file=%{_infodir}/microhttpd-tutorial.info%{ext_info}
|
|
%endif
|
|
|
|
%if 0%{?mandriva_version}
|
|
%_install_info libmicrohttpd.info
|
|
%_install_info libmicrohttpd-tutorial.info
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/libmicrohttpd.info%{ext_info}
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/libmicrohttpd-tutorial.info%{ext_info}
|
|
%endif
|
|
|
|
%postun devel
|
|
%if 0%{?fedora_version} || 0%{?scientificlinux_version} || 0%{?centos_version}
|
|
/sbin/install-info --delete --info-dir=%{_infodir} --info-file=%{_infodir}/microhttpd.info%{ext_info}
|
|
/sbin/install-info --delete --info-dir=%{_infodir} --info-file=%{_infodir}/microhttpd-tutorial.info%{ext_info}
|
|
%endif
|
|
|
|
%if 0%{?mandriva_version}
|
|
%_remove_install_info libmicrohttpd.info
|
|
%_remove_install_info libmicrohttpd-tutorial.info
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libmicrohttpd.info%{ext_info}
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libmicrohttpd-tutorial.info%{ext_info}
|
|
%endif
|
|
|
|
%files -n %{name}%{soname}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/%{name}.so.%{soname}
|
|
%{_libdir}/%{name}.so.%{soname}.*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc ChangeLog
|
|
%{_includedir}/microhttpd.h
|
|
%{_libdir}/%{name}.so
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
%{_infodir}/%{name}*.info*
|
|
%{_mandir}/man3/%{name}.3*
|
|
|
|
# Do NOT delete this cause I need it for Fedora & Mandriva too!
|
|
%if 0%{?fedora_version} || 0%{?scientificlinux_version} || 0%{?centos_version}
|
|
%exclude %{_infodir}/dir
|
|
%endif
|
|
|
|
%changelog
|