add libmicrohttpd

This commit is contained in:
yeah_wang 2019-12-06 16:51:54 +08:00
parent 92633cf306
commit 20d29e5975
3 changed files with 194 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- libmicrohttpd-0.9.53/src/microhttpd/daemon.c.orig 2017-04-12 08:31:18.243540128 +0200
+++ libmicrohttpd-0.9.53/src/microhttpd/daemon.c 2017-04-12 08:34:19.851158371 +0200
@@ -5415,7 +5415,7 @@
if (0 != (*pflags & MHD_USE_TLS))
{
gnutls_priority_init (&daemon->priority_cache,
- "NORMAL",
+ "@SYSTEM",
NULL);
}
#endif /* HTTPS_SUPPORT */

BIN
libmicrohttpd-0.9.59.tar.gz Normal file

Binary file not shown.

183
libmicrohttpd.spec Normal file
View File

@ -0,0 +1,183 @@
Name: libmicrohttpd
Version: 0.9.59
Release: 4
Epoch: 1
Summary: Lightweight library for embedding a webserver in applications
License: LGPLv2+
URL: http://www.gnu.org/software/libmicrohttpd/
Source0: https://ftp.gnu.org/gnu/libmicrohttpd/%{name}-%{version}.tar.gz
Patch0001: gnutls-utilize-system-crypto-policy.patch
BuildRequires: autoconf automake libtool gettext-devel texinfo gnutls-devel doxygen graphviz
Requires(post): info
Requires(preun):info
%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.
%package devel
Summary: Development files for libmicrohttpd
Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel
Development files for libmicrohttpd
%package help
Summary: This help package for libmicrohttpd
Requires: %{name} = %{epoch}:%{version}-%{release}
BuildArch: noarch
Provides: %{name}-doc = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-doc < %{epoch}:%{version}-%{release}
%description help
The help package contains manual pages and doc files for libmicrohttpd
%prep
%autosetup -p1
%build
autoreconf --install --force
%configure --disable-static --with-gnutls --enable-https=yes
%make_build
make -C doc/doxygen full
%check
make check
%install
%make_install
mkdir examples
cp src/examples/*.c examples
cp doc/examples/*.c examples
chmod 644 examples/*.c
cp -R doc/doxygen/html html
%post help
install-info %{_infodir}/libmicrohttpd.info.gz %{_infodir}/dir || :
install-info %{_infodir}/libmicrohttpd-tutorial.info.gz %{_infodir}/dir || :
%preun help
if [ $1 = 0 ] ; then
install-info --delete %{_infodir}/libmicrohttpd.info.gz %{_infodir}/dir || :
install-info --delete %{_infodir}/libmicrohttpd-tutorial.info.gz %{_infodir}/dir || :
fi
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%license COPYING
%{_libdir}/libmicrohttpd.so.*
%files devel
%{_includedir}/microhttpd.h
%{_libdir}/libmicrohttpd.so
%{_libdir}/pkgconfig/libmicrohttpd.pc
%exclude %{_libdir}/libmicrohttpd.la
%exclude %{_infodir}/dir
%exclude %{_bindir}/demo
%files help
%doc AUTHORS ChangeLog examples html README
%{_mandir}/man3/libmicrohttpd.3.gz
%{_infodir}/libmicrohttpd.info.gz
%{_infodir}/libmicrohttpd-tutorial.info.gz
%{_infodir}/libmicrohttpd_performance_data.png.gz
%changelog
* Thu Nov 21 2019 wangye<wangye54@huawei.com> - 0.9.59-4
- Package init