1 |
ultrabug 13/03/01 09:50:06 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: uwsgi-1.4.6-r1.ebuild |
5 |
Log: |
6 |
Introduce UWSGI_GROUP and UWSGI_EMPEROR_GROUP conf.d variables |
7 |
|
8 |
(Portage version: 2.1.11.52/cvs/Linux x86_64, signed Manifest commit with key B658FA13) |
9 |
|
10 |
Revision Changes Path |
11 |
1.40 www-servers/uwsgi/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?rev=1.40&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?rev=1.40&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/ChangeLog?r1=1.39&r2=1.40 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v |
20 |
retrieving revision 1.39 |
21 |
retrieving revision 1.40 |
22 |
diff -u -r1.39 -r1.40 |
23 |
--- ChangeLog 26 Feb 2013 08:55:22 -0000 1.39 |
24 |
+++ ChangeLog 1 Mar 2013 09:50:06 -0000 1.40 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for www-servers/uwsgi |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.39 2013/02/26 08:55:22 ultrabug Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/ChangeLog,v 1.40 2013/03/01 09:50:06 ultrabug Exp $ |
30 |
+ |
31 |
+*uwsgi-1.4.6-r1 (01 Mar 2013) |
32 |
+ |
33 |
+ 01 Mar 2013; Ultrabug <ultrabug@g.o> +uwsgi-1.4.6-r1.ebuild, |
34 |
+ +files/uwsgi.confd-r3, +files/uwsgi.initd-r3: |
35 |
+ Introduce UWSGI_GROUP and UWSGI_EMPEROR_GROUP conf.d variables |
36 |
|
37 |
*uwsgi-1.4.6 (26 Feb 2013) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 www-servers/uwsgi/uwsgi-1.4.6-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/uwsgi-1.4.6-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/uwsgi/uwsgi-1.4.6-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: uwsgi-1.4.6-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2013 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/uwsgi-1.4.6-r1.ebuild,v 1.1 2013/03/01 09:50:06 ultrabug Exp $ |
52 |
|
53 |
EAPI="5" |
54 |
PYTHON_DEPEND="python? *" |
55 |
PYTHON_MODNAME="uwsgidecorators" |
56 |
SUPPORT_PYTHON_ABIS="1" |
57 |
RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*" |
58 |
USE_RUBY="ruby18 ree18 ruby19" |
59 |
RUBY_OPTIONAL="yes" |
60 |
PHP_EXT_NAME="dummy" |
61 |
PHP_EXT_INI="no" |
62 |
USE_PHP="php5-3 php5-4" # deps must be registered separately below |
63 |
PHP_EXT_OPTIONAL_USE="php" |
64 |
|
65 |
MY_P="${P/_/-}" |
66 |
|
67 |
inherit apache-module eutils python multilib pax-utils php-ext-source-r2 ruby-ng versionator |
68 |
|
69 |
DESCRIPTION="uWSGI server for Python web applications" |
70 |
HOMEPAGE="http://projects.unbit.it/uwsgi/" |
71 |
SRC_URI="http://projects.unbit.it/downloads/${MY_P}.tar.gz" |
72 |
|
73 |
LICENSE="GPL-2" |
74 |
SLOT="0" |
75 |
KEYWORDS="~amd64 ~x86" |
76 |
IUSE="apache2 +caps +carbon cgi debug erlang gevent graylog2 json ldap lua +nagios pam perl +pcre php probepg +python rrdtool rsyslog ruby spooler sqlite syslog +xml yaml zeromq" |
77 |
REQUIRED_USE="|| ( cgi erlang lua perl php python ruby )" |
78 |
|
79 |
# util-linux is required for libuuid when requesting zeromq support |
80 |
CDEPEND="caps? ( sys-libs/libcap ) |
81 |
json? ( dev-libs/jansson ) |
82 |
erlang? ( dev-lang/erlang ) |
83 |
gevent? ( >=dev-python/gevent-1.0_beta2 ) |
84 |
graylog2? ( sys-libs/zlib ) |
85 |
ldap? ( net-nds/openldap ) |
86 |
lua? ( dev-lang/lua ) |
87 |
pcre? ( dev-libs/libpcre ) |
88 |
perl? ( dev-lang/perl ) |
89 |
php? ( |
90 |
php_targets_php5-3? ( dev-lang/php:5.3[embed] ) |
91 |
php_targets_php5-4? ( dev-lang/php:5.4[embed] ) |
92 |
) |
93 |
probepg? ( dev-db/postgresql-base:= ) |
94 |
ruby? ( $(ruby_implementations_depend) ) |
95 |
sqlite? ( dev-db/sqlite:3 ) |
96 |
rsyslog? ( app-admin/rsyslog ) |
97 |
xml? ( dev-libs/libxml2 ) |
98 |
yaml? ( dev-libs/libyaml ) |
99 |
zeromq? ( net-libs/zeromq sys-apps/util-linux )" |
100 |
DEPEND="${CDEPEND} |
101 |
virtual/pkgconfig" |
102 |
RDEPEND="${CDEPEND} |
103 |
rrdtool? ( net-analyzer/rrdtool )" |
104 |
|
105 |
S="${WORKDIR}/${MY_P}" |
106 |
APXS2_S="${S}/apache2" |
107 |
APACHE2_MOD_CONF="42_mod_uwsgi-r1 42_mod_uwsgi" |
108 |
|
109 |
want_apache2_2 |
110 |
|
111 |
use_true_false() { |
112 |
if use $1 ; then |
113 |
echo "true" |
114 |
else |
115 |
echo "false" |
116 |
fi |
117 |
} |
118 |
|
119 |
src_unpack() { |
120 |
default |
121 |
} |
122 |
|
123 |
pkg_setup() { |
124 |
depend.apache_pkg_setup |
125 |
python_pkg_setup |
126 |
} |
127 |
|
128 |
src_prepare() { |
129 |
epatch \ |
130 |
"${FILESDIR}/1.1.2-threaded-php.patch" \ |
131 |
"${FILESDIR}/1.2.3-pyerl.patch" |
132 |
|
133 |
sed -i \ |
134 |
-e "s|'-O2', ||" \ |
135 |
-e "s|'-Werror', ||" \ |
136 |
-e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ |
137 |
uwsgiconfig.py || die "sed failed" |
138 |
|
139 |
sed -i \ |
140 |
-e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \ |
141 |
plugins/python/uwsgiplugin.py || die "sed failed" |
142 |
|
143 |
sed -i \ |
144 |
-e "s|/lib|/$(get_libdir)|" \ |
145 |
plugins/php/uwsgiplugin.py || die "sed failed" |
146 |
} |
147 |
|
148 |
src_configure() { |
149 |
local plugins="" |
150 |
use carbon && plugins+=", carbon" |
151 |
use graylog2 && plugins+=", graylog2" |
152 |
use nagios && plugins+=", nagios" |
153 |
use pam && plugins+=", pam" |
154 |
use rrdtool && plugins+=", rrdtool" |
155 |
use rsyslog && plugins+=", rsyslog" |
156 |
use syslog && plugins+=", syslog" |
157 |
|
158 |
# Notes: |
159 |
# * the embedded_plugins mostly follows the list of embedded_plugins |
160 |
# in buildconf/base.ini, make sure you compare the list when bumping uWSGI |
161 |
# * thus: keep the order in embedded_plugins the same as in the base.ini |
162 |
cat > "buildconf/gentoo.ini" << EOF |
163 |
[uwsgi] |
164 |
xml = $(use_true_false xml) |
165 |
ini = true |
166 |
yaml = $(use_true_false yaml) |
167 |
json = $(use_true_false json) |
168 |
sqlite3 = $(use_true_false sqlite) |
169 |
zeromq = $(use_true_false zeromq) |
170 |
snmp = true |
171 |
sctp = false |
172 |
spooler = true |
173 |
embedded = true |
174 |
ssl = auto |
175 |
udp = true |
176 |
multicast = true |
177 |
threading = true |
178 |
sendfile = true |
179 |
minterpreters = true |
180 |
async = true |
181 |
evdis = false |
182 |
ldap = $(use_true_false ldap) |
183 |
pcre = $(use_true_false pcre) |
184 |
routing = auto |
185 |
alarm = auto |
186 |
debug = $(use_true_false debug) |
187 |
unbit = false |
188 |
xml_implementation = libxml2 |
189 |
yaml_implementation = libyaml |
190 |
malloc_implementation = libc |
191 |
plugins = |
192 |
bin_name = uwsgi |
193 |
append_version = |
194 |
plugin_dir = /usr/$(get_libdir)/uwsgi |
195 |
plugin_build_dir = ${T}/plugins |
196 |
embedded_plugins = ping, cache, rpc, corerouter, fastrouter, http, ugreen, signal, logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, redislog, mongodblog, router_rewrite, router_http, logfile, router_cache, rawrouter ${plugins} |
197 |
as_shared_library = false |
198 |
|
199 |
locking = auto |
200 |
event = auto |
201 |
timer = auto |
202 |
filemonitor = auto |
203 |
|
204 |
embed_files = |
205 |
|
206 |
embed_config = |
207 |
[python] |
208 |
paste = true |
209 |
web3 = true |
210 |
EOF |
211 |
use caps || sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
212 |
use zeromq || sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" |
213 |
|
214 |
if use probepg ; then |
215 |
PGPV="$(best_version dev-db/postgresql-base)" |
216 |
PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-base-})" |
217 |
sed -i \ |
218 |
-e "s|pg_config|pg_config${PGSLOT/.}|" \ |
219 |
plugins/probepg/uwsgiplugin.py || die "sed failed" |
220 |
fi |
221 |
} |
222 |
|
223 |
each_ruby_compile() { |
224 |
cd "${WORKDIR}/${MY_P}" |
225 |
|
226 |
UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" |
227 |
|
228 |
if [[ "${RUBY}" == *ruby19 ]] ; then |
229 |
UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo || die "building fiber plugin for ${RUBY} failed" |
230 |
fi |
231 |
} |
232 |
|
233 |
install_python_lib() { |
234 |
insinto $(python_get_sitedir) |
235 |
doins uwsgidecorators.py |
236 |
} |
237 |
|
238 |
src_compile() { |
239 |
python uwsgiconfig.py --build gentoo || die "building uwsgi failed" |
240 |
|
241 |
mkdir -p "${T}/plugins" |
242 |
|
243 |
if use erlang ; then |
244 |
python uwsgiconfig.py --plugin plugins/erlang gentoo || die "building plugin for erlang failed" |
245 |
fi |
246 |
|
247 |
if use lua ; then |
248 |
# setting LUALIB explicitly since lua is not slotted on Gentoo |
249 |
# and uwsgi otherwise looks for lua5.1 |
250 |
UWSGICONFIG_LUALIB="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" |
251 |
fi |
252 |
|
253 |
if use perl ; then |
254 |
python uwsgiconfig.py --plugin plugins/psgi gentoo || die "building plugin for perl failed" |
255 |
fi |
256 |
|
257 |
if use php ; then |
258 |
for s in $(php_get_slots); do |
259 |
UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" |
260 |
done |
261 |
fi |
262 |
|
263 |
if use python ; then |
264 |
for a in ${PYTHON_ABIS} ; do |
265 |
python${a} uwsgiconfig.py --plugin plugins/python gentoo python${a/.} || die "building plugin for python-${a} failed" |
266 |
|
267 |
if use gevent ; then |
268 |
python${a} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${a/.} || die "building plugin for gevent-support in python-${a} failed" |
269 |
fi |
270 |
if use erlang ; then |
271 |
python${a} uwsgiconfig.py --plugin plugins/pyerl gentoo pyerl${a/.} || die "building plugin for erlang-support in python failed" |
272 |
fi |
273 |
done |
274 |
fi |
275 |
|
276 |
if use ruby ; then |
277 |
ruby-ng_src_compile |
278 |
fi |
279 |
|
280 |
if use spooler ; then |
281 |
python uwsgiconfig.py --plugin plugins/spooler gentoo || die "building plugin for spooler failed" |
282 |
fi |
283 |
|
284 |
if use cgi ; then |
285 |
python uwsgiconfig.py --plugin plugins/cgi gentoo || die "building plugin for cgi failed" |
286 |
fi |
287 |
|
288 |
if use probepg ; then |
289 |
python uwsgiconfig.py --plugin plugins/probepg gentoo || die "building plugin for postgresql probe failed" |
290 |
fi |
291 |
|
292 |
if use apache2 ; then |
293 |
for m in proxy_uwsgi Ruwsgi uwsgi ; do |
294 |
APXS2_ARGS="-c mod_${m}.c" |
295 |
apache-module_src_compile |
296 |
done |
297 |
fi |
298 |
} |
299 |
|
300 |
src_install() { |
301 |
dobin uwsgi |
302 |
pax-mark m "${D}"/usr/bin/uwsgi |
303 |
|
304 |
insinto /usr/$(get_libdir)/uwsgi |
305 |
doins "${T}/plugins"/*.so |
306 |
|
307 |
use cgi && dosym uwsgi /usr/bin/uwsgi_cgi |
308 |
use erlang && dosym uwsgi /usr/bin/uwsgi_erlang |
309 |
use lua && dosym uwsgi /usr/bin/uwsgi_lua |
310 |
use perl && dosym uwsgi /usr/bin/uwsgi_psgi |
311 |
|
312 |
if use php ; then |
313 |
for s in $(php_get_slots); do |
314 |
dosym uwsgi /usr/bin/uwsgi_${s/.} |
315 |
done |
316 |
fi |
317 |
|
318 |
if use python ; then |
319 |
python_execute_function install_python_lib |
320 |
for a in ${PYTHON_ABIS} ; do |
321 |
dosym uwsgi /usr/bin/uwsgi_python${a/.} |
322 |
done |
323 |
fi |
324 |
|
325 |
if use apache2; then |
326 |
for m in proxy_uwsgi Ruwsgi uwsgi ; do |
327 |
APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" |
328 |
apache-module_src_install |
329 |
done |
330 |
fi |
331 |
|
332 |
newinitd "${FILESDIR}"/uwsgi.initd-r3 uwsgi |
333 |
newconfd "${FILESDIR}"/uwsgi.confd-r3 uwsgi |
334 |
keepdir /etc/"${PN}".d |
335 |
use spooler && keepdir /var/spool/"${PN}" |
336 |
} |
337 |
|
338 |
pkg_postinst() { |
339 |
if use apache2 ; then |
340 |
elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." |
341 |
elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." |
342 |
elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." |
343 |
elog "Therefore you can enable only one of them at a time." |
344 |
elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." |
345 |
elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." |
346 |
elog "mod_proxy_uwsgi is the newest and not considered ready for production yet." |
347 |
fi |
348 |
|
349 |
elog "Append the following options to the uwsgi call to load the respective language plugin:" |
350 |
use cgi && elog " '--plugins cgi' for cgi" |
351 |
use erlang && elog " '--plugins erlang' for erlang" |
352 |
use lua && elog " '--plugins lua' for lua" |
353 |
use perl && elog " '--plugins psgi' for perl" |
354 |
|
355 |
if use php ; then |
356 |
for s in $(php_get_slots); do |
357 |
elog " '--plugins ${s/.}' for ${s}" |
358 |
done |
359 |
fi |
360 |
|
361 |
if use python ; then |
362 |
for a in ${PYTHON_ABIS} ; do |
363 |
elog " '--plugins python${a/.}' for python-${a}" |
364 |
use gevent && elog " '--plugins python${a/.},gevent${a/.}' for gevent support in python-${a}" |
365 |
use erlang && elog " '--plugins python${a/.},erlang,pyerl${a/.}' for erlang support in python-${a}" |
366 |
done |
367 |
fi |
368 |
|
369 |
if use ruby ; then |
370 |
for ruby in $USE_RUBY; do |
371 |
use ruby_targets_${ruby} && elog " '--plugins rack_${ruby/.}' for ${ruby}" |
372 |
if [[ "${ruby}" == *ruby19 ]] ; then |
373 |
elog " '--plugins fibre' for ruby-1.9 fibres" |
374 |
fi |
375 |
done |
376 |
fi |
377 |
} |