# Contributor: Bennett Goble # Maintainer: Bennett Goble pkgname=h2o pkgver=2.0.4 pkgrel=1 pkgdesc="An optimized HTTP/1, HTTP/2 server written in C" url="https://h2o.examp1e.net" arch="all" license="MIT" depends="perl" makedepends="cmake zlib-dev wslay-dev libressl-dev libuv-dev yaml-dev" install="$pkgname.pre-install" subpackages="$pkgname-dev $pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz h2o.conf h2o.initd h2o.logrotate" _builddir="$srcdir/$pkgname-$pkgver" prepare() { cd "$_builddir" cmake -DBUILD_SHARED_LIBS=on -DCMAKE_INSTALL_PREFIX=/usr . || return 1 } build() { cd "$_builddir" make -j1 || return 1 make libh2o || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir/etc/init.d/$pkgname" || return 1 install -m644 -D "$srcdir"/$pkgname.logrotate \ "$pkgdir"/etc/logrotate.d/$pkgname || return 1 install -m644 -D "$srcdir"/$pkgname.conf \ "$pkgdir"/etc/$pkgname.conf || return 1 install -m644 -D "$_builddir"/examples/doc_root/index.html \ "$pkgdir"/var/www/index.html || return 1 install -m700 -d "$pkgdir"/var/log/$pkgname || return 1 } md5sums="86719a22a35afe665e187e6f81b259ae h2o-2.0.4.tar.gz 7d986844504a8106732d0128063faea0 h2o.conf a1ad5f38f26603bd673106e7d6848469 h2o.initd bb8f7d3d7589b6fca65b563f984cddda h2o.logrotate" sha256sums="c0efa18f0ffb0f68ee4b60a6ed1feb54c770458c59e48baa2d9d0906ef9c68c0 h2o-2.0.4.tar.gz 05a712800b959aa3440307afdcd7a3a6ab8c17f48e1bfa3751a87cc67baf8737 h2o.conf 707c02f7f47590e5bbea5688e2a5ca014a861dfdd4e0013f64094cb45d3ac397 h2o.initd 43c3bacfddd1fc6c3c9a985e915bfd555e6282b27bb8da8862272d187490832e h2o.logrotate" sha512sums="5d8317a65c77294c8bc5388b65905aa614726ee0630705e70c7d419684f303e3006fa77d54e4c28dbdf3cde522324a03b318513e4de304cf5712ca44ad1a89c7 h2o-2.0.4.tar.gz 444f55c3eaae1f349223036086e45c983ea8be89e793068537ec25488c4065174bc509d0987ddc65a0357cb8acfec272e90d13ea7cdadf9cf112953d857aa574 h2o.conf e93e66a6b00b1bff94e37489c5fdf99d9d657adc63975ec54be30f8da23dafe7d7389f02a6452ed819efc9d8398aa716782a7fd6d8509621a975ed954b73bef9 h2o.initd 3d2c9e36c48cbb974d0691e4af8e9eb8f13e3bebb98a30417cdc87e76a4b5cddc4e4f665ebea26b95174287b95d002fdc3363f30ffcf15247fcd0530fe1abfcc h2o.logrotate"