[packages/h2o] mruby bcond

glen glen at pld-linux.org
Fri Sep 29 13:44:00 CEST 2017


commit c25824eaa61db841e431b04f09336e4581409fd4
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Fri Sep 29 14:42:09 2017 +0300

    mruby bcond

 h2o.spec | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/h2o.spec b/h2o.spec
index 441452e..b0c3d85 100644
--- a/h2o.spec
+++ b/h2o.spec
@@ -1,5 +1,9 @@
 # TODO
 # - libwslay for websockets
+#
+# Conditional build:
+%bcond_without	mruby		# using mruby scripting support (Rack-based)
+
 Summary:	H2O - an optimized HTTP server with support for HTTP/1.x and HTTP/2
 Name:		h2o
 Version:	2.2.2
@@ -8,7 +12,7 @@ License:	MIT
 Group:		Networking/Daemons/HTTP
 Source0:	https://github.com/h2o/h2o/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	efc3a98cd21d3b91d66b2a99b1518255
-URL:		https://github.com/h2o/h2o
+URL:		https://h2o.examp1e.net/
 BuildRequires:	cmake >= 2.8.11
 BuildRequires:	libstdc++-devel
 BuildRequires:	libuv-devel >= 1.0.0
@@ -16,6 +20,10 @@ BuildRequires:	openssl-devel >= 1.0.2
 BuildRequires:	pkgconfig
 BuildRequires:	yaml-devel
 BuildRequires:	zlib-devel
+%if %{with mruby}
+BuildRequires:	bison
+BuildRequires:	ruby-devel
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -37,7 +45,9 @@ Header files for h2o library.
 %build
 install -d build
 cd build
-%cmake ..
+%cmake \
+	-DWITH_MRUBY=%{!?with_mruby:OFF}%{?with_mruby:ON} \
+	..
 %{__make} \
 	V=1
 
@@ -63,7 +73,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libh2o-evloop.so.0.13
 %attr(755,root,root) %{_libdir}/libh2o-evloop.so.*.*.*
 %dir %{_datadir}/%{name}
-%{_datadir}/%{name}/mruby
 %{_datadir}/%{name}/status
 %attr(755,root,root) %{_datadir}/%{name}/annotate-backtrace-symbols
 %attr(755,root,root) %{_datadir}/%{name}/fastcgi-cgi
@@ -74,6 +83,10 @@ rm -rf $RPM_BUILD_ROOT
 # TODO: use ca-certificates package
 %{_datadir}/%{name}/ca-bundle.crt
 
+%if %{with mruby}
+%{_datadir}/%{name}/mruby
+%endif
+
 %files devel
 %defattr(644,root,root,755)
 %{_includedir}/h2o.h
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/h2o.git/commitdiff/c25824eaa61db841e431b04f09336e4581409fd4



More information about the pld-cvs-commit mailing list