apache-mod_wsgi/apache-mod_wsgi.spec

135 lines
4.5 KiB
RPMSpec
Raw Permalink Normal View History

Name: apache-mod_wsgi
Version: 5.0.1
Release: 1mamba
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.org/project/mod-wsgi/
Source: https://pypi.debian.net/mod-wsgi/mod_wsgi-%{version}.tar.gz
Source1: wsgi-tmpfile.conf
Source2: wsgi-apache.conf
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libpython3-devel
BuildRequires: libpython311-devel
## AUTOBUILDREQ-END
BuildRequires: python3-devel >= 3.11.5-3mamba
BuildRequires: libpython3-devel >= 3.7.4
BuildRequires: apache >= 2.4
%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.
%if 0%{?with_pyver}
%define py_requires_append \
Requires: apache >= 2.4
%pyver_package
%endif
%prep
%setup -q -n mod_wsgi-%{version}
%build
CFLAGS="%{optflags}" %{__python} setup.py build
%configure\
--with-python=%{__python}
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} setup.py install \
-O1 --skip-build \
--root="%{buildroot}" \
--install-headers=%{_includedir}/python \
--install-lib=%{python_sitearch} \
--record=%{name}.filelist
sed -i "s,.*/man/.*,&.gz," %{name}.filelist
%makeinstall
install -D -m0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/wsgi.conf
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/httpd.d/wsgi.conf
#%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}
if [ $1 -ge 1 ]; then
# WORKAROUND: using tmpfiles_create macro unsets %pyappend variable for yet unknown reasons
#% tmpfiles_create wsgi.conf
systemd-tmpfiles --create wsgi.conf >/dev/null 2>&1 || :
systemctl -q daemon-reload
%{_bindir}/apxs -e -a -n wsgi %{_libdir}/apache/mod_wsgi.so > /dev/null
fi
:
%preun %{?pyappend}
if [ $1 -eq 0 ]; then
systemctl -q daemon-reload
%{_bindir}/apxs -e -A -n wsgi %{_libdir}/apache/mod_wsgi.so > /dev/null
fi
:
%files %{?pyappend} -f %{name}.filelist
%defattr(-,root,root)
%{_sysconfdir}/httpd/httpd.d/wsgi.conf
%{_libdir}/apache/mod_wsgi.so
%{_tmpfilesdir}/wsgi.conf
%doc LICENSE
%changelog
* Wed Oct 02 2024 Automatic Build System <autodist@openmamba.org> 5.0.1-1mamba
- automatic version update by autodist
* Fri Dec 15 2023 Automatic Build System <autodist@mambasoft.it> 5.0.0-1mamba
- automatic version update by autodist
* Tue Sep 26 2023 Automatic Build System <autodist@mambasoft.it> 4.9.4-3mamba
- rebuilt by autoport with build requirements: python3-devel>=3.11.5-3mamba
* Mon Apr 24 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4.9.4-2mamba
- rebuilt with python 3.10
* Thu Sep 15 2022 Automatic Build System <autodist@mambasoft.it> 4.9.4-1mamba
- automatic version update by autodist
* Mon Jul 25 2022 Automatic Build System <autodist@mambasoft.it> 4.9.3-1mamba
- automatic version update by autodist
* Sun Jun 05 2022 Automatic Build System <autodist@mambasoft.it> 4.9.2-1mamba
- automatic version update by autodist
* Tue May 03 2022 Automatic Build System <autodist@mambasoft.it> 4.9.1-1mamba
- automatic version update by autodist
* Fri Aug 06 2021 Automatic Build System <autodist@mambasoft.it> 4.9.0-1mamba
- automatic version update by autodist
* Tue Jun 01 2021 Automatic Build System <autodist@mambasoft.it> 4.8.0-1mamba
- automatic version update by autodist
* Sun Aug 11 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.6.7-2mamba
- restore this lost change: disable multiple python version cohexistence because it is not possible with apache
* Thu Aug 08 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 4.6.7-1mamba
- update to 4.6.7
* Thu Sep 06 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 4.6.4-1mamba
- update to 4.6.4
* 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
* Sat Jun 13 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.12-1mamba
- package created using the webbuild interface