diff --git a/mosquitto-2.0.18.tar.gz b/mosquitto-2.0.18.tar.gz deleted file mode 100644 index d5a7c074e6586bbe8b2ea26f69d253ddb3c3f301..0000000000000000000000000000000000000000 Binary files a/mosquitto-2.0.18.tar.gz and /dev/null differ diff --git a/mosquitto-2.0.20-libwebsockets.patch b/mosquitto-2.0.20-libwebsockets.patch new file mode 100644 index 0000000000000000000000000000000000000000..20c6b5cce248681293d0e101305abb3ab35dfce5 --- /dev/null +++ b/mosquitto-2.0.20-libwebsockets.patch @@ -0,0 +1,11 @@ +--- mosquitto-2.0.20/src/CMakeLists.txt.orig 2024-10-18 21:38:48.640819100 +0800 ++++ mosquitto-2.0.20/src/CMakeLists.txt 2024-10-18 21:39:06.342328300 +0800 +@@ -200,7 +200,7 @@ + link_directories(${mosquitto_SOURCE_DIR}) + endif (WIN32) + else (STATIC_WEBSOCKETS) +- set (MOSQ_LIBS ${MOSQ_LIBS} websockets_shared) ++ set (MOSQ_LIBS ${MOSQ_LIBS} websockets) + endif (STATIC_WEBSOCKETS) + endif (WITH_WEBSOCKETS) + diff --git a/mosquitto-2.0.20.tar.gz b/mosquitto-2.0.20.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e740e46d21dcd683f8a03d641183f7f811c24295 Binary files /dev/null and b/mosquitto-2.0.20.tar.gz differ diff --git a/mosquitto.spec b/mosquitto.spec index 7b2494d1c5f4c7fa904126a9e50752922ce0d5f0..a68d8cbe34ad4f630ec195f2baf43b63346c53c6 100644 --- a/mosquitto.spec +++ b/mosquitto.spec @@ -1,20 +1,25 @@ Name: mosquitto -Version: 2.0.18 +Version: 2.0.20 Release: 1 Summary: Open Source MQTT v3.1/v3.1.1 Broker License: EPL-1.0 -URL: http://mosquitto.org/ -Source0: http://mosquitto.org/files/source/%{name}-%{version}.tar.gz +URL: https://mosquitto.org/ +Source0: https://mosquitto.org/files/source/%{name}-%{version}.tar.gz Patch0001: add-usage-output.patch Patch0002: fix-usage-exit-code.patch -BuildRequires: c-ares-devel gcc-c++ libuuid-devel libwebsockets-devel openssl-devel -BuildRequires: systemd-devel cjson-devel -BuildRequires: make -Provides: bundled(uthash) +Patch0003: mosquitto-2.0.20-libwebsockets.patch +BuildRequires: gcc-c++ make +BuildRequires: cmake >= 3.5 +BuildRequires: c-ares-devel +BuildRequires: cjson-devel +BuildRequires: libwebsockets-devel +BuildRequires: openssl-devel +BuildRequires: systemd-devel +BuildRequires: uthash-devel +BuildRequires: /usr/bin/xsltproc Requires(pre): shadow-utils -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd +%{?systemd_requires} + %description Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol version 3.1 and 3.1.1 MQTT provides a lightweight method @@ -26,29 +31,26 @@ like the Arduino. %package devel Requires: %{name} = %{version}-%{release} Summary: Development files for %{name} + %description devel Development headers and libraries for %{name} %prep %autosetup -p1 -sed -i "s|prefix?=/usr/local|prefix?=/usr|" config.mk -sed -i "s|(INSTALL) -s|(INSTALL)|g" lib/Makefile src/Makefile client/Makefile %build -export CFLAGS="%{optflags}" -export LDFLAGS="%{optflags} %{__global_ldflags} -Wl,--as-needed" -make all %{?_smp_mflags} WITH_WEBSOCKETS=yes WITH_SYSTEMD=yes +%cmake -B %{_vpath_builddir} \ + -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \ + -DWITH_SRV=ON \ + -DWITH_WEBSOCKETS=ON \ + -DWITH_SYSTEMD=ON \ + -DWITH_BUNDLED_DEPS=OFF +%cmake_build %install -%if "%{_lib}" == "lib64" -export LIB_SUFFIX=64 -%endif -%make_install -mkdir -p %{buildroot}%{_unitdir} -install -p -m 0644 service/systemd/%{name}.service.notify %{buildroot}%{_unitdir}/%{name}.service -mv %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf.example %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +%cmake_install -%check +install -Dp -m 0644 service/systemd/%{name}.service.notify %{buildroot}%{_unitdir}/%{name}.service %pre getent group %{name} >/dev/null || groupadd -r %{name} @@ -59,14 +61,12 @@ exit 0 %post %systemd_post %{name}.service -/sbin/ldconfig %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service -/sbin/ldconfig %files %license LICENSE.txt @@ -76,20 +76,23 @@ exit 0 %{_libdir}/*.so.* %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf -%config%{_sysconfdir}/%{name}/*.example +%config(noreplace) %{_sysconfdir}/%{name}/*.example %{_unitdir}/%{name}.service -%{_mandir}/man1/*.1.* -%{_mandir}/man5/*.5.* -%{_mandir}/man7/*.7.* -%{_mandir}/man8/*.8.* +%{_mandir}/man1/*.1* +%{_mandir}/man5/*.5* +%{_mandir}/man7/*.7* +%{_mandir}/man8/*.8* %files devel %{_includedir}/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%{_mandir}/man3/*.3.* +%{_mandir}/man3/*.3* %changelog +* Fri Oct 18 2024 Funda Wang - 2.0.20-1 +- Update to 2.0.20 + * Fri Jul 05 2024 yaoxin - 2.0.18-1 - Update to 2.0.18 * Fix crash on subscribe under certain unlikely conditions. diff --git a/mosquitto.yaml b/mosquitto.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4a8e868b82adedbccdd9a7bd851560e2ee4f4204 --- /dev/null +++ b/mosquitto.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: eclipse/mosquitto +tag_prefix: ^v +separator: .