libmicrohttpd/libmicrohttpd.spec
Dirk Mueller 5248edd6e6 - Version bump to 0.9.34:
* Drop tls patch seems to build fine
  * Remove code for other distros we build against 13.1+ anywhere
    within obs and it just clutters the spec.
  * Explicitely name switches in configure to make sure things go
    the desired way.
  * Fix install of libmicrohttpspdy pc file.
  + Added support for TCP FASTOPEN.
  + Removed dependency on plibc for simpler compilation for W32.
  + Added configure option "--disable-pipes" to use socketpairs
    instead of pipes for signalling to child threads. Pipes are
    always disabled on W32.
  + Corrected some uses of 'int' vs. 'size_t'.
  + MHD_USE_DUAL_STACK in libmicrohttpd currently just *inhibits
    setting* the IPV6_V6ONLY socket option, but per Microsoft's
    documentation the default on Windows is that this is enabled, thus
    MHD_USE_DUAL_STACK will not work (since it leaves the
    default). libmicrohttpd should probably just unconditionally set
    IPV6_V6ONLY to the desired value when the option is available.
  + Allow Keep-Alive with HTTP 1.0 (if explicitly requested),
    and automatically set "Connection: Keep-Alive" in response
    in this case as well.
  + Adding explicit annotations to hide symbols that are not for
    export in the C code (gcc 4.0 or higher only).
  + Adding a few lines to avoid warnings from picky compilers.
- Added patches:
  * libmicrohttpd-0.9.34-spdy-pc.patch
- Dropped patches:
  * libmicrohttpd-drop-test_tls_options.patch

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libmicrohttpd?expand=0&rev=32
2014-04-25 10:40:05 +00:00

188 lines
6.0 KiB
RPMSpec

#
# spec file for package libmicrohttpd
#
# Copyright (c) 2014 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/
#
%global libmicrohttpd libmicrohttpd10
%global libmicrospdy libmicrospdy0
Name: libmicrohttpd
Version: 0.9.34
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-UPSTREAM: install spdy pc file, from Fedora and already upstream applied
Patch0: libmicrohttpd-0.9.34-spdy-pc.patch
# Autotools only due to above patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libcurl-devel
BuildRequires: libgcrypt-devel >= 1.2.4
BuildRequires: libgnutls-devel
BuildRequires: libtasn1-devel
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 %{libmicrohttpd}
Summary: Small embeddable http server library
Group: System/libraries
%description -n %{libmicrohttpd}
Shared library for %{name} (%{summary}).
%package -n %{libmicrospdy}
Summary: Small embeddable http server library
Group: System/libraries
%description -n %{libmicrospdy}
Shared library for libmicrospdy (%{summary}).
WARNING: Additionally, a second, still very experimental library is provided
for SPDY (the base for HTTP 2.0) support. libmicrospdy provides a compact API
and implementation of SPDY server. libmicrospdy currently only implements
partially version 3 of SPDY.
%package devel
Summary: Small Embeddable HTTP Server Library
Group: Development/Libraries/C and C++
Requires: %{libmicrohttpd} = %{version}
Requires(post): info
Requires(postun): info
%description devel
Headers, pkg-config files, so link and other development files for %{name}
(%{summary}).
%package -n libmicrospdy-devel
Summary: Small Embeddable HTTP Server Library
Group: Development/Libraries/C and C++
Requires: %{libmicrospdy} = %{version}
%description -n libmicrospdy-devel
Headers for libmicrospdy (%{summary}).
%package -n microspdy2http
Summary: Proxy translated SPDY requests to https server
Group: System/Libraries
%description -n microspdy2http
Translates incoming SPDY requests to http server on
localhost.
* Uses libcurl.
* No error handling for curl requests.
%prep
%setup -q
%patch0 -p1
autoreconf -vi
%build
%configure \
--enable-bauth --enable-dauth \
--enable-epoll \
--enable-messages --enable-postprocessor \
--enable-https --enable-gnutls \
--disable-static \
--enable-curl \
--enable-spdy
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
find %{buildroot} -type f -name "*.la" -delete -print
%check
make -d -j1 check
%post -n %{libmicrohttpd} -p /sbin/ldconfig
%postun -n %{libmicrohttpd} -p /sbin/ldconfig
%post -n %{libmicrospdy} -p /sbin/ldconfig
%postun -n %{libmicrospdy} -p /sbin/ldconfig
%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/libmicrohttpd.info%{ext_info}
%install_info --info-dir=%{_infodir} %{_infodir}/libmicrohttpd-tutorial.info%{ext_info}
%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libmicrohttpd.info%{ext_info}
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libmicrohttpd-tutorial.info%{ext_info}
%files -n %{libmicrohttpd}
%defattr(-,root,root)
%{_libdir}/%{name}.so.*
%files devel
%defattr(-,root,root)
%doc ChangeLog
%{_includedir}/microhttpd.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%{_infodir}/%{name}*.info*
%{_mandir}/man3/%{name}.3*
%files -n %{libmicrospdy}
%defattr(-,root,root)
%{_libdir}/libmicrospdy.so.*
%files -n libmicrospdy-devel
%defattr(-,root,root)
%{_includedir}/microspdy.h
%{_libdir}/libmicrospdy.so
%{_libdir}/pkgconfig/libmicrospdy.pc
%files -n microspdy2http
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/microspdy2http
%changelog