summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcsmk <csmk@chaoslab.org>2017-06-30 21:45:51 +0900
committerMichał Górny <mgorny@gentoo.org>2017-07-05 21:49:53 +0200
commit7de7699a136a5f2092f9050ba3f53ff2965e7cfb (patch)
tree5a863c0019aeac1b024e0022212711fa1f597275 /www-servers/h2o/h2o-9999.ebuild
parentnet-misc/seafile-client: Fix tarball verification failure (diff)
downloadgentoo-7de7699a136a5f2092f9050ba3f53ff2965e7cfb.tar.gz
gentoo-7de7699a136a5f2092f9050ba3f53ff2965e7cfb.tar.bz2
gentoo-7de7699a136a5f2092f9050ba3f53ff2965e7cfb.zip
www-servers/h2o: New package
H2O is a new generation HTTP server that provides quicker response to users with less CPU utilization when compared to older generation of web servers. Designed from ground-up, the server takes full advantage of HTTP/2 features including prioritized content serving and server push, promising outstanding experience to the visitors of your web site. Base for ebuild from https://github.com/csmk/frabjous. Bug: https://bugs.gentoo.org/623160 Closes: https://github.com/gentoo/gentoo/pull/5015
Diffstat (limited to 'www-servers/h2o/h2o-9999.ebuild')
-rw-r--r--www-servers/h2o/h2o-9999.ebuild69
1 files changed, 69 insertions, 0 deletions
diff --git a/www-servers/h2o/h2o-9999.ebuild b/www-servers/h2o/h2o-9999.ebuild
new file mode 100644
index 000000000000..6171018d54cf
--- /dev/null
+++ b/www-servers/h2o/h2o-9999.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils git-r3 systemd user
+
+DESCRIPTION="An optimized HTTP server with support for HTTP/1.x and HTTP/2"
+HOMEPAGE="https://h2o.examp1e.net"
+EGIT_REPO_URI=( {https,git}://github.com/h2o/h2o.git )
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="libressl +mruby"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}
+ mruby? (
+ sys-devel/bison
+ || (
+ dev-lang/ruby:2.4
+ dev-lang/ruby:2.3
+ dev-lang/ruby:2.2
+ dev-lang/ruby:2.1
+ )
+ )"
+
+pkg_setup() {
+ enewgroup h2o
+ enewuser h2o -1 -1 -1 h2o
+}
+
+src_prepare() {
+ # Leave optimization level to user CFLAGS
+ sed -i 's/-O2 -g ${CC_WARNING_FLAGS} //g' ./CMakeLists.txt \
+ || die "sed fix failed!"
+
+ default
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}"/etc/h2o
+ -DWITH_MRUBY="$(usex mruby)"
+ -DWITHOUT_LIBS=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/h2o.initd h2o
+ systemd_dounit "${FILESDIR}"/h2o.service
+
+ insinto /etc/h2o
+ doins "${FILESDIR}"/h2o.conf
+
+ keepdir /var/log/h2o
+ fperms 0700 /var/log/h2o
+
+ keepdir /var/www/localhost/htdocs
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/h2o.logrotate h2o
+}