summaryrefslogtreecommitdiff
path: root/h2o
diff options
context:
space:
mode:
Diffstat (limited to 'h2o')
-rw-r--r--h2o/PKGBUILD56
-rw-r--r--h2o/h2o.service16
2 files changed, 72 insertions, 0 deletions
diff --git a/h2o/PKGBUILD b/h2o/PKGBUILD
new file mode 100644
index 000000000..7559e08e0
--- /dev/null
+++ b/h2o/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Andy Weidenbaum <archbaum@gmail.com>
+# Contributor: Paul Préfontaine <paul+archlinuxaur@prefontaine.name>
+# Contributor: HLFH
+# Contributor: Wilhelm Schuster <wilhelm [aT] wilhelm [.] re>
+# Contributor: The_Decryptor
+
+pkgname=h2o
+pkgver=2.2.5
+pkgrel=1
+pkgdesc="Optimized HTTP server with support for HTTP/1.x and HTTP/2"
+arch=('i686' 'pentium4' 'x86_64')
+depends=('libuv' 'libyaml' 'wslay' 'zlib')
+makedepends=('cmake' 'libtool' 'make' 'pkg-config' 'ruby')
+url="https://github.com/h2o/h2o"
+license=('MIT')
+source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/h2o/$pkgname/tar.gz/v$pkgver
+ h2o.service)
+sha256sums=('eafb40aa2d93b3de1af472bb046c17b2335c3e5a894462310e1822e126c97d24'
+ '8a85462b6798deaaab343b5dae73437e251c5018d70d260a4a4440b9bbb053e6')
+backup=('etc/h2o.conf')
+provides=('h2o' 'libh2o')
+conflicts=('libh2o')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg2 'Building...'
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DWITH_BUNDLED_SSL=on \
+ -DWITH_MRUBY=on \
+ .
+ make
+ make libh2o
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg2 'Installing license...'
+ install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ msg2 'Installing documentation...'
+ install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
+
+ msg2 'Installing systemd service...'
+ install -Dm 644 "$srcdir/h2o.service" "$pkgdir/usr/lib/systemd/system/h2o.service"
+
+ msg2 'Installing conf file...'
+ install -Dm 644 examples/h2o/h2o.conf "$pkgdir/etc/h2o.conf"
+
+ msg2 'Installing...'
+ make DESTDIR="$pkgdir" install
+}
diff --git a/h2o/h2o.service b/h2o/h2o.service
new file mode 100644
index 000000000..680f6ef4e
--- /dev/null
+++ b/h2o/h2o.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=H2O - the optimized HTTP/1, HTTP/2 server
+After=network-online.target nss-lookup.target remote-fs.target
+
+[Service]
+Type=simple
+PIDFile=/run/h2o.pid
+ExecStart=/usr/bin/h2o --mode master --conf /etc/h2o.conf
+ExecReload=/usr/bin/kill -HUP $MAINPID
+ExecStop=/usr/bin/kill -TERM $MAINPID
+SyslogLevel=notice
+PrivateTmp=true
+LimitNOFILE=infinity
+
+[Install]
+WantedBy=multi-user.target