-
Notifications
You must be signed in to change notification settings - Fork 1
/
lua-resty-hmac.spec
86 lines (61 loc) · 1.93 KB
/
lua-resty-hmac.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
84
85
86
%{!?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-hmac
%global gittag 0.06-1
%global gittag_nov 0.06-1
Name: lua-%{luapkgname}
Version: 0.6
Release: 4%{?dist}
Summary: HMAC functions for nginx-module-lua and LuaJIT
Group: Development/Libraries
License: BSD
URL: https://github.com/jkeys089/lua-resty-hmac
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
Requires: lua-resty-string >= 0.8
BuildArch: noarch
%description
%{summary}.
%if 0%{?fedora} || 0%{?rhel} > 7
%package -n lua%{luacompatver}-%{luapkgname}
Summary: HMAC functions for nginx-module-lua and LuaJIT for Lua %{luacompatver}
Requires: lua%{luacompatver}-resty-string >= 0.8
%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.markdown
%if 0%{?fedora} || 0%{?rhel} > 7
%files -n lua%{luacompatver}-%{luapkgname}
%{luacompatpkgdir}/*
%doc README.markdown
%endif
%changelog
# not maintained