@@ -47,6 +47,8 @@ Requires(postun): systemd
47
47
48
48
BuildRequires: pcre2-devel
49
49
BuildRequires: pkgconfig
50
+ BuildRequires: clang
51
+ BuildRequires: llvm
50
52
51
53
Provides: unit-r%{version}
52
54
@@ -99,6 +101,10 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
99
101
%{__make} %{?_smp_mflags}
100
102
%{__mv} build build-nodebug
101
103
104
+ %if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2})
105
+ %{__make} %{?_smp_mflags} -C pkg/contrib .libunit-wasm
106
+ %endif
107
+
102
108
%install
103
109
%{__rm} -rf %{buildroot}
104
110
%{__ln_s} build-nodebug build
@@ -136,6 +142,12 @@ DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install
136
142
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/unit.service
137
143
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/unit-debug.service
138
144
145
+ %if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2})
146
+ %{__mkdir} -p %{buildroot}%{_includedir}/unit/
147
+ %{__install} -m 644 pkg/contrib/libunit-wasm/src/c/libunit-wasm.a %{buildroot}%{_libdir}/
148
+ %{__install} -m 644 pkg/contrib/libunit-wasm/src/c/include/unit/unit-wasm.h %{buildroot}%{_includedir}/unit/
149
+ %endif
150
+
139
151
QA_SKIP_BUILD_ROOT=1
140
152
export QA_SKIP_BUILD_ROOT
141
153
@@ -221,6 +233,11 @@ BANNER
221
233
%files devel
222
234
%{_libdir}/libunit.a
223
235
%{_libdir}/libunit-debug.a
236
+ %if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2})
237
+ %{_libdir}/libunit-wasm.a
238
+ %dir %{_includedir}/unit
239
+ %{_includedir}/unit/*.h
240
+ %endif
224
241
%{_includedir}/nxt_*.h
225
242
%{_datadir}/pkgconfig/unit.pc
226
243
0 commit comments