uwsgi/uwsgi.spec

327 lines
9.8 KiB
RPMSpec

Name: uwsgi
Version: 2.0.26
Release: 1mamba
Summary: A full stack for building hosting services
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://uwsgi-docs.readthedocs.io/en/latest/
Source: https://github.com/unbit/uwsgi.git/%{version}/uwsgi-%{version}.tar.bz2
Source1: uwsgi-openmamba.ini
Source2: uwsgi.tmpfiles
Source3: uwsgi.sysusers
Source4: uwsgi_at.service
Source5: uwsgi_at.socket
Source6: uwsgi.logrotate
Source7: emperor.uwsgi.service
Source8: emperor.uwsgi.socket
Source9: emperor.ini
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: apache-mod_php
BuildRequires: glibc-devel
BuildRequires: libacl-devel
BuildRequires: libbzip2-devel
BuildRequires: libcap-devel
BuildRequires: libcurl-devel
BuildRequires: libdb53-devel
BuildRequires: libgd-devel
BuildRequires: libicu-devel
BuildRequires: libjansson-devel
BuildRequires: liblua51-devel
BuildRequires: liblzma-devel
BuildRequires: libnsl-devel
BuildRequires: libonig-devel
BuildRequires: libopenssl-devel
BuildRequires: libpam-devel
BuildRequires: libpcre2-devel
BuildRequires: libperl
BuildRequires: libpython3-devel
BuildRequires: libpython310-devel
BuildRequires: libpython311-devel
BuildRequires: libruby-devel
BuildRequires: libstdc++6-devel
BuildRequires: libsystemd-devel
BuildRequires: libuuid-devel
BuildRequires: libxcrypt-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
BuildRequires: mono-devel
## AUTOBUILDREQ-END
BuildRequires: python-greenlet-py310
%description
A full stack for building hosting services.
%package plugin-cgi
Group: System/Libraries
Summary: CGI plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-cgi
This package contains the CGI plugin for %{name}.
%package plugin-rack
Group: System/Libraries
Summary: Ruby rack plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: ruby
%description plugin-rack
This package contains the Ruby rack plugin for %{name}.
%package plugin-psgi
Group: System/Libraries
Summary: Perl psgi plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: perl
%description plugin-psgi
This package contains the Perl psgi plugin for %{name}.
%package plugin-python
Group: System/Libraries
Summary: Python plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: python3
Requires: python-greenlet-py3
%description plugin-python
This package contains the Python plugin for %{name}.
%package plugin-pypy
Group: System/Libraries
Summary: Pypy plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-pypy
This package contains the Pypy plugin for %{name}.
%package plugin-python310
Group: System/Libraries
Summary: Python 3.10 plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: python310
Requires: python-greenlet-py310
%description plugin-python310
This package contains the Python 3.10 plugin for %{name}.
%package plugin-lua
Group: System/Libraries
Summary: LUA plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: lua
%description plugin-lua
This package contains the LUA plugin for %{name}.
%package plugin-php
Group: System/Libraries
Summary: PHP plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: php
%description plugin-php
This package contains the PHP plugin for %{name}.
%package plugin-mono
Group: System/Libraries
Summary: mono plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: mono
%description plugin-mono
This package contains the mono plugin for %{name}.
%package plugin-webdav
Group: System/Libraries
Summary: WebDav plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-webdav
This package contains the WebDav plugin for %{name}.
%package plugin-zabbix
Group: System/Libraries
Summary: Zabbix plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-zabbix
This package contains the Zabbix plugin for %{name}.
%package plugin-notfound
Group: System/Libraries
Summary: notfound plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-notfound
This package contains the notfound plugin for %{name}.
%debug_package
%prep
%setup -q
#-D -T
#:<< _EOF
cp %{SOURCE1} buildconf/openmamba.ini
sed -i "s|@LIBDIR@|%{_libdir}|" buildconf/openmamba.ini
# Fix linking to libphp7.so
sed -i "s|ld_run_path = None|ld_run_path = '%{_libdir}/apache'|" plugins/php/uwsgiplugin.py
%build
#:<< _EOF
export UWSGICONFIG_PHPLIBDIR=%{_libdir}/apache/libphp7.so
%make PYTHON=%{__python3} PROFILE=openmamba
PYTHON=%{__python310} ./uwsgi --build-plugin "plugins/python python310"
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -D -m0755 uwsgi %{buildroot}%{_bindir}/uwsgi
install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/uwsgi@.service
install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/uwsgi@.socket
install -D -m0644 %{SOURCE2} %{buildroot}%{_tpmfilesdir}/uwsgi.conf
install -D -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/uwsgi
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/uwsgi.conf
install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/emperor.uwsgi.service
install -D -m0644 %{SOURCE8} %{buildroot}%{_unitdir}/emperor.uwsgi.socket
install -D -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/uwsgi/emperor.ini
# Install plugins
install -D -m0755 *_plugin.so -t %{buildroot}%{_libdir}/uwsgi/
# Python
install -D -m0644 uwsgidecorators.py %{buildroot}%{python3_sitearch}/uwsgidecorators.py
%{__python3} -m compileall %{buildroot}%{python3_sitearch}
%{__python3} -O -m compileall %{buildroot}%{python3_sitearch}
# Python 3.10
install -D -m0644 uwsgidecorators.py %{buildroot}%{python310_sitearch}/uwsgidecorators.py
%{__python310} -m compileall %{buildroot}%{python310_sitearch}
%{__python310} -O -m compileall %{buildroot}%{python310_sitearch}
# Pypy
install -D -m0644 uwsgidecorators.py %{buildroot}/opt/pypy/site-packages/uwsgidecorators.py
%{__python3} -m compileall %{buildroot}/opt/pypy/site-packages
%{__python3} -O -m compileall %{buildroot}/opt/pypy/site-packages
# Mono
install -D -m0755 plugins/mono/uwsgi.dll %{buildroot}%{_prefix}/lib/mono/2.0/uwsgi.dll
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/uwsgi
%config(noreplace) %{_sysconfdir}/uwsgi/emperor.ini
%{_sysconfdir}/logrotate.d/uwsgi
%{_bindir}/uwsgi
%{_unitdir}/uwsgi@.service
%{_unitdir}/uwsgi@.socket
%{_unitdir}/emperor.uwsgi.service
%{_unitdir}/emperor.uwsgi.socket
%{_sysusersdir}/uwsgi.conf
%doc LICENSE
%files plugin-cgi
%defattr(-,root,root)
%{_libdir}/uwsgi/cgi_plugin.so
%files plugin-rack
%defattr(-,root,root)
%{_libdir}/uwsgi/rack_plugin.so
%{_libdir}/uwsgi/fiber_plugin.so
%{_libdir}/uwsgi/rbthreads_plugin.so
%files plugin-psgi
%defattr(-,root,root)
%{_libdir}/uwsgi/psgi_plugin.so
%files plugin-python
%defattr(-,root,root)
%{_libdir}/uwsgi/asyncio_plugin.so
%{_libdir}/uwsgi/gevent_plugin.so
%{_libdir}/uwsgi/greenlet_plugin.so
%{_libdir}/uwsgi/python_plugin.so
%{python3_sitearch}/uwsgidecorators.py
%{python3_sitearch}/__pycache__/uwsgidecorators.cpython*pyc
%files plugin-pypy
%defattr(-,root,root)
%{_libdir}/uwsgi/pypy_plugin.so
/opt/pypy/site-packages/uwsgidecorators.py
/opt/pypy/site-packages/__pycache__/uwsgidecorators.cpython*pyc
%files plugin-python310
%defattr(-,root,root)
%{_libdir}/uwsgi/asyncio_plugin.so
%{_libdir}/uwsgi/gevent_plugin.so
%{_libdir}/uwsgi/greenlet_plugin.so
%{_libdir}/uwsgi/python310_plugin.so
%{python310_sitearch}/uwsgidecorators.py
%{python310_sitearch}/__pycache__/uwsgidecorators.cpython*pyc
%files plugin-lua
%defattr(-,root,root)
%{_libdir}/uwsgi/lua_plugin.so
%files plugin-php
%defattr(-,root,root)
%{_libdir}/uwsgi/php_plugin.so
%files plugin-mono
%defattr(-,root,root)
%{_libdir}/uwsgi/mono_plugin.so
%{_prefix}/lib/mono/2.0/uwsgi.dll
%files plugin-webdav
%defattr(-,root,root)
%{_libdir}/uwsgi/webdav_plugin.so
%files plugin-zabbix
%defattr(-,root,root)
%{_libdir}/uwsgi/zabbix_plugin.so
%files plugin-notfound
%defattr(-,root,root)
%{_libdir}/uwsgi/notfound_plugin.so
%changelog
* Sun Jun 02 2024 Automatic Build System <autodist@openmamba.org> 2.0.26-1mamba
- automatic version update by autodist
* Wed Apr 17 2024 Automatic Build System <autodist@openmamba.org> 2.0.25.1-1mamba
- automatic version update by autodist
* Sun Apr 14 2024 Automatic Build System <autodist@openmamba.org> 2.0.25-1mamba
- automatic version update by autodist
* Sat Feb 10 2024 Automatic Build System <autodist@openmamba.org> 2.0.24-1mamba
- automatic version update by autodist
* Wed Nov 01 2023 Automatic Build System <autodist@mambasoft.it> 2.0.23-1mamba
- automatic version update by autodist
* Wed Oct 11 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.22-2mamba
- build default python plugin for python3 == 3.11 and add plugin for python 3.10
* Sat Jul 29 2023 Automatic Build System <autodist@mambasoft.it> 2.0.22-1mamba
- automatic version update by autodist
* Tue May 16 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.21-2mamba
- rebuilt with python 3.10
* Tue Oct 25 2022 Automatic Build System <autodist@mambasoft.it> 2.0.21-1mamba
- automatic version update by autodist
* Sun Oct 10 2021 Automatic Build System <autodist@mambasoft.it> 2.0.20-1mamba
- automatic version update by autodist
* Sat Sep 18 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.19.1-1mamba
- package created using the webbuild interface