Last active
January 19, 2018 16:28
-
-
Save arreyder/7270429c5b7e51e5787b7e4fc654b2b6 to your computer and use it in GitHub Desktop.
Nginx Access Fabric Module Spec file patch for AWS Linux rpm build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /tmp/nginx.spec 2018-01-19 15:19:20.654132824 +0000 | |
+++ nginx.spec 2018-01-19 15:58:02.496368245 +0000 | |
@@ -30,6 +30,7 @@ | |
URL: http://nginx.org/ | |
Source0: https://nginx.org/download/nginx-%{version}.tar.gz | |
+Source1: https://github.com/ScaleFT/nginx_auth_accessfabric/archive/v1.0.0.tar.gz | |
Source10: nginx.service | |
Source11: nginx.logrotate | |
Source12: nginx.conf | |
@@ -107,6 +108,8 @@ | |
Requires: nginx-mod-http-xslt-filter%{?_isa} = %{epoch}:%{version}-%{release} | |
Requires: nginx-mod-mail%{?_isa} = %{epoch}:%{version}-%{release} | |
Requires: nginx-mod-stream%{?_isa} = %{epoch}:%{version}-%{release} | |
+Requires: nginx-mod-http-auth-accessfabric%{?_isa}= %{epoch}:%{version}-%{release} | |
+ | |
%description all-modules | |
%{summary}. | |
@@ -195,12 +198,21 @@ | |
%description mod-stream | |
%{summary}. | |
+%package mod-http-auth-accessfabric | |
+Group: System Environment/Daemons | |
+Summary: ScaleFT Accessfabric Auth module | |
+Requires: nginx | |
+BuildRequires: libxjwt-devel | |
+ | |
+%description mod-http-auth-accessfabric | |
+%{summary}. | |
%prep | |
%setup -q | |
%patch0 -p0 | |
-cp %{SOURCE200} %{SOURCE210} %{SOURCE10} %{SOURCE12} . | |
+cp %{SOURCE200} %{SOURCE210} %{SOURCE10} %{SOURCE12} ${SOURCE1} . | |
+tar xvf $RPM_SOURCE_DIR/v1.0.0.tar.gz -C $RPM_BUILD_DIR/ | |
%if (0%{?rhel} && 0%{?rhel} < 8) | |
sed -i -e 's#KillMode=.*#KillMode=process#g' %{SOURCE10} | |
sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' %{SOURCE12} | |
@@ -269,6 +281,7 @@ | |
%endif | |
--with-debug \ | |
--with-cc-opt="%{optflags} $(pcre-config --cflags)" \ | |
+ --add-dynamic-module="$RPM_BUILD_DIR/nginx_auth_accessfabric-1.0.0" \ | |
--with-ld-opt="$RPM_LD_FLAGS -Wl,-E" # so the perl module finds its symbols | |
make %{?_smp_mflags} | |
@@ -350,6 +363,8 @@ | |
> %{buildroot}%{_datadir}/nginx/modules/mod-mail.conf | |
echo 'load_module "%{_libdir}/nginx/modules/ngx_stream_module.so";' \ | |
> %{buildroot}%{_datadir}/nginx/modules/mod-stream.conf | |
+echo 'load_module "%{_libdir}/nginx/modules/ngx_http_auth_accessfabric_module.so";' \ | |
+ > %{buildroot}%{_datadir}/nginx/modules/mod-http-auth-accessfabric.conf | |
%if %{with filesystem} | |
%pre filesystem | |
@@ -425,6 +440,11 @@ | |
%endif | |
fi | |
+%post mod-http-auth-accessfabric | |
+if [ $1 -eq 1 ]; then | |
+ /usr/bin/systemctl reload nginx.service >/dev/null 2>&1 || : | |
+fi | |
+ | |
%preun | |
%if %{with systemd} | |
%systemd_preun nginx.service | |
@@ -533,6 +553,11 @@ | |
%{_datadir}/nginx/modules/mod-stream.conf | |
%{_libdir}/nginx/modules/ngx_stream_module.so | |
+%files mod-http-auth-accessfabric | |
+%{_datadir}/nginx/modules/mod-http-auth-accessfabric.conf | |
+%{_libdir}/nginx/modules/ngx_http_auth_accessfabric_module.so | |
+ | |
+ | |
%changelog | |
* Wed Sep 6 2017 Matt Dees <[email protected]> | |
~ | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment