2024-01-05 20:29:19 +01:00
|
|
|
Name: apache-mod_wsgi
|
2024-01-05 20:29:19 +01:00
|
|
|
Version: 4.6.4
|
|
|
|
Release: 1mamba
|
2024-01-05 20:29:19 +01:00
|
|
|
Summary: an Apache module that implements a WSGI compliant interface for hosting Python based web applications
|
|
|
|
Group: System/Libraries
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: https://pypi.python.org/pypi/mod_wsgi
|
|
|
|
Source: https://pypi.python.org/packages/source/m/mod_wsgi/mod_wsgi-%{version}.tar.gz
|
2024-01-05 20:29:19 +01:00
|
|
|
Source1: wsgi-tmpfile.conf
|
|
|
|
Source2: wsgi-apache.conf
|
2024-01-05 20:29:19 +01:00
|
|
|
License: Apache License 2.0
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
|
|
|
BuildRequires: libpython3-devel
|
|
|
|
## AUTOBUILDREQ-END
|
|
|
|
BuildRequires: libpython-devel
|
|
|
|
BuildRequires: apache >= 2.4
|
|
|
|
Requires: apache >= 2.4
|
|
|
|
Requires: python >= %python_version
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
The mod_wsgi package provides an Apache module that implements a WSGI compliant interface for hosting Python based web applications on top of the Apache web server.
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
%if 0%{?with_pyver}
|
|
|
|
%pyver_package
|
|
|
|
%endif
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n mod_wsgi-%{version}
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
%build
|
2024-01-05 20:29:19 +01:00
|
|
|
CFLAGS="%{optflags}" %{__python} setup.py build
|
2024-01-05 20:29:19 +01:00
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
%configure\
|
|
|
|
--with-python=%{__python}
|
2024-01-05 20:29:19 +01:00
|
|
|
|
|
|
|
%make
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
2024-01-05 20:29:19 +01:00
|
|
|
%{__python} setup.py install \
|
2024-01-05 20:29:19 +01:00
|
|
|
-O1 --skip-build \
|
|
|
|
--root="%{buildroot}" \
|
|
|
|
--install-headers=%{_includedir}/python \
|
2024-01-05 20:29:19 +01:00
|
|
|
--install-lib=%{python_sitearch} \
|
2024-01-05 20:29:19 +01:00
|
|
|
--record=%{name}.filelist
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
sed -i "s,.*/man/.*,&.gz," %{name}.filelist
|
2024-01-05 20:29:19 +01:00
|
|
|
|
|
|
|
%makeinstall
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/wsgi%{?pyappend:-%pyappend}.conf
|
|
|
|
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/httpd.d/wsgi%{?pyappend:-%pyappend}.conf
|
2024-01-05 20:29:19 +01:00
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
%if 0%{?with_pyver}
|
|
|
|
mv %{buildroot}%{_libdir}/apache/mod_wsgi.so %{buildroot}%{_libdir}/apache/mod_wsgi%{?pyappend:-%pyappend}.so
|
|
|
|
mv %{buildroot}%{_bindir}/mod_wsgi-express %{buildroot}%{_bindir}/mod_wsgi-express%{?pyappend:-%pyappend}
|
|
|
|
sed -i "s|%{_bindir}/mod_wsgi-express|%{_bindir}/mod_wsgi-express%{?pyappend:-%pyappend}|" %{name}.filelist
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%post %{?pyappend}
|
2024-01-05 20:29:19 +01:00
|
|
|
if [ $1 -ge 1 ]; then
|
2024-01-05 20:29:19 +01:00
|
|
|
# WORKAROUND: using tmpfiles_create macro unsets %pyappend variable for yet unknown reasons
|
|
|
|
#% tmpfiles_create wsgi%{?pyappend:-%pyappend}.conf
|
|
|
|
systemd-tmpfiles --create wsgi%{?pyappend:-%pyappend}.conf >/dev/null 2>&1 || :
|
2024-01-05 20:29:19 +01:00
|
|
|
systemctl -q daemon-reload
|
2024-01-05 20:29:19 +01:00
|
|
|
%{_bindir}/apxs -e -a -n wsgi%{?pyappend} %{_libdir}/apache/mod_wsgi%{?pyappend:-%pyappend}.so > /dev/null
|
2024-01-05 20:29:19 +01:00
|
|
|
fi
|
|
|
|
:
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
%preun %{?pyappend}
|
2024-01-05 20:29:19 +01:00
|
|
|
if [ $1 -eq 0 ]; then
|
2024-01-05 20:29:19 +01:00
|
|
|
systemctl -q daemon-reload
|
2024-01-05 20:29:19 +01:00
|
|
|
%{_bindir}/apxs -e -A -n wsgi%{?pyappend} %{_libdir}/apache/mod_wsgi%{?pyappend:-%pyappend}.so > /dev/null
|
2024-01-05 20:29:19 +01:00
|
|
|
fi
|
|
|
|
:
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
%files %{?pyappend} -f %{name}.filelist
|
2024-01-05 20:29:19 +01:00
|
|
|
%defattr(-,root,root)
|
2024-01-05 20:29:19 +01:00
|
|
|
%{_sysconfdir}/httpd/httpd.d/wsgi%{?pyappend:-%pyappend}.conf
|
|
|
|
%{_libdir}/apache/mod_wsgi%{?pyappend:-%pyappend}.so
|
|
|
|
%{_tmpfilesdir}/wsgi%{?pyappend:-%pyappend}.conf
|
2024-01-05 20:29:19 +01:00
|
|
|
%doc LICENSE
|
|
|
|
|
|
|
|
%changelog
|
2024-01-05 20:29:19 +01:00
|
|
|
* Thu Sep 06 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 4.6.4-1mamba
|
|
|
|
- update to 4.6.4
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
* Mon Aug 24 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.12-2mamba
|
|
|
|
- install tmpfiles and apache configurations for /run/wsgi as default socket dir
|
|
|
|
|
2024-01-05 20:29:19 +01:00
|
|
|
* Sat Jun 13 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.12-1mamba
|
|
|
|
- package created using the webbuild interface
|