File tree 3 files changed +24
-9
lines changed
3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ def setup_logging(level=logging.INFO):
63
63
continue
64
64
module_name = repo .name .replace ('lua-resty-' , '' )
65
65
filename = os .path .join (work_dir , f'resty/{ module_name } .yml' )
66
+ # If module file has been created during this launch (e.g. author1/repo1 and author2/repo1 have same name)
66
67
if os .path .exists (filename ):
67
68
log .warning ('Skipping. Definition already exists for this name. Likely a less popular fork' )
68
69
continue
@@ -129,15 +130,16 @@ def setup_logging(level=logging.INFO):
129
130
requires = re .sub (r'0\.0(\d)' , r"0.\1" , requires )
130
131
requires = requires .split (',' )
131
132
requires_found = []
133
+ lib_requires_found = []
132
134
for r in requires :
133
135
parts = r .split ('/' )
134
136
r = parts [- 1 ].strip ()
135
137
if r .startswith ('lua-resty-' ):
136
- requires_found .append (r .replace ('lua-' , '' ))
138
+ lib_requires_found .append (r .replace ('lua-' , '' ))
137
139
print (requires )
138
- print (requires_found )
139
- if requires_found :
140
- dict_file ['requires ' ] = requires_found
140
+ print (lib_requires_found )
141
+ if lib_requires_found :
142
+ dict_file ['lib_requires ' ] = lib_requires_found
141
143
142
144
with open (filename , 'w' , encoding = 'utf8' ) as file :
143
145
documents = yaml .dump (dict_file , file )
Original file line number Diff line number Diff line change 1
1
repo : openresty/lua-resty-core
2
- requires :
2
+ lib_requires :
3
3
- resty-lrucache >= 0.8
4
+ requires :
4
5
- ngx_http_lua_module >= 0.10.25
5
6
summary : New FFI-based API for lua-nginx-module
Original file line number Diff line number Diff line change 13
13
14
14
Name: lua-%{luapkgname}
15
15
Version: {{ version }}
16
- Release: 3 %{?dist}
16
+ Release: 4 %{?dist}
17
17
Summary: {{ summary }}
18
18
Group: Development/Libraries
19
19
License: BSD
@@ -33,6 +33,12 @@ Requires: lua(abi) = %{luacompatver}
33
33
34
34
{% if requires is defined and requires is iterable %}
35
35
{% for r in requires -%}
36
+ Requires: {{ r }}
37
+ {% endfor -%}
38
+ {% - endif -%}
39
+
40
+ {% if lib_requires is defined and lib_requires is iterable %}
41
+ {% for r in lib_requires -%}
36
42
Requires: lua-{{ r }}
37
43
{% endfor -%}
38
44
{% - endif -%}
@@ -49,16 +55,23 @@ Provides: {{ p }}
49
55
{% endfor -%}
50
56
{% - endif -%}
51
57
52
- BuildArch: noarch
58
+ BuildArch: noarch
53
59
54
60
%description
55
61
%{summary}.
56
62
57
63
%if 0%{?fedora} || 0%{?rhel} > 7
58
64
%package -n lua%{luacompatver}-%{luapkgname}
59
65
Summary: {{ summary }} for Lua %{luacompatver}
60
- {% if requires is defined and requires is iterable -%}
66
+
67
+ {% if requires is defined and requires is iterable %}
61
68
{% for r in requires -%}
69
+ Requires: {{ r }}
70
+ {% endfor -%}
71
+ {% - endif -%}
72
+
73
+ {% if lib_requires is defined and lib_requires is iterable -%}
74
+ {% for r in lib_requires -%}
62
75
Requires: lua%{luacompatver}-{{ r }}
63
76
{% endfor -%}
64
77
{% - endif -%}
@@ -118,4 +131,3 @@ cp -pr lib/* $RPM_BUILD_ROOT%{luacompatpkgdir}
118
131
119
132
%changelog
120
133
# not maintained
121
-
You can’t perform that action at this time.
0 commit comments