# - initscript
Summary: An Open Source MQTT v3.1 Broker
Name: mosquitto
-Version: 1.6.9
-Release: 0.1
+Version: 2.0.15
+Release: 1
License: BSD
Group: Applications
-Source0: http://mosquitto.org/files/source/%{name}-%{version}.tar.gz
-# Source0-md5: 52f5078ec18aaf623b14dfb121fd534b
+Source0: https://mosquitto.org/files/source/%{name}-%{version}.tar.gz
+# Source0-md5: 22b7a8b05caa692cb22496b791529193
URL: http://mosquitto.org/
-BuildRequires: cmake
+BuildRequires: cmake >= 3.0
+BuildRequires: cjson-devel
BuildRequires: libstdc++-devel
BuildRequires: libwrap-devel
+BuildRequires: libxslt-progs
BuildRequires: openssl-devel
-BuildRequires: rpmbuild(macros) >= 1.219
-BuildRequires: sqlite3-devel >= 3.5
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.605
+BuildRequires: systemd-devel
+BuildRequires: uthash-devel
Requires(postun): /usr/sbin/groupdel
Requires(postun): /usr/sbin/userdel
Requires(pre): /bin/id
%package -n libmosquitto-devel
Summary: MQTT C client library development files
Group: Development/Libraries
-Group: Development/Libraries
Requires: libmosquitto = %{version}-%{release}
%description -n libmosquitto-devel
Summary: MQTT C++ client library development files
Group: Development/Libraries
Requires: libmosquittopp = %{version}-%{release}
+Requires: libmosquitto-devel = %{version}-%{release}
%description -n libmosquittopp-devel
This is a library that provides a means of implementing MQTT version 3
cd build
%cmake \
-DUSE_LIBWRAP:BOOL=ON \
- -DWITH_BUNDLED_DEPS:BOOL=ON \
+ -DWITH_BUNDLED_DEPS:BOOL=OFF \
+ -DWITH_SYSTEMD:BOOL=ON \
..
%{__make}
cd ..
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-:> $RPM_BUILD_ROOT/etc/mosquitto/aclfile
-:> $RPM_BUILD_ROOT/etc/mosquitto/pskfile
-:> $RPM_BUILD_ROOT/etc/mosquitto/pwfile
+for file in aclfile pskfile pwfile ; do
+ %{__rm} $RPM_BUILD_ROOT/etc/mosquitto/$file.example
+ :> $RPM_BUILD_ROOT/etc/%{name}/$file
+done
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc LICENSE.txt CONTRIBUTING.md ChangeLog.txt readme.md examples
+%doc LICENSE.txt CONTRIBUTING.md ChangeLog.txt README.md examples aclfile.example mosquitto.conf pskfile.example pwfile.example
%dir %{_sysconfdir}/%{name}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/aclfile
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/pskfile
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/pwfile
+%attr(755,root,root) %{_bindir}/mosquitto_ctrl
%attr(755,root,root) %{_bindir}/mosquitto_passwd
%attr(755,root,root) %{_sbindir}/mosquitto
+%attr(755,root,root) %{_libdir}/mosquitto_dynamic_security.so
+%{_mandir}/man1/mosquitto_ctrl.1*
+%{_mandir}/man1/mosquitto_ctrl_dynsec.1*
%{_mandir}/man1/mosquitto_passwd.1*
%{_mandir}/man5/mosquitto.conf.5*
%{_mandir}/man7/mosquitto-tls.7*
%{_includedir}/mosquitto_broker.h
%{_includedir}/mosquitto.h
%{_includedir}/mosquitto_plugin.h
+%{_includedir}/mqtt_protocol.h
%{_pkgconfigdir}/libmosquitto.pc
%{_pkgconfigdir}/libmosquittopp.pc