[packages/nghttp2-asio] initial snap after nghttp2-asio got separated from nghttp2

atler atler at pld-linux.org
Thu Aug 3 21:29:42 CEST 2023


commit 2326e975f48f364a5014247df712b9615a5b1e5c
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Aug 3 21:14:43 2023 +0200

    initial snap after nghttp2-asio got separated from nghttp2
    
    - bump epoch since autoconf version is 0.1.0 now

 nghttp2-asio.spec    | 229 ++++++++-------------------------------------------
 nghttp2-link.patch   |  10 ---
 nghttp2-python.patch |  11 ---
 3 files changed, 34 insertions(+), 216 deletions(-)
---
diff --git a/nghttp2-asio.spec b/nghttp2-asio.spec
index 0862c12..b4ee710 100644
--- a/nghttp2-asio.spec
+++ b/nghttp2-asio.spec
@@ -1,171 +1,68 @@
-# TODO: mruby, neverbleed?
 #
 # Conditional build:
-%bcond_without	asio		# libnghttp2_asio C++ library
-%bcond_with	http3		# experimental HTTP/3 support
-%bcond_with	libbpf		# BPF support (requires CC=clang)
 %bcond_without	static_libs	# static libraries
-%bcond_without	systemd		# don't include systemd support
-%bcond_without	tests		# "make check" call
 
-Summary:	HTTP/2.0 C library
-Summary(pl.UTF-8):	Biblioteka C HTTP/2.0
-Name:		nghttp2
-Version:	1.50.0
-Release:	1
+%define		gitref	e877868abe06a83ed0a6ac6e245c07f6f20866b5
+%define		snap	20220811
+%define		rel	1
+
+Summary:	HTTP/2.0 C++ library
+Summary(pl.UTF-8):	Biblioteka C++ HTTP/2.0
+Name:		nghttp2-asio
+Version:	0.1.0
+Release:	0.%{snap}.%{rel}
+Epoch:		1
 License:	MIT
 Group:		Libraries
-#Source0Download: https://github.com/nghttp2/nghttp2/releases
-Source0:	https://github.com/nghttp2/nghttp2/releases/download/v%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	4168ccacaa009665b6a7fe455842f95b
-Patch0:		%{name}-link.patch
-Patch1:		%{name}-python.patch
+Source0:	https://github.com/nghttp2/nghttp2-asio/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5:	55e61a2019a4b2839b1ad20a528ba3a7
 URL:		https://nghttp2.org/
-%{?with_tests:BuildRequires:	CUnit >= 2.1}
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
-%{?with_asio:BuildRequires:	boost-devel >= 1.54.0}
-BuildRequires:	c-ares-devel >= 1.7.5
-BuildRequires:	jansson-devel >= 2.5
-%{?with_libbpf:BuildRequires:	libbpf-devel >= 0.7.0}
-BuildRequires:	libev-devel
-# for examples
-BuildRequires:	libevent-devel >= 2.0.8
+BuildRequires:	boost-devel >= 1.54.0
 BuildRequires:	libstdc++-devel >= 6:5
 BuildRequires:	libtool >= 2:2.2.6
-BuildRequires:	libxml2-devel >= 1:2.6.26
-%{?with_http3:BuildRequires:	nghttp3-devel >= 0.7.0}
-# +ngtcp2-crypto-openssl or ngtcp2-crypto-boringssl
-%{?with_http3:BuildRequires:	ngtcp2-devel >= 0.9.0}
+BuildRequires:	nghttp2-devel >= 1.43.0
 BuildRequires:	openssl-devel >= 1.0.1
-%{?with_http3:BuildRequires:	openssl-devel(quic)}
 BuildRequires:	pkgconfig >= 1:0.20
-BuildRequires:	python3 >= 1:3.8
-BuildRequires:	python3-Cython >= 0.19
-BuildRequires:	python3-devel >= 1:3.8
-BuildRequires:	python3-setuptools
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.734
-BuildRequires:	sed >= 4.0
-%{?with_systemd:BuildRequires:	systemd-devel >= 1:209}
-BuildRequires:	tar >= 1:1.22
-BuildRequires:	xz
-BuildRequires:	zlib-devel >= 1.2.3
-Requires:	%{name}-libs = %{version}-%{release}
-Requires:	c-ares >= 1.7.5
-Requires:	jansson >= 2.5
-# noinst examples only
-#Requires:	libevent >= 2.0.8
-Requires:	libxml2 >= 1:2.6.26
+Requires:	nghttp2-libs >= 1.43.0
 Requires:	openssl >= 1.0.1
-Requires:	zlib >= 1.2.3
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-This is an experimental implementation of Hypertext Transfer Protocol
-version 2.0.
-
-%description -l pl.UTF-8
-Ta biblioteka jest eksperymentalną implementacją protokołu HTTP
-(Hypertext Transfer Protocol) w wersji 2.0.
-
-%package libs
-Summary:	A library implementing the HTTP/2 protocol
-Summary(pl.UTF-8):	Biblioteka implementująca protokół HTTP/2
-Group:		Libraries
-Conflicts:	nghttp2 < 1.11.1-2
-
-%description libs
-libnghttp2 is a library implementing the Hypertext Transfer Protocol
-version 2 (HTTP/2) protocol in C.
-
-%description libs -l pl.UTF-8
-libnghttp2 to napisana w C biblioteka implementująca protokół HTTP/2
-(Hypertext Transfer Protocol w wersji 2).
-
-%package devel
-Summary:	Files needed for developing with libnghttp2
-Summary(pl.UTF-8):	Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2
-Group:		Development/Libraries
-Requires:	%{name}-libs = %{version}-%{release}
-
-%description devel
-Files needed for building applications with libnghttp2.
-
-%description devel -l pl.UTF-8
-Pliki niezbędne do tworzenia aplikacji z użyciem libnghttp2.
-
-%package static
-Summary:	Static libnghttp2 library
-Summary(pl.UTF-8):	Statyczna biblioteka libnghttp2
-Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-
-%description static
-Static libnghttp2 library.
-
-%description static -l pl.UTF-8
-Statyczna biblioteka libnghttp2.
-
-%package -n python3-nghttp2
-Summary:	Python binding to nghttp2 library
-Summary(pl.UTF-8):	Wiązanie Pythona do biblioteki nghttp2
-Group:		Libraries/Python
-Requires:	%{name} = %{version}-%{release}
-Requires:	python3-libs >= 1:3.8
-Obsoletes:	python-nghttp2 < 1.43.0
-
-%description -n python3-nghttp2
-Python binding to nghttp2 library.
-
-%description -n python3-nghttp2 -l pl.UTF-8
-Wiązanie Pythona do biblioteki nghttp2.
-
-%package asio
-Summary:	HTTP/2.0 C++ library
-Summary(pl.UTF-8):	Biblioteka C++ HTTP/2.0
-Group:		Libraries
-Requires:	%{name}-libs = %{version}-%{release}
-Requires:	openssl >= 1.0.1
-
-%description asio
 HTTP/2.0 C++ library.
 
-%description asio -l pl.UTF-8
+%description -l pl.UTF-8
 Biblioteka C++ HTTP/2.0.
 
-%package asio-devel
+%package devel
 Summary:	Header file for nghttp2_asio library
 Summary(pl.UTF-8):	Plik nagłówkowy biblioteki nghttp2_asio
 Group:		Development/Libraries
-Requires:	%{name}-asio = %{version}-%{release}
-Requires:	%{name}-devel = %{version}-%{release}
+Requires:	%{name} = %{epoch}:%{version}-%{release}
 Requires:	libstdc++-devel >= 6:5
+Requires:	nghttp2-devel >= 1.43.0
 
-%description asio-devel
+%description devel
 Header file for nghttp2_asio library.
 
-%description asio-devel -l pl.UTF-8
+%description devel -l pl.UTF-8
 Plik nagłówkowy biblioteki nghttp2_asio.
 
-%package asio-static
+%package static
 Summary:	Static libnghttp2_asio library
 Summary(pl.UTF-8):	Statyczna biblioteka libnghttp2_asio
 Group:		Development/Libraries
-Requires:	%{name}-asio-devel = %{version}-%{release}
+Requires:	%{name}-devel = %{epoch}:%{version}-%{release}
 
-%description asio-static
+%description static
 Static libnghttp2_asio library.
 
-%description asio-static -l pl.UTF-8
+%description static -l pl.UTF-8
 Statyczna biblioteka libnghttp2_asio.
 
 %prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-
-%{__sed} -i -e '1s,/usr/bin/env python,%{__python3},' script/fetch-ocsp-response
+%setup -q -n %{name}-%{gitref}
 
 %build
 %{__libtoolize}
@@ -174,89 +71,32 @@ Statyczna biblioteka libnghttp2_asio.
 %{__autoheader}
 %{__automake}
 %configure \
-	--enable-app \
-	%{?with_asio:--enable-asio-lib} \
-	--enable-hpack-tools \
-	%{?with_http3:--enable-http3} \
-	--enable-python-bindings \
 	--disable-silent-rules \
-	%{!?with_static_libs:--disable-static} \
-	--with-cython=/usr/bin/cython3 \
-	--without-jemalloc \
-	%{?with_libbpf:--with-libbpf}
+	%{!?with_static_libs:--disable-static}
 
 %{__make}
 
-%if %{with tests}
-%{__make} check
-%endif
-
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
-# packaged as %doc
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/nghttp2
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnghttp2_asio.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post	libs -p /sbin/ldconfig
-%postun	libs -p /sbin/ldconfig
-
-%post	asio -p /sbin/ldconfig
-%postun	asio -p /sbin/ldconfig
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README.rst
-%attr(755,root,root) %{_bindir}/deflatehd
-%attr(755,root,root) %{_bindir}/h2load
-%attr(755,root,root) %{_bindir}/inflatehd
-%attr(755,root,root) %{_bindir}/nghttp
-%attr(755,root,root) %{_bindir}/nghttpd
-%attr(755,root,root) %{_bindir}/nghttpx
-%dir %{_datadir}/nghttp2
-%attr(755,root,root) %{_datadir}/nghttp2/fetch-ocsp-response
-%{_mandir}/man1/h2load.1*
-%{_mandir}/man1/nghttp.1*
-%{_mandir}/man1/nghttpd.1*
-%{_mandir}/man1/nghttpx.1*
-
-%files libs
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libnghttp2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnghttp2.so.14
-
-%files devel
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libnghttp2.so
-%dir %{_includedir}/nghttp2
-%{_includedir}/nghttp2/nghttp2*.h
-%{_pkgconfigdir}/libnghttp2.pc
-
-%if %{with static_libs}
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libnghttp2.a
-%endif
-
-%files -n python3-nghttp2
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py3_sitedir}/nghttp2.cpython-*.so
-%{py3_sitedir}/python_nghttp2-%{version}-py*.egg-info
-
-%if %{with asio}
-%files asio
-%defattr(644,root,root,755)
+%doc AUTHORS README.rst
 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.1
+%attr(755,root,root) %ghost %{_libdir}/libnghttp2_asio.so.0
 
-%files asio-devel
+%files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libnghttp2_asio.so
 %{_includedir}/nghttp2/asio_http2.h
@@ -265,8 +105,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/libnghttp2_asio.pc
 
 %if %{with static_libs}
-%files asio-static
+%files static
 %defattr(644,root,root,755)
 %{_libdir}/libnghttp2_asio.a
 %endif
-%endif
diff --git a/nghttp2-link.patch b/nghttp2-link.patch
deleted file mode 100644
index 1f81de2..0000000
--- a/nghttp2-link.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- nghttp2-1.3.0/src/Makefile.am.orig	2015-09-06 17:57:30.052519494 +0200
-+++ nghttp2-1.3.0/src/Makefile.am	2015-09-06 18:20:57.609127150 +0200
-@@ -216,6 +216,6 @@
- 	${BOOST_LDFLAGS} \
- 	${BOOST_ASIO_LIB} \
- 	${BOOST_THREAD_LIB} \
--	${BOOST_SYSTEM_LIB}
-+	${BOOST_SYSTEM_LIB} -lpthread
- 
- endif # ENABLE_ASIO_LIB
diff --git a/nghttp2-python.patch b/nghttp2-python.patch
deleted file mode 100644
index 7a2ebdd..0000000
--- a/nghttp2-python.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- nghttp2-1.3.0/python/Makefile.am.orig	2015-08-30 12:02:56.000000000 +0200
-+++ nghttp2-1.3.0/python/Makefile.am	2015-09-06 20:09:36.208853530 +0200
-@@ -33,7 +33,7 @@
- 	$(PYTHON) setup.py build
- 
- install-exec-local:
--	$(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
-+	$(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(prefix)
- 
- uninstall-local:
- 	rm -f $(DESTDIR)$(libdir)/python*/site-packages/nghttp2.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nghttp2-asio.git/commitdiff/2326e975f48f364a5014247df712b9615a5b1e5c



More information about the pld-cvs-commit mailing list