commit: 45c246558a1abfd8c5fdb2b51d00b33faf1a0d81 Author: Ralph Seichter <github <AT> seichter <DOT> de> AuthorDate: Mon Jul 16 10:57:14 2018 +0000 Commit: Tony Vroon <chainsaw <AT> gentoo <DOT> org> CommitDate: Tue Jul 17 17:14:24 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45c24655
www-servers/nginx-unit: New package, by Ralph Seichter. 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. (Source: http://unit.nginx.org/) Bug: https://bugs.gentoo.org/661074 Package-Manager: Portage-2.3.40, Repoman-2.3.9 Closes: https://github.com/gentoo/gentoo/pull/9249 Closes: https://bugs.gentoo.org/661074 www-servers/nginx-unit/Manifest | 1 + www-servers/nginx-unit/files/nginx-unit.initd | 14 ++++++++++ www-servers/nginx-unit/metadata.xml | 22 +++++++++++++++ www-servers/nginx-unit/nginx-unit-1.3.ebuild | 39 +++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) diff --git a/www-servers/nginx-unit/Manifest b/www-servers/nginx-unit/Manifest new file mode 100644 index 00000000000..9faa8c2bda7 --- /dev/null +++ b/www-servers/nginx-unit/Manifest @@ -0,0 +1 @@ +DIST nginx-unit-1.3.tar.gz 401670 BLAKE2B 34a0ed9631c7061d1c71f8335103b0e266ef6f949afeb8cef283a7b5dd6c9f0a4835f20fdedd091af6950cd0897cb1ab48dea9f475e1b75a2872da7ac0090d10 SHA512 63a47b920bfdae7a7e034d616f520b27b46151a299cf5854373f7f8472043de0ffc98f9d62317c46e637857e0ef24668ded99be6e058315acf25b4e1c7f1ed09 diff --git a/www-servers/nginx-unit/files/nginx-unit.initd b/www-servers/nginx-unit/files/nginx-unit.initd new file mode 100755 index 00000000000..23720abcc1e --- /dev/null +++ b/www-servers/nginx-unit/files/nginx-unit.initd @@ -0,0 +1,14 @@ +#!/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 +} diff --git a/www-servers/nginx-unit/metadata.xml b/www-servers/nginx-unit/metadata.xml new file mode 100644 index 00000000000..7660440b3f5 --- /dev/null +++ b/www-servers/nginx-unit/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + <name>Ralph Seichter</name> + </maintainer> + <maintainer type="project"> + <email>[email protected]</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> diff --git a/www-servers/nginx-unit/nginx-unit-1.3.ebuild b/www-servers/nginx-unit/nginx-unit-1.3.ebuild new file mode 100644 index 00000000000..da3e472ba88 --- /dev/null +++ b/www-servers/nginx-unit/nginx-unit-1.3.ebuild @@ -0,0 +1,39 @@ +# 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} +}
