# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # h2o # h2o/pkg-descr # h2o/distinfo # h2o/Makefile # h2o/files # h2o/files/h2o.conf.sample # h2o/files/h2o.in # h2o/pkg-plist # echo c - h2o mkdir -p h2o > /dev/null 2>&1 echo x - h2o/pkg-descr sed 's/^X//' >h2o/pkg-descr << 'END-of-h2o/pkg-descr' XH2O is a very fast HTTP server written in C. It can also be used as a library. XIt supports: X X- HTTP/1.0, HTTP/1.1 X- [HTTP/2](http://http2.github.io/) X- draft 16 (and draft 14 to support older clients) X- persistent connections X- chunked encoding X- negotiation methods: NPN, ALPN, Upgrade, direct X- dependency and weight-based prioritization X- server push X- TLS X- uses [OpenSSL](https://www.openssl.org/) X- forward secrecy X- AEAD ciphers X- OCSP stapling (automatically enabled) X- session resumption (internal memory) X- conditional GET using last-modified / etag X- mime-type configuration X- reverse proxy X- persistent upstream connection X XWWW: http://github.com/h2o/h2o END-of-h2o/pkg-descr echo x - h2o/distinfo sed 's/^X//' >h2o/distinfo << 'END-of-h2o/distinfo' XSHA256 (h2o-1.0.1.tar.gz) = 44d8142482d0bd2a0a3ce904dafeb365c295883de263ed76891e9e264ca3669e XSIZE (h2o-1.0.1.tar.gz) = 782916 END-of-h2o/distinfo echo x - h2o/Makefile sed 's/^X//' >h2o/Makefile << 'END-of-h2o/Makefile' X# Created by: Dave Cottlehuber X# $FreeBSD$ X XPORTNAME= h2o XPORTVERSION= 1.0.1 XPORTREVISION= 0 XCATEGORIES= www X XMAINTAINER= dch@skunkwerks.at XCOMMENT= Optimized HTTP2 server with support for HTTP/1.x X XLICENSE= MIT X XLIB_DEPENDS= libyaml.so:${PORTSDIR}/textproc/libyaml X XUSE_GITHUB= yes XGH_ACCOUNT= h2o XGH_TAGNAME= v1.0.1 XGH_COMMIT= c28f39e X XMAKE_JOBS_UNSAFE= yes XUSES= cmake:outsource X XUSE_OPENSSL= yes X XPORTDOCS= README.md X XSUB_FILES= ${PORTNAME} XSUB_LIST+= H2O_USER=${H2O_USER} \ X H2O_GROUP=${H2O_GROUP} \ X H2O_PIDDIR=${H2O_PIDDIR} \ X H2O_LOGDIR=${H2O_LOGDIR} X XPLIST_SUB= H2O_USER=${H2O_USER} \ X H2O_GROUP=${H2O_GROUP} \ X H2O_PIDDIR=${H2O_PIDDIR} \ X H2O_LOGDIR=${H2O_LOGDIR} X XH2O_USER?= www XH2O_GROUP?= www X XH2O_LOGDIR= /var/log/${PORTNAME}/ XH2O_PIDDIR= /var/run/${PORTNAME}/ X XUSE_RC_SUBR= ${PORTNAME} X Xdo-install: X ${MKDIR} ${STAGEDIR}${DOCSDIR} \ X ${STAGEDIR}${ETCDIR} \ X ${STAGEDIR}${H2O_PIDDIR} \ X ${STAGEDIR}${H2O_LOGDIR} X ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} X ${INSTALL_DATA} \ X ${FILESDIR}/${PORTNAME}.conf.sample \ X ${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample X ${INSTALL_PROGRAM} ${WRKDIR}/.build/h2o ${STAGEDIR}${PREFIX}/bin/h2o X X.include END-of-h2o/Makefile echo c - h2o/files mkdir -p h2o/files > /dev/null 2>&1 echo x - h2o/files/h2o.conf.sample sed 's/^X//' >h2o/files/h2o.conf.sample << 'END-of-h2o/files/h2o.conf.sample' X# vi: ft=yaml X# to find out the configuration commands, run: h2o --help Xlisten: 80 Xlisten: X port: 443 X ssl: X minimum-version: TLSv1.2 X # generate your own certificates X certificate-file: /usr/local/etc/h2o/server.crt X key-file: /usr/local/etc/h2o/server.key Xaccess-log: /var/log/h2o/h2o.log Xfile.dirlisting: on X# per-host configuration Xhosts: X my.example.org: X paths: X "/": X file.dir: "/usr/local/www/data/my.example.org" X pkg.example.org: X # virtual directory layout X paths: X "/poudriere": X file.dir: "/usr/local/poudriere/data/logs/bulk" X "/FreeBSD:10:amd64": X file.dir: "/usr/local/poudriere/data/packages/10_1_amd64-default/" X "/FreeBSD:11:amd64": X file.dir: "/usr/local/poudriere/data/packages/current_amd64-default/" END-of-h2o/files/h2o.conf.sample echo x - h2o/files/h2o.in sed 's/^X//' >h2o/files/h2o.in << 'END-of-h2o/files/h2o.in' X#!/bin/sh X# X# $FreeBSD: head/www/h2o/files/h2o.in $ X# X X# PROVIDE: h2o X# REQUIRE: LOGIN DAEMON NETWORKING X# KEYWORD: shutdown X X# Add the following lines to /etc/rc.conf.local or /etc/rc.conf X# to enable this service: X# X# h2o_enable (bool): Set to NO by default. X# Set it to YES to enable h2o. X# X# h2o_config (string): Optional full path for h2o config file X# h2o_user (user): Set to h2o by default. X X. /etc/rc.subr X Xname=h2o Xrcvar=h2o_enable X X# defaults X: ${h2o_enable:="NO"} X: ${h2o_user:="%%H2O_USER%%"} X: ${h2o_config:="%%PREFIX%%/etc/${name}/${name}.conf"} X: ${h2o_options:=" --conf ${h2o_config}"} X X# daemon Xh2o_pidfile="%%H2O_PIDDIR%%${name}.pid" Xprocname="%%PREFIX%%/bin/${name}" Xcommand=/usr/sbin/daemon Xcommand_args=" -f -c -p ${h2o_pidfile} ${procname} ${h2o_options}" Xstart_precmd="h2o_precmd" X Xh2o_precmd() X{ X # create empty pidfile with correct permissions X install -o ${h2o_user} /dev/null ${h2o_pidfile} X} X Xload_rc_config $name Xrun_rc_command "$1" END-of-h2o/files/h2o.in echo x - h2o/pkg-plist sed 's/^X//' >h2o/pkg-plist << 'END-of-h2o/pkg-plist' Xbin/h2o X@dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%H2O_LOGDIR%% X@dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%H2O_PIDDIR%% X@dir(%%H2O_USER%%,%%H2O_GROUP%%,0750) %%ETCDIR%% X@sample %%ETCDIR%%/h2o.conf.sample END-of-h2o/pkg-plist exit