-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-mod-srcache.spec.in
69 lines (55 loc) · 1.86 KB
/
nginx-mod-srcache.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Build against OpenSSL 3 on EL8
%if 0%{?rhel} == 8
%global openssl_pkgversion 3
%endif
# Build against OpenSSL 3 on EL8
%if 0%{?rhel} == 8
%global openssl_pkgversion 3
%endif
Summary: Transparent subrequest-based caching layout for arbitrary nginx locations
Name: nginx-mod-srcache
Version: 0.33
Release: 1%{?dist}
Vendor: Artera
URL: https://github.com/openresty/srcache-nginx-module
%define _modname srcache
%define _nginxver @NGINXVER@
%define nginx_config_dir %{_sysconfdir}/nginx
%define nginx_build_dir %{_builddir}/nginx-%{_nginxver}
%define mod_build_dir %{_builddir}/%{_modname}-%{version}
Source0: https://nginx.org/download/nginx-%{_nginxver}.tar.gz
Source1: https://github.com/openresty/srcache-nginx-module/archive/v%{version}/%{_modname}-%{version}.tar.gz
Requires: nginx = 1:%{_nginxver}
BuildRequires: nginx
BuildRequires: libtool
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: openssl%{?openssl_pkgversion}-devel
BuildRequires: pcre2-devel
BuildRequires: zlib-devel
BuildRequires: perl-devel
BuildRequires: gd-devel
BuildRequires: libxslt-devel
BuildRequires: perl-devel
BuildRequires: perl(ExtUtils::Embed)
BuildRequires: gperftools-devel
License: BSD
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
Transparent subrequest-based caching layout for arbitrary nginx locations.
%prep
%setup -q -n nginx-%{_nginxver}
%setup -T -D -b 1 -n %{_modname}-nginx-module-%{version}
%build
cd %{_builddir}/nginx-%{_nginxver}
./configure --with-compat --add-dynamic-module=../%{_modname}-nginx-module-%{version}
make modules
%install
%{__rm} -rf %{buildroot}
%{__install} -Dm755 %{nginx_build_dir}/objs/ngx_http_srcache_filter_module.so \
$RPM_BUILD_ROOT%{_libdir}/nginx/modules/ngx_http_srcache_filter_module.so
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%{_libdir}/nginx/modules/*.so