SHA256
1
0
forked from pool/nghttp2
nghttp2/nghttp2.spec

156 lines
4.6 KiB
RPMSpec

#
# spec file for package nghttp2
#
# Copyright (c) 2015 SUSE LINUX 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: nghttp2
Version: 0.7.5
Release: 0
Summary: Implementation of Hypertext Transfer Protocol version 2 in C
License: MIT
Group: Development/Libraries/C and C++
Url: https://nghttp2.org/
Source: https://github.com/tatsuhiro-t/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
BuildRequires: boost-devel
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: python-Sphinx
BuildRequires: pkgconfig(cunit)
BuildRequires: pkgconfig(jansson)
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(python)
BuildRequires: pkgconfig(zlib)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This is an implementation of Hypertext Transfer Protocol version 2 in C.
The framing layer of HTTP/2 is implemented as a form of reusable C library.
On top of that, we have implemented HTTP/2 client, server and proxy.
We have also developed load test and benchmarking tool for HTTP/2 and SPDY.
HPACK encoder and decoder are available as public API.
%package -n lib%{name}-5
Summary: Shared library for %{name}
Group: System/Libraries
%description -n lib%{name}-5
Shared C libraries for implementation of Hypertext Transfer Protocol version 2
%package -n lib%{name}_asio0
Summary: Shared library for %{name}
Group: System/Libraries
%description -n lib%{name}_asio0
Shared librarios for asynchronous implementation of Hypertext Transfer Protocol version 2
%package -n lib%{name}-devel
Summary: Development files for %{name}
Group: Development/Languages/C and C++
Requires: lib%{name}-5 = %{version}
Provides: %{name}-devel
%description -n lib%{name}-devel
Development files for usage with lib%{name} which implements Hypertext Transfer Protocol version 2
%package -n lib%{name}_asio-devel
Summary: Development files for %{name}
Group: Development/Languages/C and C++
Requires: lib%{name}_asio0 = %{version}
%description -n lib%{name}_asio-devel
Development files for usage with lib%{name}_aio which implements asynchronous Hypertext Transfer Protocol version 2
%package doc
Summary: Documentation for %{name}
Group: Documentation
%description doc
Documentation for %{name} which includes shared C library, HTTP/2 client, server and proxy.
%prep
%setup -q
%build
%configure \
--enable-asio-lib \
--enable-static=no
make %{?_smp_mflags} all html
%check
make %{?_smp_mflags} check
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
rm -rf %{buildroot}%{_libdir}/lib%{name}.la
rm -rf %{buildroot}%{_libdir}/lib%{name}_asio.la
# none of applications using these man pages is built
rm -rf %{buildroot}%{_mandir}/man1/*
rm -rf doc/manual/html/.buildinfo
%post -n lib%{name}-5 -p /sbin/ldconfig
%post -n lib%{name}_asio0 -p /sbin/ldconfig
%postun -n lib%{name}-5 -p /sbin/ldconfig
%postun -n lib%{name}_asio0 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc COPYING AUTHORS ChangeLog
%{_bindir}/deflatehd
%{_bindir}/inflatehd
%files -n lib%{name}-5
%defattr(-,root,root)
%doc COPYING AUTHORS ChangeLog
%{_libdir}/lib%{name}.so.*
%files -n lib%{name}_asio0
%defattr(-,root,root)
%doc COPYING AUTHORS ChangeLog
%{_libdir}/lib%{name}_asio.so.*
%files -n lib%{name}-devel
%defattr(-,root,root)
%doc COPYING AUTHORS ChangeLog
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/nghttp2.h
%{_includedir}/%{name}/nghttp2ver.h
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/lib%{name}.pc
%files -n lib%{name}_asio-devel
%defattr(-,root,root)
%doc COPYING AUTHORS ChangeLog
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/asio_http2.h
%{_libdir}/lib%{name}_asio.so
%{_libdir}/pkgconfig/lib%{name}_asio.pc
%files doc
%defattr(-,root,root)
%doc COPYING AUTHORS ChangeLog
%doc doc/manual/html
%dir %{_datadir}/doc/%{name}
%doc %{_datadir}/doc/%{name}/README.rst
%changelog