Name: mosquitto Version: 0.14.1 Release: 2%{?dist} Summary: MQTT version 3.1 compatible message broker License: BSD URL: http://mosquitto.org Source0: http://mosquitto.org/files/source/mosquitto-%{version}.tar.gz # patch cmake to fix paths, remove versioning on binaries Patch0: mosquitto-0.14.1-fix_paths.patch Patch1: mosquitto-0.14.1-remove_versioning.patch BuildRequires: tcp_wrappers-devel Requires: tcp_wrappers python Requires(pre): shadow-utils %description A message broker that supports version 3.1 of the MQ Telemetry Transport protocol. MQTT provides a method of carrying out messaging using a publish/subscribe model. It is lightweight, both in terms of bandwidth usage and ease of implementation. This makes it particularly useful at the edge of the network where simple embedded devices are in use, such as an arduino implementing a sensor. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing MQTT applications that use %{name}. %prep %setup -q %patch0 -p1 -b .fix_paths %patch1 -p1 -b .remove_versioning %build %cmake \ -DSYSCONFDIR:PATH=%{_sysconfdir}/mosquitto/ \ -DUSE_LIBWRAP:BOOL=ON \ . make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # no tests are available, so check / ctest not called %pre getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || \ useradd -r -g %{name} -d HOMEDIR -s /sbin/nologin \ -c "Mosquitto Broker" %{name} exit 0 %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc ChangeLog.txt %dir %{_sysconfdir}/mosquitto/ %config(noreplace) %{_sysconfdir}/mosquitto/mosquitto.conf %{_sysconfdir}/mosquitto/*.example %{_bindir}/%{name}_pub %{_bindir}/%{name}_sub %{_sbindir}/%{name} %{_libdir}/*.so.* %{_mandir}/man*/* %files devel %{_includedir}/* %{_libdir}/*.so %changelog * Mon Nov 21 2011 Rex Dieter 0.14.1-2 - initial stab at cmake sanity - add ldconfig scriptlets * Sun Nov 20 2011 Andrew Elwell - 0.14.1-1 - Initial package for Fedora / EPEL