Skip to content

Commit 2604946

Browse files
committed
Packages: added libunit-wasm and headers to rpm packaging.
1 parent 28037b1 commit 2604946

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

pkg/rpm/unit.spec.in

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Requires(postun): systemd
4747

4848
BuildRequires: pcre2-devel
4949
BuildRequires: pkgconfig
50+
BuildRequires: clang
51+
BuildRequires: llvm
5052

5153
Provides: unit-r%{version}
5254

@@ -99,6 +101,10 @@ PKG_CONFIG_PATH=%{bdir}/pkg/contrib/njs/build \
99101
%{__make} %{?_smp_mflags}
100102
%{__mv} build build-nodebug
101103

104+
%if (0%{?fedora}) || (0%{?rhel} >= 8) || (0%{?amzn2})
105+
%{__make} %{?_smp_mflags} -C pkg/contrib .libunit-wasm
106+
%endif
107+
102108
%install
103109
%{__rm} -rf %{buildroot}
104110
%{__ln_s} build-nodebug build
@@ -136,6 +142,12 @@ DESTDIR=%{buildroot} make unitd-install libunit-install manpage-install
136142
%{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/unit.service
137143
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/unit-debug.service
138144

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+
139151
QA_SKIP_BUILD_ROOT=1
140152
export QA_SKIP_BUILD_ROOT
141153

@@ -221,6 +233,11 @@ BANNER
221233
%files devel
222234
%{_libdir}/libunit.a
223235
%{_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
224241
%{_includedir}/nxt_*.h
225242
%{_datadir}/pkgconfig/unit.pc
226243

0 commit comments

Comments
 (0)