From e6a8fcab2a62b7d38b8e67a050a05126860f4031 Mon Sep 17 00:00:00 2001 From: Eivind Uggedal Date: Sun, 4 Jan 2015 22:57:53 +0000 Subject: [PATCH] New package: h2o-0.9.0. --- srcpkgs/h2o/files/h2o.conf | 9 +++++++++ srcpkgs/h2o/files/h2o/run | 3 +++ srcpkgs/h2o/patches/disable-alpn.patch | 19 +++++++++++++++++++ srcpkgs/h2o/template | 22 ++++++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 srcpkgs/h2o/files/h2o.conf create mode 100644 srcpkgs/h2o/files/h2o/run create mode 100644 srcpkgs/h2o/patches/disable-alpn.patch create mode 100644 srcpkgs/h2o/template diff --git a/srcpkgs/h2o/files/h2o.conf b/srcpkgs/h2o/files/h2o.conf new file mode 100644 index 0000000000..fe7c245749 --- /dev/null +++ b/srcpkgs/h2o/files/h2o.conf @@ -0,0 +1,9 @@ +user: h2o +listen: 80 + +hosts: + localhost: + paths: + /: + file.dir: /srv/http + access-log: /var/log/h2o/localhost.log diff --git a/srcpkgs/h2o/files/h2o/run b/srcpkgs/h2o/files/h2o/run new file mode 100644 index 0000000000..c7b630ab4e --- /dev/null +++ b/srcpkgs/h2o/files/h2o/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec h2o -c /etc/h2o.conf diff --git a/srcpkgs/h2o/patches/disable-alpn.patch b/srcpkgs/h2o/patches/disable-alpn.patch new file mode 100644 index 0000000000..c47fb37c98 --- /dev/null +++ b/srcpkgs/h2o/patches/disable-alpn.patch @@ -0,0 +1,19 @@ +--- include/h2o/socket.h.orig 2015-01-04 17:35:34.135369701 +0000 ++++ include/h2o/socket.h 2015-01-04 17:35:43.091058908 +0000 +@@ -39,16 +39,8 @@ + # endif + #endif + +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L +-# define H2O_USE_ALPN 1 +-# define H2O_USE_NPN 1 +-#elif OPENSSL_VERSION_NUMBER >= 0x10001000L + # define H2O_USE_ALPN 0 + # define H2O_USE_NPN 1 +-#else +-# define H2O_USE_ALPN 0 +-# define H2O_USE_NPN 0 +-#endif + + #define H2O_SOCKET_INITIAL_INPUT_BUFFER_SIZE 4096 + diff --git a/srcpkgs/h2o/template b/srcpkgs/h2o/template new file mode 100644 index 0000000000..bb94b7cfd3 --- /dev/null +++ b/srcpkgs/h2o/template @@ -0,0 +1,22 @@ +# Template file for 'h2o' +pkgname=h2o +version=0.9.0 +revision=1 +build_style=cmake +conf_files="/etc/h2o.conf" +system_accounts="h2o" +make_dirs="/var/log/h2o 0750 root root" +hostmakedepends="cmake" +makedepends="libressl-devel libyaml-devel" +short_desc="An optimized HTTP server with support for HTTP/1.x and HTTP/2" +maintainer="Eivind Uggedal " +license="MIT" +homepage="https://github.com/h2o/h2o" +distfiles="${homepage}/archive/v${version}.tar.gz" +checksum=497e4dd297da3ed7206a03af8895fa3ba8bbf2cbfc446c94ec869c7d0afdf7e8 + +post_install() { + vsv h2o + vconf ${FILESDIR}/h2o.conf + vlicense LICENSE +}