From 0d54bda605232d8d4b45e33274e579f6d98118b9 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Fri, 15 Jan 2021 12:38:05 -0500 Subject: 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. --- netdata.spec.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'netdata.spec.in') 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} -- cgit v1.2.3