summaryrefslogtreecommitdiffstats
path: root/netdata.spec.in
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2021-01-15 12:38:05 -0500
committerGitHub <noreply@github.com>2021-01-15 12:38:05 -0500
commit0d54bda605232d8d4b45e33274e579f6d98118b9 (patch)
treebd478e5b3de23443ad89341eb5155261550c3ddd /netdata.spec.in
parent7ffe03690b02ec9961837f09f3c225172fb31fad (diff)
Switched to using system libwebsockets for RPM builds. (#10507)
* Switched to using system libwebsockets for RPM builds. Also cleans up the configure statement in the RPM spec file. * Add version requirement for LWS dep and only use native on platforms that meet it.
Diffstat (limited to 'netdata.spec.in')
-rw-r--r--netdata.spec.in13
1 files changed, 10 insertions, 3 deletions
diff --git a/netdata.spec.in b/netdata.spec.in
index 81127b0bfc..ff33e79ed1 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -132,6 +132,9 @@ BuildRequires: zlib-devel
BuildRequires: libuuid-devel
BuildRequires: libuv-devel >= 1
BuildRequires: openssl-devel
+%if 0%{?centos_ver} >= 8 || 0%{?fedora}
+BuildRequires: libwebsockets-devel >= 3.2
+%endif
%if 0%{?suse_version}
BuildRequires: judy-devel
BuildRequires: liblz4-devel
@@ -218,7 +221,9 @@ happened, on your systems and applications.
%prep
%setup -q -n %{name}-%{version}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-mosquitto.sh ${RPM_BUILD_DIR}/%{name}-%{version}
+%if 0%{?centos_ver} >= 8 || 0%{?fedora}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-lws.sh ${RPM_BUILD_DIR}/%{name}-%{version}
+%endif
# Only bundle libJudy if this isn't Fedora or SUSE
%if 0%{!?fedora:1} && 0%{!?suse_version:1}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-judy.sh ${RPM_BUILD_DIR}/%{name}-%{version}
@@ -234,15 +239,17 @@ autoreconf -ivf
%if 0%{!?fedora:1} && 0%{!?suse_version:1}
--with-libJudy=externaldeps/libJudy \
%endif
- --with-bundled-lws=externaldeps/libwebsockets
+ %if 0%{?centos_ver} >= 8 || 0%{?fedora}
+ --with-libwebsockets=externaldeps/libwebsockets \
+ %endif
--prefix="%{_prefix}" \
--sysconfdir="%{_sysconfdir}" \
--localstatedir="%{_localstatedir}" \
--libexecdir="%{_libexecdir}" \
- --libdir="%{_libdir}" \
+ --libdir="%{_libdir}" \
--with-zlib \
--with-math \
- --with-user=netdata \
+ --with-user=netdata
# Build step
%{__make} %{?_smp_mflags}