2012-10-03 11:47:01 +02:00
|
|
|
#
|
|
|
|
# spec file for package libmicrohttpd
|
|
|
|
#
|
2014-01-28 09:41:22 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2012-10-03 11:47:01 +02:00
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%global libmicrohttpd libmicrohttpd10
|
|
|
|
%global libmicrospdy libmicrospdy0
|
2010-07-27 15:56:42 +02:00
|
|
|
Name: libmicrohttpd
|
2014-04-25 12:40:05 +02:00
|
|
|
Version: 0.9.34
|
2012-10-03 11:47:01 +02:00
|
|
|
Release: 0
|
2013-06-06 08:50:50 +02:00
|
|
|
Summary: Small Embeddable HTTP Server Library
|
|
|
|
License: LGPL-2.1+
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
2010-07-27 15:56:42 +02:00
|
|
|
Url: http://gnunet.org/libmicrohttpd/
|
2013-05-16 09:49:21 +02:00
|
|
|
Source0: http://ftpmirror.gnu.org/libmicrohttpd/%{name}-%{version}.tar.gz
|
|
|
|
Source1: http://ftpmirror.gnu.org/libmicrohttpd/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source2: libmicrohttpd.keyring
|
2014-04-25 12:40:05 +02:00
|
|
|
# PATCH-FIX-UPSTREAM: install spdy pc file, from Fedora and already upstream applied
|
|
|
|
Patch0: libmicrohttpd-0.9.34-spdy-pc.patch
|
2014-04-28 09:24:27 +02:00
|
|
|
# PATCH-WORKAROUND-OPENSUSE: the threads have a problem deadlocking (in OBS)
|
|
|
|
Patch1: disable-stalling-test.patch
|
2014-04-25 12:40:05 +02:00
|
|
|
# Autotools only due to above patch
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2010-07-27 15:56:42 +02:00
|
|
|
BuildRequires: libcurl-devel
|
|
|
|
BuildRequires: libgcrypt-devel >= 1.2.4
|
|
|
|
BuildRequires: libgnutls-devel
|
2014-04-25 12:40:05 +02:00
|
|
|
BuildRequires: libtasn1-devel
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: openssl-devel
|
2010-07-27 15:56:42 +02:00
|
|
|
BuildRequires: pkg-config
|
2014-04-25 12:40:05 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-07-27 15:56:42 +02:00
|
|
|
|
2010-02-20 18:30:23 +01:00
|
|
|
%description
|
2014-04-25 12:40:05 +02:00
|
|
|
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
|
2010-07-27 15:56:42 +02:00
|
|
|
other projects are:
|
2010-02-20 18:30:23 +01:00
|
|
|
|
|
|
|
* 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
|
2014-04-25 12:40:05 +02:00
|
|
|
* Supported platforms include GNU/Linux, FreeBSD, OpenBSD, NetBSD, OS X, W32,
|
2010-07-27 15:56:42 +02:00
|
|
|
Symbian and z/OS
|
2010-02-20 18:30:23 +01:00
|
|
|
* Optional support for SSL3 and TLS (requires libgcrypt)
|
|
|
|
|
2014-04-25 12:40:05 +02:00
|
|
|
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++
|
2010-07-27 15:56:42 +02:00
|
|
|
application, check it out.
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%package -n %{libmicrohttpd}
|
|
|
|
Summary: Small embeddable http server library
|
|
|
|
Group: System/libraries
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%description -n %{libmicrohttpd}
|
|
|
|
Shared library for %{name} (%{summary}).
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%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.
|
2010-02-20 18:30:23 +01:00
|
|
|
|
|
|
|
%package devel
|
2014-04-25 12:40:05 +02:00
|
|
|
Summary: Small Embeddable HTTP Server Library
|
|
|
|
Group: Development/Libraries/C and C++
|
2013-10-03 15:36:19 +02:00
|
|
|
Requires: %{libmicrohttpd} = %{version}
|
2013-06-06 08:50:50 +02:00
|
|
|
Requires(post): info
|
|
|
|
Requires(postun): info
|
2010-02-20 18:30:23 +01:00
|
|
|
|
|
|
|
%description devel
|
2013-10-03 15:36:19 +02:00
|
|
|
Headers, pkg-config files, so link and other development files for %{name}
|
|
|
|
(%{summary}).
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%package -n libmicrospdy-devel
|
|
|
|
Summary: Small Embeddable HTTP Server Library
|
|
|
|
Group: Development/Libraries/C and C++
|
2014-04-25 12:40:05 +02:00
|
|
|
Requires: %{libmicrospdy} = %{version}
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%description -n libmicrospdy-devel
|
|
|
|
Headers for libmicrospdy (%{summary}).
|
|
|
|
|
|
|
|
%package -n microspdy2http
|
|
|
|
Summary: Proxy translated SPDY requests to https server
|
|
|
|
Group: System/Libraries
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%description -n microspdy2http
|
|
|
|
Translates incoming SPDY requests to http server on
|
|
|
|
localhost.
|
|
|
|
* Uses libcurl.
|
|
|
|
* No error handling for curl requests.
|
2010-02-20 18:30:23 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2013-06-06 10:16:27 +02:00
|
|
|
%patch0 -p1
|
2014-04-28 09:24:27 +02:00
|
|
|
%patch1 -p1
|
2014-04-25 12:40:05 +02:00
|
|
|
autoreconf -vi
|
2013-06-06 10:16:27 +02:00
|
|
|
|
2010-02-20 18:30:23 +01:00
|
|
|
%build
|
2014-04-25 12:40:05 +02:00
|
|
|
%configure \
|
|
|
|
--enable-bauth --enable-dauth \
|
|
|
|
--enable-epoll \
|
|
|
|
--enable-messages --enable-postprocessor \
|
|
|
|
--enable-https --enable-gnutls \
|
|
|
|
--disable-static \
|
|
|
|
--enable-curl \
|
|
|
|
--enable-spdy
|
|
|
|
make %{?_smp_mflags}
|
2010-02-20 18:30:23 +01:00
|
|
|
|
|
|
|
%install
|
2014-04-25 12:40:05 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-05-16 09:49:21 +02:00
|
|
|
%check
|
2014-04-25 12:40:05 +02:00
|
|
|
make -d -j1 check
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%post -n %{libmicrohttpd} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %{libmicrohttpd} -p /sbin/ldconfig
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%post -n %{libmicrospdy} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %{libmicrospdy} -p /sbin/ldconfig
|
2013-05-16 09:49:21 +02:00
|
|
|
|
2010-02-20 18:30:23 +01:00
|
|
|
%post devel
|
|
|
|
|
2010-03-15 09:57:24 +01:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/libmicrohttpd.info%{ext_info}
|
2010-10-22 16:35:08 +02:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/libmicrohttpd-tutorial.info%{ext_info}
|
2010-02-20 18:30:23 +01:00
|
|
|
|
|
|
|
%postun devel
|
2010-03-15 09:57:24 +01:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libmicrohttpd.info%{ext_info}
|
2010-10-22 16:35:08 +02:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/libmicrohttpd-tutorial.info%{ext_info}
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%files -n %{libmicrohttpd}
|
2010-02-20 18:30:23 +01:00
|
|
|
%defattr(-,root,root)
|
2013-10-03 15:36:19 +02:00
|
|
|
%{_libdir}/%{name}.so.*
|
2010-02-20 18:30:23 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2012-09-28 16:12:37 +02:00
|
|
|
%doc ChangeLog
|
2010-02-20 18:30:23 +01:00
|
|
|
%{_includedir}/microhttpd.h
|
2013-05-16 09:49:21 +02:00
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
%{_infodir}/%{name}*.info*
|
|
|
|
%{_mandir}/man3/%{name}.3*
|
2010-02-20 18:30:23 +01:00
|
|
|
|
2013-10-03 15:36:19 +02:00
|
|
|
%files -n %{libmicrospdy}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libmicrospdy.so.*
|
|
|
|
|
|
|
|
%files -n libmicrospdy-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/microspdy.h
|
|
|
|
%{_libdir}/libmicrospdy.so
|
2014-04-25 12:40:05 +02:00
|
|
|
%{_libdir}/pkgconfig/libmicrospdy.pc
|
2013-10-03 15:36:19 +02:00
|
|
|
|
|
|
|
%files -n microspdy2http
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%attr(0755,root,root) %{_bindir}/microspdy2http
|
|
|
|
|
2012-09-28 16:12:37 +02:00
|
|
|
%changelog
|