Browse Source

nghttp2-1.20.0-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@10932 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 7 years ago
parent
commit
9bbe3e0154
1 changed files with 27 additions and 5 deletions
  1. 27 5
      n/nghttp2/nghttp2-vl.spec

+ 27 - 5
n/nghttp2/nghttp2-vl.spec

@@ -1,11 +1,14 @@
 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
 
 %bcond_with test
+%bcond_with app
+
+%define _unpackaged_files_terminate_build 1
 
 Summary: Experimental HTTP/2 client, server and proxy
 Summary(ja): HTTP/2クライアント・サーバ・プロキシの実験的実装
 Name: nghttp2
-Version: 1.17.0
+Version: 1.20.0
 Release: 1%{?_dist_release}
 License: MIT
 Group: Applications/Internet
@@ -13,6 +16,7 @@ URL: https://nghttp2.org/
 
 Vendor: Project Vine
 Distribution: Vine Linux
+Packager: tomop
 
 Source0: https://github.com/tatsuhiro-t/nghttp2/releases/download/v%{version}/nghttp2-%{version}.tar.xz
 
@@ -26,7 +30,11 @@ BuildRequires: libev-devel
 BuildRequires: openssl-devel
 BuildRequires: zlib-devel
 
+%if %{with app}
 Requires: libnghttp2 = %{version}-%{release}
+BuildRequires: jansson-devel
+BuildRequires: libxml2-devel
+%endif
 
 %description
 This package contains the HTTP/2 client, server and proxy programs.
@@ -108,8 +116,10 @@ LIBEV_CFLAGS=`pkg-config --cflags libev`
 CFLAGS="%{optflags} -fPIC $LIBEV_CFLAGS"    \
 CXXFLAGS="%{optflags} -fPIC $LIBEV_CFLAGS"  \
 %configure                                  \
+%if %{with app}
     --enable-app                            \
-    --enable-asio-lib                       \
+%endif
+	--enable-asio-lib                       \
     --with-pic                              \
     --with-boost                            \
     --with-boost-asio                       \
@@ -132,10 +142,15 @@ make %{?_smp_mflags} V=1
 %make_install
 
 # not needed on Fedora/RHEL
-rm -f $RPM_BUILD_ROOT%{_libdir}/libnghttp2*.la
+rm -f %{buildroot}%{_libdir}/libnghttp2*.la
 
 # will be installed via %%doc
-rm -f "$RPM_BUILD_ROOT%{_datadir}/doc/nghttp2/README.rst"
+rm -f "%{buildroot}%{_datadir}/doc/nghttp2/README.rst"
+
+%if ! %{with app}
+rm -f %{buildroot}%{_mandir}/man1/*
+%endif
+
 
 %post -n libnghttp2
 /sbin/ldconfig
@@ -153,10 +168,11 @@ rm -f "$RPM_BUILD_ROOT%{_datadir}/doc/nghttp2/README.rst"
 %check
 %if %{with test}
 # test the just built library instead of the system one, without using rpath
-export "LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$LD_LIBRARY_PATH"
+export "LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH"
 make %{?_smp_mflags} check
 %endif
 
+%if %{with app}
 %files
 %{_bindir}/h2load
 %{_bindir}/nghttp
@@ -167,9 +183,11 @@ make %{?_smp_mflags} check
 %{_mandir}/man1/nghttp.1*
 %{_mandir}/man1/nghttpd.1*
 %{_mandir}/man1/nghttpx.1*
+%endif
 
 %files -n libnghttp2
 %{_libdir}/libnghttp2*.so.*
+%{_datadir}/%{name}/fetch-ocsp-response
 %{!?_licensedir:%global license %%doc}
 %license COPYING
 
@@ -193,6 +211,10 @@ make %{?_smp_mflags} check
 %endif
 
 %changelog
+* Thu Mar 16 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.20.0-1
+- new upstream release.
+- disabled to build apps as default.
+
 * Wed Dec 21 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.17.0-1
 - new upstream release.