diff options
author | Amy Fong <amy.fong@windriver.com> | 2014-04-08 11:50:02 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-04-10 14:38:55 -0400 |
commit | d3fa3dfc30ecf000aefd23619208fdc992780670 (patch) | |
tree | 08e9a21ca4e38c0aaf137859bc0287564b9e6cca /meta-openstack/recipes-support/mod-wsgi | |
parent | a40bba49410de349ce9a408554c5edb229abcd53 (diff) | |
download | meta-cloud-services-d3fa3dfc30ecf000aefd23619208fdc992780670.tar.gz |
Package mod_wsgi
openstack-dashboard uses mod_wsgi to interface with apache
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-support/mod-wsgi')
-rw-r--r-- | meta-openstack/recipes-support/mod-wsgi/files/configure_var.patch | 100 | ||||
-rw-r--r-- | meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb | 57 |
2 files changed, 157 insertions, 0 deletions
diff --git a/meta-openstack/recipes-support/mod-wsgi/files/configure_var.patch b/meta-openstack/recipes-support/mod-wsgi/files/configure_var.patch new file mode 100644 index 0000000..0f2c883 --- /dev/null +++ b/meta-openstack/recipes-support/mod-wsgi/files/configure_var.patch | |||
@@ -0,0 +1,100 @@ | |||
1 | --- | ||
2 | configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ | ||
3 | 1 file changed, 39 insertions(+) | ||
4 | |||
5 | --- a/configure.ac | ||
6 | +++ b/configure.ac | ||
7 | @@ -73,18 +73,28 @@ | ||
8 | |||
9 | AC_SUBST(PYTHON) | ||
10 | |||
11 | +if test -z "${PYTHON_VERSION}"; then | ||
12 | PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \ | ||
13 | from distutils import sysconfig; \ | ||
14 | stdout.write((sysconfig.get_config_var("VERSION")))'` | ||
15 | +fi | ||
16 | |||
17 | +if test -z "${PYTHON_INCLUDEPY}"; then | ||
18 | CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \ | ||
19 | from distutils import sysconfig; \ | ||
20 | stdout.write("-I" + sysconfig.get_config_var("INCLUDEPY"))'` | ||
21 | +else | ||
22 | +CPPFLAGS1="${PYTHON_INCLUDEPY}" | ||
23 | +fi | ||
24 | |||
25 | +if test -z "${PYTHON_CFLAGS}"; then | ||
26 | CPPFLAGS2=`${PYTHON} -c 'from sys import stdout; \ | ||
27 | from distutils import sysconfig; \ | ||
28 | stdout.write(" ".join(filter(lambda x: x.startswith("-D"), \ | ||
29 | sysconfig.get_config_var("CFLAGS").split())))'` | ||
30 | +else | ||
31 | +CPPFLAGS2="${PYTHON_CFLAGS}" | ||
32 | +fi | ||
33 | |||
34 | if test "${ENABLE_EMBEDDED}" != "yes"; then | ||
35 | CPPFLAGS3="-DMOD_WSGI_DISABLE_EMBEDDED" | ||
36 | @@ -96,22 +106,43 @@ | ||
37 | |||
38 | AC_SUBST(CPPFLAGS) | ||
39 | |||
40 | +if test -z "${PYTHON_LIBDIR}"; then | ||
41 | PYTHONLIBDIR=`${PYTHON} -c 'from sys import stdout; \ | ||
42 | from distutils import sysconfig; \ | ||
43 | stdout.write(sysconfig.get_config_var("LIBDIR"))'` | ||
44 | +else | ||
45 | +PYTHONLIBDIR="${PYTHON_LIBDIR}" | ||
46 | +fi | ||
47 | +if test -z "${PYTHON_CFGDIR}"; then | ||
48 | PYTHONCFGDIR=`${PYTHON} -c 'from sys import stdout; \ | ||
49 | import distutils.sysconfig; \ | ||
50 | stdout.write(distutils.sysconfig.get_python_lib(plat_specific=1, \ | ||
51 | standard_lib=1) +"/config")'` | ||
52 | +else | ||
53 | +PYTHONCFGDIR="${PYTHON_CFGDIR}" | ||
54 | +fi | ||
55 | +if test -z "${PYTHON_FRAMEWORKDIR}"; then | ||
56 | PYTHONFRAMEWORKDIR=`${PYTHON} -c 'from sys import stdout; \ | ||
57 | from distutils import sysconfig; \ | ||
58 | stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORKDIR"))'` | ||
59 | +else | ||
60 | +PYTHONFRAMEWORKDIR="${PYTHON_FRAMEWORKDIR}" | ||
61 | +fi | ||
62 | + | ||
63 | +if test -z "${PYTHON_FRAMEWORKPREFIX}"; then | ||
64 | PYTHONFRAMEWORKPREFIX=`${PYTHON} -c 'from sys import stdout; \ | ||
65 | from distutils import sysconfig; \ | ||
66 | stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORKPREFIX"))'` | ||
67 | +else | ||
68 | +PYTHONFRAMEWORKPREFIX="${PYTHON_FRAMEWORKPREFIX}" | ||
69 | +fi | ||
70 | +if test -z "${PYTHON_FRAMEWORK}"; then | ||
71 | PYTHONFRAMEWORK=`${PYTHON} -c 'from sys import stdout; \ | ||
72 | from distutils import sysconfig; \ | ||
73 | stdout.write(sysconfig.get_config_var("PYTHONFRAMEWORK"))'` | ||
74 | +else | ||
75 | +PYTHONFRAMEWORK="${PYTHON_FRAMEWORK}" | ||
76 | +fi | ||
77 | |||
78 | if test "${PYTHONFRAMEWORKDIR}" = "no-framework" -o \ | ||
79 | "${ENABLE_FRAMEWORK}" != "yes"; then | ||
80 | @@ -119,12 +150,20 @@ | ||
81 | LDFLAGS2="-L${PYTHONCFGDIR}" | ||
82 | |||
83 | LDLIBS1="-lpython${PYTHON_VERSION}" | ||
84 | + if test -z "${PYTHON_LIBS}"; then | ||
85 | LDLIBS2=`${PYTHON} -c 'from sys import stdout; \ | ||
86 | from distutils import sysconfig; \ | ||
87 | stdout.write(sysconfig.get_config_var("LIBS"))'` | ||
88 | + else | ||
89 | + LDLIBS3="${PYTHON_LIBS}" | ||
90 | + fi | ||
91 | + if test -z "${PYTHON_SYSLIBS}"; then | ||
92 | LDLIBS3=`${PYTHON} -c 'from sys import stdout; \ | ||
93 | from distutils import sysconfig; \ | ||
94 | stdout.write(sysconfig.get_config_var("SYSLIBS"))'` | ||
95 | + else | ||
96 | + LDLIBS3="${PYTHON_SYSLIBS}" | ||
97 | + fi | ||
98 | else | ||
99 | LDFLAGS1="-Wl,-F${PYTHONFRAMEWORKPREFIX} -framework ${PYTHONFRAMEWORK}" | ||
100 | |||
diff --git a/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb b/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb new file mode 100644 index 0000000..af0dd3d --- /dev/null +++ b/meta-openstack/recipes-support/mod-wsgi/mod-wsgi_3.4.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | SUMMARY = "Supports the Python WSGI interface" | ||
2 | DESCRIPTION = "\ | ||
3 | The aim of mod_wsgi is to implement a simple to use Apache module which can host \ | ||
4 | any Python application which supports the Python WSGI interface. The module would \ | ||
5 | be suitable for use in hosting high performance production web sites, as well as \ | ||
6 | your average self managed personal sites running on web hosting services." | ||
7 | |||
8 | HOMEPAGE = "http://code.google.com/p/modwsgi/" | ||
9 | LICENSE = "Apache-2.0" | ||
10 | LIC_FILES_CHKSUM = "file://LICENCE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
11 | |||
12 | SRCNAME = "mod_wsgi" | ||
13 | SRC_URI = "\ | ||
14 | http://modwsgi.googlecode.com/files/${SRCNAME}-${PV}.tar.gz \ | ||
15 | file://configure_var.patch \ | ||
16 | " | ||
17 | |||
18 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
19 | |||
20 | SRC_URI[md5sum] = "f42d69190ea0c337ef259cbe8d94d985" | ||
21 | SRC_URI[sha256sum] = "ae85c98e9e146840ab3c3e4490e6774f9bef0f99b9f679fca786b2adb5b4b6e8" | ||
22 | |||
23 | inherit autotools distutils-base | ||
24 | |||
25 | DEPENDS += "apache2-native apache2 python-native" | ||
26 | RDEPENDS = "python" | ||
27 | |||
28 | EXTRA_OECONF = "\ | ||
29 | --with-apxs=${STAGING_BINDIR_CROSS}/apxs \ | ||
30 | --disable-framework \ | ||
31 | PYTHON_VERSION=${PYTHON_BASEVERSION} \ | ||
32 | PYTHON_INCLUDEPY=-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ | ||
33 | PYTHON_CFLAGS='-DNDEBUG' \ | ||
34 | PYTHON_LIBDIR=${STAGING_LIBDIR} \ | ||
35 | PYTHON_CFGDIR=${STAGING_LIBDIR}/python${PYTHON_BASEVERSION}/config \ | ||
36 | PYTHON_FRAMEWORKDIR='no-framework' \ | ||
37 | PYTHON_FRAMEWORKPREFIX=' ' \ | ||
38 | PYTHON_FRAMEWORK=' ' \ | ||
39 | PYTHON_LIBS='-lpthread -ldl -lpthread -lutil' \ | ||
40 | PYTHON_SYSLIBS='-lm' \ | ||
41 | " | ||
42 | |||
43 | CFLAGS += " -I${STAGING_INCDIR}/apache2" | ||
44 | |||
45 | FILES_${PN} += "/etc/apache2/" | ||
46 | FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug" | ||
47 | |||
48 | do_install_append() { | ||
49 | mkdir -p ${D}/etc/apache2/modules.d/ | ||
50 | echo "LoadModule wsgi_module ${libdir}/apache2/modules/mod_wsgi.so" > \ | ||
51 | ${D}/etc/apache2/modules.d/wsgi.load | ||
52 | } | ||
53 | |||
54 | # to load: | ||
55 | # LoadModule wsgi_module modules/mod_wsgi.so | ||
56 | |||
57 | # Apache/2.2.2 (Unix) mod_wsgi/1.0 Python/2.3 configured | ||