%define ver 1.1.1
%define rel 1

Summary: an optimized HTTP server with support for HTTP/1.x and HTTP/2
Name: h2o
Version: %{ver}
Release: %{rel}%{?_dist_release}
License: MIT
Group: System Environment/Daemons
URL: https://github.com/h2o/h2o/
#https://github.com/h2o/h2o/archive/v%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires: cmake
BuildRequires: libyaml-devel
BuildRequires: openssl-devel

%description
H2O is a very fast HTTP server written in C. It can also be used as a library.

%prep
%setup -q
%cmake

%build
%__make

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%check
#make test

%files
%defattr(-,root,root,-)
%doc README.md Changes LICENSE examples
%{_bindir}/h2o
%dir %{_datadir}/h2o
%{_datadir}/h2o/fetch-ocsp-response

%changelog
* Mon Mar 23 2015 IWAI, Masaharu <iwaim.sub@gmail.com> 1.1.1-1
- Initial build.
