--- /dev/null
+DIST nginx-unit-1.3.tar.gz 401670 BLAKE2B 34a0ed9631c7061d1c71f8335103b0e266ef6f949afeb8cef283a7b5dd6c9f0a4835f20fdedd091af6950cd0897cb1ab48dea9f475e1b75a2872da7ac0090d10 SHA512 63a47b920bfdae7a7e034d616f520b27b46151a299cf5854373f7f8472043de0ffc98f9d62317c46e637857e0ef24668ded99be6e058315acf25b4e1c7f1ed09
--- /dev/null
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/unitd"
+pidfile="/run/nginx-unit.pid"
+
+depend() {
+ use dns logger netmount
+}
+
+start_pre() {
+ checkpath -d /var/lib/nginx-unit -o root:root 0770
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gentoo@seichter.de</email>
+ <name>Ralph Seichter</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription>
+ NGINX Unit is a dynamic web and application server, designed to run
+ applications in multiple languages. Unit is lightweight, polyglot, and
+ dynamically configured via API. The design of the server allows
+ reconfiguration of specific application parameters as needed by the
+ engineering or operations.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">nginx/unit</remote-id>
+ </upstream>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="A dynamic web and application server"
+HOMEPAGE="https://unit.nginx.org"
+SRC_URI="https://unit.nginx.org/download/unit-${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="perl python"
+REQUIRED_USE="|| ( ${IUSE} )"
+DEPEND="perl? ( dev-lang/perl:= )
+ python? ( dev-lang/python:= )"
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/unit-${PV}"
+
+src_configure() {
+ ./configure \
+ --prefix=/usr \
+ --log=/var/log/${PN} \
+ --state=/var/lib/${PN} \
+ --pid=/run/${PN}.pid \
+ --control=unix:/run/${PN}.sock || die "Core configuration failed"
+ for flag in ${IUSE} ; do
+ if use ${flag} ; then
+ ./configure ${flag} || die "Module configuration failed: ${flag}"
+ fi
+ done
+}
+
+src_install() {
+ default
+ keepdir /var/lib/${PN}
+ fperms 0770 /var/lib/${PN}
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+}