1 |
commit: e204f7e05cd1e8c7e5807ac54ad89027924a9d8a |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 10 14:27:37 2021 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 10 14:27:37 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e204f7e0 |
7 |
|
8 |
www-servers/nginx-unit: Version bump, eapi bump, fix bugs |
9 |
|
10 |
Add version 1.25.0 |
11 |
Add systemd unit file |
12 |
EAPI 8 bump |
13 |
Fix openrc init.d file |
14 |
|
15 |
Closes: https://bugs.gentoo.org/811744 |
16 |
Closes: https://bugs.gentoo.org/811747 |
17 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
18 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
19 |
|
20 |
www-servers/nginx-unit/Manifest | 1 + |
21 |
www-servers/nginx-unit/files/nginx-unit.initd | 4 +- |
22 |
www-servers/nginx-unit/files/nginx-unit.service | 13 ++++ |
23 |
www-servers/nginx-unit/nginx-unit-1.25.0.ebuild | 87 +++++++++++++++++++++++++ |
24 |
4 files changed, 103 insertions(+), 2 deletions(-) |
25 |
|
26 |
diff --git a/www-servers/nginx-unit/Manifest b/www-servers/nginx-unit/Manifest |
27 |
index 45a5a8c9ad6..3cbd0b9367b 100644 |
28 |
--- a/www-servers/nginx-unit/Manifest |
29 |
+++ b/www-servers/nginx-unit/Manifest |
30 |
@@ -1 +1,2 @@ |
31 |
DIST nginx-unit-1.22.0.tar.gz 824763 BLAKE2B 3ef343d62f3cfe793840c78fe18fd68ecad93170c87df1769636e8516df21901712d7e82caa5bafc3bf76231f32531cb7b0c1bdbe04706ee176a1e57526c50eb SHA512 7418e9dd86c10d64184f5a2f3e26c27bacc53b90ba35658fba6af00a57df89645c16c16b510d3e570eee6f8fdeef4ec7f92971f7231093e3da118e858ed386f5 |
32 |
+DIST nginx-unit-1.25.0.tar.gz 853280 BLAKE2B 7aa33e687ba754ebaaca4a0076df3f1cc05e83213de1b64cf28718bf53b9085a26a78c036f4e98308cabec0026ce2b4e91718dfb9d8d83fdad779a587e1c1d71 SHA512 fc001ab21c5aa6c07b092f7b1f44be3b88636f9e2059c8bc4049a06d863daae1bbfa2531a4a24bdd5976250d7a0e260dcf0dbb0dec63efcc008b5398c6bb4bbd |
33 |
|
34 |
diff --git a/www-servers/nginx-unit/files/nginx-unit.initd b/www-servers/nginx-unit/files/nginx-unit.initd |
35 |
index 41165a659d9..f7bd33af933 100644 |
36 |
--- a/www-servers/nginx-unit/files/nginx-unit.initd |
37 |
+++ b/www-servers/nginx-unit/files/nginx-unit.initd |
38 |
@@ -1,5 +1,5 @@ |
39 |
#!/sbin/openrc-run |
40 |
-# Copyright 1999-2019 Gentoo Authors |
41 |
+# Copyright 1999-2021 Gentoo Authors |
42 |
# Distributed under the terms of the GNU General Public License v2 |
43 |
|
44 |
command="/usr/sbin/unitd" |
45 |
@@ -10,5 +10,5 @@ depend() { |
46 |
} |
47 |
|
48 |
start_pre() { |
49 |
- checkpath -d /var/lib/nginx-unit -o root:root 0770 |
50 |
+ checkpath -d /var/lib/nginx-unit -o root:root -m 0770 |
51 |
} |
52 |
|
53 |
diff --git a/www-servers/nginx-unit/files/nginx-unit.service b/www-servers/nginx-unit/files/nginx-unit.service |
54 |
new file mode 100644 |
55 |
index 00000000000..e77bb8a38d6 |
56 |
--- /dev/null |
57 |
+++ b/www-servers/nginx-unit/files/nginx-unit.service |
58 |
@@ -0,0 +1,13 @@ |
59 |
+[Unit] |
60 |
+Description=NGINX Unit |
61 |
+Wants=network-online.target |
62 |
+After=network-online.target |
63 |
+ |
64 |
+[Service] |
65 |
+Type=forking |
66 |
+PIDFile=/run/nginx-unit.pid |
67 |
+ExecStart=/usr/sbin/unitd |
68 |
+ExecReload=/bin/kill -HUP $MAINPID |
69 |
+ |
70 |
+[Install] |
71 |
+WantedBy=multi-user.target |
72 |
|
73 |
diff --git a/www-servers/nginx-unit/nginx-unit-1.25.0.ebuild b/www-servers/nginx-unit/nginx-unit-1.25.0.ebuild |
74 |
new file mode 100644 |
75 |
index 00000000000..5a6de36e3bf |
76 |
--- /dev/null |
77 |
+++ b/www-servers/nginx-unit/nginx-unit-1.25.0.ebuild |
78 |
@@ -0,0 +1,87 @@ |
79 |
+# Copyright 1999-2021 Gentoo Authors |
80 |
+# Distributed under the terms of the GNU General Public License v2 |
81 |
+ |
82 |
+EAPI=8 |
83 |
+ |
84 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
85 |
+ |
86 |
+inherit flag-o-matic python-single-r1 systemd toolchain-funcs |
87 |
+ |
88 |
+MY_P="unit-${PV}" |
89 |
+DESCRIPTION="Dynamic web and application server" |
90 |
+HOMEPAGE="https://unit.nginx.org" |
91 |
+SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" |
92 |
+S="${WORKDIR}/${MY_P}" |
93 |
+ |
94 |
+LICENSE="Apache-2.0" |
95 |
+SLOT="0" |
96 |
+KEYWORDS="~amd64" |
97 |
+MY_USE="perl python ruby" |
98 |
+MY_USE_PHP="php7-3 php7-4" |
99 |
+IUSE="${MY_USE} ${MY_USE_PHP} ssl" |
100 |
+REQUIRED_USE="|| ( ${IUSE} ) |
101 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
102 |
+ |
103 |
+DEPEND="perl? ( dev-lang/perl:= ) |
104 |
+ php7-3? ( dev-lang/php:7.3[embed] ) |
105 |
+ php7-4? ( dev-lang/php:7.4[embed] ) |
106 |
+ python? ( ${PYTHON_DEPS} ) |
107 |
+ ruby? ( |
108 |
+ dev-lang/ruby:* |
109 |
+ dev-ruby/rubygems:* |
110 |
+ ) |
111 |
+ ssl? ( dev-libs/openssl:0= )" |
112 |
+RDEPEND="${DEPEND}" |
113 |
+ |
114 |
+pkg_setup() { |
115 |
+ use python && python-single-r1_pkg_setup |
116 |
+} |
117 |
+ |
118 |
+src_prepare() { |
119 |
+ eapply_user |
120 |
+ sed -i '/^CFLAGS/d' auto/make || die |
121 |
+} |
122 |
+ |
123 |
+src_configure() { |
124 |
+ local opt=( |
125 |
+ --control=unix:/run/${PN}.sock |
126 |
+ --log=/var/log/${PN} |
127 |
+ --modules=$(get_libdir)/${PN} |
128 |
+ --pid=/run/${PN}.pid |
129 |
+ --prefix=/usr |
130 |
+ --state=/var/lib/${PN} |
131 |
+ ) |
132 |
+ |
133 |
+ use ssl && opt+=( --openssl ) |
134 |
+ export AR="$(tc-getAR)" |
135 |
+ export CC="$(tc-getCC)" |
136 |
+ ./configure ${opt[@]} --ld-opt="${LDFLAGS}" || die "Core configuration failed" |
137 |
+ |
138 |
+ # Modules require position-independent code |
139 |
+ append-cflags $(test-flags-CC -fPIC) |
140 |
+ |
141 |
+ for flag in ${MY_USE} ; do |
142 |
+ if use ${flag} ; then |
143 |
+ ./configure ${flag} || die "Module configuration failed: ${flag}" |
144 |
+ fi |
145 |
+ done |
146 |
+ |
147 |
+ for flag in ${MY_USE_PHP} ; do |
148 |
+ if use ${flag} ; then |
149 |
+ local php_slot="/usr/$(get_libdir)/${flag/-/.}" |
150 |
+ ./configure php \ |
151 |
+ --module=${flag} \ |
152 |
+ --config=${php_slot}/bin/php-config \ |
153 |
+ --lib-path=${php_slot}/$(get_libdir) || die "Module configuration failed: ${flag}" |
154 |
+ fi |
155 |
+ done |
156 |
+} |
157 |
+ |
158 |
+src_install() { |
159 |
+ default |
160 |
+ |
161 |
+ diropts -m 0770 |
162 |
+ keepdir /var/lib/${PN} |
163 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
164 |
+ systemd_newunit "${FILESDIR}"/${PN}.service ${PN}.service |
165 |
+} |