-
Notifications
You must be signed in to change notification settings - Fork 1
/
lua-resty-aws-auth.spec
83 lines (59 loc) · 1.89 KB
/
lua-resty-aws-auth.spec
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
%{!?luaver: %global luaver %(lua -e "print(string.sub(_VERSION, 5))" || echo 0)}
%global luapkgdir %{_datadir}/lua/%{luaver}
%global lualibdir %{_libdir}/lua/%{luaver}
# OpenResty is compatible with 5.1 only! We must build 5.1 version always, even on <= EL8
%global luacompatver 5.1
%global luacompatpkgdir %{_datadir}/lua/%{luacompatver}
%global luacompatlibdir %{_datadir}/lua/%{luacompatver}
%global luapkgname resty-aws-auth
%global gittag v%{version}-0
%global gittag_nov %{version}-0
Name: lua-%{luapkgname}
Version: 0.12
Release: 4%{?dist}
Summary: Lua resty module to calculate AWS signature v4 authorization header
Group: Development/Libraries
License: BSD
URL: https://github.com/paragasu/lua-resty-aws-auth
Source0: %{url}/archive/%{gittag}/%{name}-%{gittag}.tar.gz
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: lua(abi) = %{luaver}
%else
Requires: lua >= %{luaver}
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: compat-lua >= %{luacompatver}, compat-lua-devel >= %{luacompatver}
Requires: lua(abi) = %{luacompatver}
%endif
BuildArch: noarch
%description
%{summary}.
%if 0%{?fedora} || 0%{?rhel} > 7
%package -n lua%{luacompatver}-%{luapkgname}
Summary: Lua resty module to calculate AWS signature v4 authorization header for Lua %{luacompatver}
%description -n lua%{luacompatver}-%{luapkgname}
%{summary}.
%endif
%prep
%autosetup -n %{name}-%{gittag_nov}
%build
# nothing to do
%install
mkdir -p $RPM_BUILD_ROOT%{luapkgdir}
cp -pr lib/* $RPM_BUILD_ROOT%{luapkgdir}
%if 0%{?fedora} || 0%{?rhel} > 7
mkdir -p $RPM_BUILD_ROOT%{luacompatpkgdir}
cp -pr lib/* $RPM_BUILD_ROOT%{luacompatpkgdir}
%endif
%check
# nothing to do
%files
%{luapkgdir}/*
%doc README.md
%if 0%{?fedora} || 0%{?rhel} > 7
%files -n lua%{luacompatver}-%{luapkgname}
%{luacompatpkgdir}/*
%doc README.md
%endif
%changelog
# not maintained