Accepting request 824014 from home:mnhauke
- Lets always build with support for systemd and websockets and drop all the related ifdef's. - Run spec-cleaner. OBS-URL: https://build.opensuse.org/request/show/824014 OBS-URL: https://build.opensuse.org/package/show/network:messaging:mqtt/mosquitto?expand=0&rev=40
This commit is contained in:
parent
510b3fe972
commit
33486cdcc8
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Aug 2 18:14:23 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Lets always build with support for systemd and websockets and
|
||||
drop all the related ifdef's.
|
||||
- Run spec-cleaner.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 29 20:15:21 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
|
@ -19,12 +19,6 @@
|
||||
%define home %{_localstatedir}/lib/%{name}
|
||||
%define c_lib libmosquitto1
|
||||
%define cpp_lib libmosquittopp1
|
||||
%if 0%{?suse_version} > 1230 || 0%{?rhel_version} > 600 || 0%{?centos_version} > 600 || 0%{?fedora_version} >= 20 || 0%{?el7}%{?fc20}%{?fc21}%{?fc22}%{?fc23}%{?fc24}%{?fc25}
|
||||
%bcond_without systemd
|
||||
%else
|
||||
%bcond_with systemd
|
||||
%endif
|
||||
%bcond_without websockets
|
||||
Name: mosquitto
|
||||
Version: 1.6.10
|
||||
Release: 0
|
||||
@ -44,17 +38,12 @@ Patch1: mosquitto-1.6.8-config.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libcares-devel
|
||||
BuildRequires: libwebsockets-devel
|
||||
BuildRequires: openssl-devel >= 1.0.0
|
||||
BuildRequires: tcpd-devel
|
||||
BuildRequires: uthash-devel
|
||||
Requires(pre): shadow
|
||||
%if %{with websockets}
|
||||
BuildRequires: libwebsockets-devel
|
||||
%endif
|
||||
%if %{with systemd}
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
%{?systemd_ordering}
|
||||
|
||||
%description
|
||||
Mosquitto is a message broker that implements the
|
||||
@ -127,27 +116,20 @@ find misc -type f -exec chmod a-x "{}" "+"
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
||||
%if %{with websockets}
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
|
||||
-DWITH_WEBSOCKETS=ON \
|
||||
%endif
|
||||
-DUSE_LIBWRAP=OFF
|
||||
make
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
%if %{with systemd}
|
||||
install -D -m 0644 %{SOURCE1} \
|
||||
%{buildroot}%{_unitdir}/%{name}.service
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
install -Dd -m 0750 %{buildroot}%{home}
|
||||
chmod -R o= %{buildroot}%{_sysconfdir}/%{name}/
|
||||
%if 0%{?suse_version}
|
||||
install -D -m 644 security/mosquitto.apparmor %{buildroot}%{_sysconfdir}/apparmor.d/usr.sbin.mosquitto
|
||||
install -D -m 755 -d %{buildroot}%{_sysconfdir}/apparmor.d/local/
|
||||
echo "# Site-specific additions and overrides for 'usr.sbin.mosquitto'" > %{buildroot}%{_sysconfdir}/apparmor.d/local/usr.sbin.mosquitto
|
||||
%endif
|
||||
install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/mosquitto/conf.d/README
|
||||
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/mosquitto/ca_certificates/README
|
||||
install -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/mosquitto/certs/README
|
||||
@ -155,43 +137,24 @@ install -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/mosquitto/certs/README
|
||||
%pre
|
||||
getent group %{name} || %{_sbindir}/groupadd -r %{name}
|
||||
getent passwd %{name} || %{_sbindir}/useradd -g %{name} -s /bin/false -r -c "%{name}" -d %{home} %{name}
|
||||
# START BIG SYSTEMD
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
|
||||
%service_add_pre %{name}.service
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun %{name}.service
|
||||
%else
|
||||
%systemd_preun %{name}.service
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post %{name}.service
|
||||
%else
|
||||
%systemd_post %{name}.service
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun %{name}.service
|
||||
%else
|
||||
%systemd_postun_with_restart %{name}.service
|
||||
%endif
|
||||
%endif
|
||||
# /END BIG SYSTEMD
|
||||
|
||||
%post -n %{c_lib} -p /sbin/ldconfig
|
||||
%postun -n %{c_lib} -p /sbin/ldconfig
|
||||
|
||||
%post -n %{cpp_lib} -p /sbin/ldconfig
|
||||
%postun -n %{cpp_lib} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE.txt
|
||||
%doc edl-v10 epl-v10
|
||||
%doc CONTRIBUTING.md ChangeLog.txt readme.md *.html *.example
|
||||
@ -199,57 +162,47 @@ getent passwd %{name} || %{_sbindir}/useradd -g %{name} -s /bin/false -r -c "%{n
|
||||
%config(noreplace) %attr(-,root,%{name}) %{_sysconfdir}/mosquitto/
|
||||
%{_bindir}/mosquitto_passwd
|
||||
%{_sbindir}/mosquitto
|
||||
%{_mandir}/man1/mosquitto_passwd.1%{ext_man}
|
||||
%{_mandir}/man5/mosquitto.conf.5%{ext_man}
|
||||
%{_mandir}/man7/mosquitto-tls.7%{ext_man}
|
||||
%{_mandir}/man7/mqtt.7%{ext_man}
|
||||
%{_mandir}/man8/mosquitto.8%{ext_man}
|
||||
%if %{with systemd}
|
||||
%{_mandir}/man1/mosquitto_passwd.1%{?ext_man}
|
||||
%{_mandir}/man5/mosquitto.conf.5%{?ext_man}
|
||||
%{_mandir}/man7/mosquitto-tls.7%{?ext_man}
|
||||
%{_mandir}/man7/mqtt.7%{?ext_man}
|
||||
%{_mandir}/man8/mosquitto.8%{?ext_man}
|
||||
%{_unitdir}/%{name}.service
|
||||
%if 0%{?suse_version}
|
||||
%{_sbindir}/rc%{name}
|
||||
%endif
|
||||
%endif
|
||||
%dir %attr(-,%{name},%{name}) %{home}
|
||||
%if 0%{?suse_version}
|
||||
%dir %{_sysconfdir}/apparmor.d/
|
||||
%dir %{_sysconfdir}/apparmor.d/local/
|
||||
%config %{_sysconfdir}/apparmor.d/usr.sbin.mosquitto
|
||||
%config(noreplace) %{_sysconfdir}/apparmor.d/local/usr.sbin.mosquitto
|
||||
%endif
|
||||
|
||||
%files clients
|
||||
%defattr(-,root,root,-)
|
||||
%license LICENSE.txt
|
||||
%doc edl-v10 epl-v10
|
||||
%{_bindir}/mosquitto_pub
|
||||
%{_bindir}/mosquitto_sub
|
||||
%{_bindir}/mosquitto_rr
|
||||
%{_mandir}/man1/mosquitto_pub.1%{ext_man}
|
||||
%{_mandir}/man1/mosquitto_sub.1%{ext_man}
|
||||
%{_mandir}/man1/mosquitto_rr.1%{ext_man}
|
||||
%{_mandir}/man1/mosquitto_pub.1%{?ext_man}
|
||||
%{_mandir}/man1/mosquitto_sub.1%{?ext_man}
|
||||
%{_mandir}/man1/mosquitto_rr.1%{?ext_man}
|
||||
|
||||
%files -n %{c_lib}
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE.txt
|
||||
%doc edl-v10 epl-v10
|
||||
%{_libdir}/libmosquitto.so.*
|
||||
|
||||
%files -n %{cpp_lib}
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE.txt
|
||||
%doc edl-v10 epl-v10
|
||||
%{_libdir}/libmosquittopp.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libmosquitto.so
|
||||
%{_libdir}/libmosquittopp.so
|
||||
%{_includedir}/mosquitto.h
|
||||
%{_includedir}/mosquitto_broker.h
|
||||
%{_includedir}/mosquitto_plugin.h
|
||||
%{_includedir}/mosquittopp.h
|
||||
%{_mandir}/man3/libmosquitto.3%{ext_man}
|
||||
%{_mandir}/man3/libmosquitto.3%{?ext_man}
|
||||
%{_libdir}/pkgconfig/libmosquitto.pc
|
||||
%{_libdir}/pkgconfig/libmosquittopp.pc
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user