%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} %{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}} %{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} %define real_name mod_proxy_wstunnel_onapp %define _dist %{expand:%%(/usr/lib/rpm/redhat/dist.sh --dist)} Name: httpd2-mod_proxy_wstunnel_onapp Version: 0.1 Release: 1%{?_dist} Summary: Tunneling Apache proxy module for WebSockets dynamic proxying Group: System Environment/Daemons License: Apache URL: git@bitbucket.org:onappcore/mod_proxy_wstunnel_onapp.git Source: %{name}-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: httpd-devel Requires: httpd-mmn = %{_httpd_mmn} Obsoletes: httpd2-mod_proxy_wstunnel_wmks Obsoletes: httpd2-mod_proxy_wstunnel_qemu Obsoletes: httpd2-mod_proxy_wstunnel_sunlight %description Tunneling Apache proxy module for WebSockets dynamic proxying %prep %setup -c %build %{_httpd_apxs} -Wc,-Wall -c %{real_name}.c %install %{__rm} -rf %{buildroot} %{__install} -D -p -m 0755 .libs/%{real_name}.so %{buildroot}%{_httpd_moddir}/%{real_name}.so cat << EOF >proxy_wstunnel_onapp.conf LoadModule proxy_wstunnel_onapp_module modules/mod_proxy_wstunnel_onapp.so EOF %{__install} -D -p -m 644 proxy_wstunnel_onapp.conf %{buildroot}%{_httpd_confdir}/proxy_wstunnel_onapp.conf %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc %{_httpd_moddir}/%{real_name}.so %config(noreplace) %{_httpd_confdir}/proxy_wstunnel_onapp.conf %changelog * Thu Apr 6 2018 Yuriy Kohut 0.4-3.onapp - INSTALLER-341: Initial build for RHEL/CentOS 7.x