%global _hardened_build 1 %define nginx_user nginx %define nginx_group nginx %if 0%{?rhel} || 0%{?amzn} %define _group System Environment/Daemons BuildRequires: openssl-devel %endif %define main_version 1.14.1 %define main_release 1%{?dist}.ngx %define bdir %{_builddir}/%{name}-%{main_version} Summary: nginx pam authentication module Name: nginx-mod-http-auth-pam Version: %{main_version}+1.5.2 Release: 1%{?dist}.ngx Vendor: Nginx, Inc. URL: http://nginx.org/ Group: %{_group} Source0: http://nginx.org/download/nginx-%{main_version}.tar.gz Source1: COPYRIGHT Source100: https://github.com/sto/ngx_http_auth_pam_module/archive/master.tar.gz License: 2-clause BSD-like license BuildRoot: %{_tmppath}/%{name}-%{main_version}-%{main_release}-root BuildRequires: pcre-devel BuildRequires: zlib-devel BuildRequires: pam-devel BuildRequires: libxslt-devel BuildRequires: gd-devel BuildRequires: perl-ExtUtils-Embed Requires: nginx %description HTTP Basic Authentication using PAM %if 0%{?suse_version} || 0%{?amzn} %debug_package %endif %define WITH_CC_OPT $(echo %{optflags} $(pcre-config --cflags) -Wno-error) #%%define WITH_LD_OPT -Wl,-z,relro -Wl,-z,now -Wl,-E %define WITH_LD_OPT $RPM_LD_FLAGS -Wl,-E %define BASE_CONFIGURE_ARGS $(echo "--prefix=%{_sysconfdir}/nginx --sbin-path=%{_sbindir}/nginx --modules-path=%{_libdir}/nginx/modules --conf-path=%{_sysconfdir}/nginx/nginx.conf --error-log-path=%{_localstatedir}/log/nginx/error.log --http-log-path=%{_localstatedir}/log/nginx/access.log --pid-path=%{_localstatedir}/run/nginx.pid --lock-path=%{_localstatedir}/run/nginx.lock --http-client-body-temp-path=%{_localstatedir}/cache/nginx/client_temp --http-proxy-temp-path=%{_localstatedir}/cache/nginx/proxy_temp --http-fastcgi-temp-path=%{_localstatedir}/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=%{_localstatedir}/cache/nginx/uwsgi_temp --http-scgi-temp-path=%{_localstatedir}/cache/nginx/scgi_temp --user=%{nginx_user} --group=%{nginx_group} --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-debug") %define MODULE_CONFIGURE_ARGS $(echo "--add-dynamic-module=ngx_http_auth_pam_module-master") %prep %setup -qcTn %{name}-%{main_version} tar --strip-components=1 -zxf %{SOURCE0} tar zxf %{SOURCE100} %build cd %{bdir} ./configure %{BASE_CONFIGURE_ARGS} %{MODULE_CONFIGURE_ARGS} \ --with-cc-opt="%{WITH_CC_OPT}" \ --with-ld-opt="%{WITH_LD_OPT}" make %{?_smp_mflags} modules %install cd %{bdir} %{__rm} -rf $RPM_BUILD_ROOT %{__mkdir} -p $RPM_BUILD_ROOT%{_libdir}/nginx/modules %{__install} -m755 objs/ngx_http_auth_pam_module.so \ $RPM_BUILD_ROOT%{_libdir}/nginx/modules/ %clean %{__rm} -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_libdir}/nginx/modules/* %post if [ $1 -eq 1 ]; then cat < - initial version of the package