diff --git a/mod_wsgi-4.5.20-exports.patch b/mod_wsgi-4.5.20-exports.patch new file mode 100644 index 0000000000000000000000000000000000000000..97e56714ee6bd05ac6e8fe011ca25f3c2f5d9078 --- /dev/null +++ b/mod_wsgi-4.5.20-exports.patch @@ -0,0 +1,11 @@ +--- mod_wsgi-4.5.20/Makefile.in.exports ++++ mod_wsgi-4.5.20/Makefile.in +@@ -28,7 +28,7 @@ + all : src/server/mod_wsgi.la + + src/server/mod_wsgi.la : $(SRCFILES) +- $(APXS) -c $(CPPFLAGS) $(CFLAGS) $(SRCFILES) $(LDFLAGS) $(LDLIBS) ++ $(APXS) -Wl,-export-symbols-regex -Wl,wsgi_module -c $(CPPFLAGS) $(CFLAGS) $(SRCFILES) $(LDFLAGS) $(LDLIBS) + + $(DESTDIR)$(LIBEXECDIR) : + mkdir -p $@ diff --git a/mod_wsgi-4.6.4.tar.gz b/mod_wsgi-4.6.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f882d337fd4e9e8cdfbec0c6073b6673486b608c Binary files /dev/null and b/mod_wsgi-4.6.4.tar.gz differ diff --git a/mod_wsgi.spec b/mod_wsgi.spec new file mode 100644 index 0000000000000000000000000000000000000000..301cdfff7ade74ba623194620aa9b980d885e2b6 --- /dev/null +++ b/mod_wsgi.spec @@ -0,0 +1,75 @@ +%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo 0-0)}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} +%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} +%global sphinxbin %{_bindir}/sphinx-build-3 +Name: mod_wsgi +Version: 4.6.4 +Release: 1 +Summary: A WSGI interface for Python web applications in Apache +License: ASL 2.0 +URL: https://github.com/GrahamDumpleton/mod_wsgi +Source0: https://github.com/GrahamDumpleton/mod_wsgi/archive/%{version}.tar.gz#/mod_wsgi-%{version}.tar.gz +Patch1: mod_wsgi-4.5.20-exports.patch +BuildRequires: httpd-devel gcc +%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$} +%{?filter_setup} +%description +The mod_wsgi adapter is an Apache module that provides a WSGI compliant +interface for hosting Python based web applications within Apache. The +adapter is written completely in C code against the Apache C runtime and +for hosting WSGI applications within Apache has a lower overhead than using +existing WSGI adapters for mod_python or CGI. + +%package -n python3-%{name} +Summary: %summary +Requires: httpd-mmn = %{_httpd_mmn} +BuildRequires: python3-devel, python3-sphinx +Provides: mod_wsgi = %{version}-%{release} +Provides: mod_wsgi%{?_isa} = %{version}-%{release} +Obsoletes: mod_wsgi < %{version}-%{release} +%description -n python3-%{name} +The mod_wsgi adapter is an Apache module that provides a WSGI compliant +interface for hosting Python based web applications within Apache. The +adapter is written completely in C code against the Apache C runtime and +for hosting WSGI applications within Apache has a lower overhead than using +existing WSGI adapters for mod_python or CGI. + + +%prep +%setup -qn %{name}-%{version} +%patch1 -p1 -b .exports + +%build +make -C docs html SPHINXBUILD=%{sphinxbin} +export LDFLAGS="$RPM_LD_FLAGS -L%{_libdir}" +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +mkdir py3build/ +cp -R * py3build/ || : +pushd py3build +%configure --enable-shared --with-apxs=%{_httpd_apxs} --with-python=python3 +make %{?_smp_mflags} +%py3_build +popd + +%install +pushd py3build +make install DESTDIR=$RPM_BUILD_ROOT LIBEXECDIR=%{_httpd_moddir} +mv $RPM_BUILD_ROOT%{_httpd_moddir}/mod_wsgi{,_python3}.so +install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir} +%py3_install +mv $RPM_BUILD_ROOT%{_bindir}/mod_wsgi-express{,-3} +popd + +%files -n python3-%{name} +%license LICENSE +%doc CREDITS.rst README.rst +%{_httpd_moddir}/mod_wsgi_python3.so +%{python3_sitearch}/mod_wsgi-*.egg-info +%{python3_sitearch}/mod_wsgi +%{_bindir}/mod_wsgi-express-3 + +%changelog +* Thu Nov 19 2020 huanghaitao - 4.6.4-1 +- package init diff --git a/mod_wsgi.yaml b/mod_wsgi.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7a2481d3c8f6e789158430d4799f9f4809b5715d --- /dev/null +++ b/mod_wsgi.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: GrahamDumpleton/mod_wsgi +tag_prefix: "" +separator: "."