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>
|
Wed Jul 29 20:15:21 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
@ -19,12 +19,6 @@
|
|||||||
%define home %{_localstatedir}/lib/%{name}
|
%define home %{_localstatedir}/lib/%{name}
|
||||||
%define c_lib libmosquitto1
|
%define c_lib libmosquitto1
|
||||||
%define cpp_lib libmosquittopp1
|
%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
|
Name: mosquitto
|
||||||
Version: 1.6.10
|
Version: 1.6.10
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -44,17 +38,12 @@ Patch1: mosquitto-1.6.8-config.patch
|
|||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libcares-devel
|
BuildRequires: libcares-devel
|
||||||
|
BuildRequires: libwebsockets-devel
|
||||||
BuildRequires: openssl-devel >= 1.0.0
|
BuildRequires: openssl-devel >= 1.0.0
|
||||||
BuildRequires: tcpd-devel
|
BuildRequires: tcpd-devel
|
||||||
BuildRequires: uthash-devel
|
BuildRequires: uthash-devel
|
||||||
Requires(pre): shadow
|
Requires(pre): shadow
|
||||||
%if %{with websockets}
|
%{?systemd_ordering}
|
||||||
BuildRequires: libwebsockets-devel
|
|
||||||
%endif
|
|
||||||
%if %{with systemd}
|
|
||||||
BuildRequires: pkgconfig(systemd)
|
|
||||||
%{?systemd_requires}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Mosquitto is a message broker that implements the
|
Mosquitto is a message broker that implements the
|
||||||
@ -127,27 +116,20 @@ find misc -type f -exec chmod a-x "{}" "+"
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
|
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
|
||||||
%if %{with websockets}
|
|
||||||
-DWITH_WEBSOCKETS=ON \
|
-DWITH_WEBSOCKETS=ON \
|
||||||
%endif
|
|
||||||
-DUSE_LIBWRAP=OFF
|
-DUSE_LIBWRAP=OFF
|
||||||
make
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_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}
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||||
%endif
|
|
||||||
install -Dd -m 0750 %{buildroot}%{home}
|
install -Dd -m 0750 %{buildroot}%{home}
|
||||||
chmod -R o= %{buildroot}%{_sysconfdir}/%{name}/
|
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 644 security/mosquitto.apparmor %{buildroot}%{_sysconfdir}/apparmor.d/usr.sbin.mosquitto
|
||||||
install -D -m 755 -d %{buildroot}%{_sysconfdir}/apparmor.d/local/
|
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
|
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 %{SOURCE4} %{buildroot}%{_sysconfdir}/mosquitto/conf.d/README
|
||||||
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/mosquitto/ca_certificates/README
|
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/mosquitto/ca_certificates/README
|
||||||
install -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/mosquitto/certs/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
|
%pre
|
||||||
getent group %{name} || %{_sbindir}/groupadd -r %{name}
|
getent group %{name} || %{_sbindir}/groupadd -r %{name}
|
||||||
getent passwd %{name} || %{_sbindir}/useradd -g %{name} -s /bin/false -r -c "%{name}" -d %{home} %{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
|
%service_add_pre %{name}.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if 0%{?suse_version}
|
|
||||||
%service_del_preun %{name}.service
|
%service_del_preun %{name}.service
|
||||||
%else
|
|
||||||
%systemd_preun %{name}.service
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?suse_version}
|
|
||||||
%service_add_post %{name}.service
|
%service_add_post %{name}.service
|
||||||
%else
|
|
||||||
%systemd_post %{name}.service
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if 0%{?suse_version}
|
|
||||||
%service_del_postun %{name}.service
|
%service_del_postun %{name}.service
|
||||||
%else
|
|
||||||
%systemd_postun_with_restart %{name}.service
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
# /END BIG SYSTEMD
|
|
||||||
|
|
||||||
%post -n %{c_lib} -p /sbin/ldconfig
|
%post -n %{c_lib} -p /sbin/ldconfig
|
||||||
%postun -n %{c_lib} -p /sbin/ldconfig
|
%postun -n %{c_lib} -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -n %{cpp_lib} -p /sbin/ldconfig
|
%post -n %{cpp_lib} -p /sbin/ldconfig
|
||||||
%postun -n %{cpp_lib} -p /sbin/ldconfig
|
%postun -n %{cpp_lib} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc edl-v10 epl-v10
|
%doc edl-v10 epl-v10
|
||||||
%doc CONTRIBUTING.md ChangeLog.txt readme.md *.html *.example
|
%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/
|
%config(noreplace) %attr(-,root,%{name}) %{_sysconfdir}/mosquitto/
|
||||||
%{_bindir}/mosquitto_passwd
|
%{_bindir}/mosquitto_passwd
|
||||||
%{_sbindir}/mosquitto
|
%{_sbindir}/mosquitto
|
||||||
%{_mandir}/man1/mosquitto_passwd.1%{ext_man}
|
%{_mandir}/man1/mosquitto_passwd.1%{?ext_man}
|
||||||
%{_mandir}/man5/mosquitto.conf.5%{ext_man}
|
%{_mandir}/man5/mosquitto.conf.5%{?ext_man}
|
||||||
%{_mandir}/man7/mosquitto-tls.7%{ext_man}
|
%{_mandir}/man7/mosquitto-tls.7%{?ext_man}
|
||||||
%{_mandir}/man7/mqtt.7%{ext_man}
|
%{_mandir}/man7/mqtt.7%{?ext_man}
|
||||||
%{_mandir}/man8/mosquitto.8%{ext_man}
|
%{_mandir}/man8/mosquitto.8%{?ext_man}
|
||||||
%if %{with systemd}
|
|
||||||
%{_unitdir}/%{name}.service
|
%{_unitdir}/%{name}.service
|
||||||
%if 0%{?suse_version}
|
|
||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
%dir %attr(-,%{name},%{name}) %{home}
|
%dir %attr(-,%{name},%{name}) %{home}
|
||||||
%if 0%{?suse_version}
|
|
||||||
%dir %{_sysconfdir}/apparmor.d/
|
%dir %{_sysconfdir}/apparmor.d/
|
||||||
%dir %{_sysconfdir}/apparmor.d/local/
|
%dir %{_sysconfdir}/apparmor.d/local/
|
||||||
%config %{_sysconfdir}/apparmor.d/usr.sbin.mosquitto
|
%config %{_sysconfdir}/apparmor.d/usr.sbin.mosquitto
|
||||||
%config(noreplace) %{_sysconfdir}/apparmor.d/local/usr.sbin.mosquitto
|
%config(noreplace) %{_sysconfdir}/apparmor.d/local/usr.sbin.mosquitto
|
||||||
%endif
|
|
||||||
|
|
||||||
%files clients
|
%files clients
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc edl-v10 epl-v10
|
%doc edl-v10 epl-v10
|
||||||
%{_bindir}/mosquitto_pub
|
%{_bindir}/mosquitto_pub
|
||||||
%{_bindir}/mosquitto_sub
|
%{_bindir}/mosquitto_sub
|
||||||
%{_bindir}/mosquitto_rr
|
%{_bindir}/mosquitto_rr
|
||||||
%{_mandir}/man1/mosquitto_pub.1%{ext_man}
|
%{_mandir}/man1/mosquitto_pub.1%{?ext_man}
|
||||||
%{_mandir}/man1/mosquitto_sub.1%{ext_man}
|
%{_mandir}/man1/mosquitto_sub.1%{?ext_man}
|
||||||
%{_mandir}/man1/mosquitto_rr.1%{ext_man}
|
%{_mandir}/man1/mosquitto_rr.1%{?ext_man}
|
||||||
|
|
||||||
%files -n %{c_lib}
|
%files -n %{c_lib}
|
||||||
%defattr(-,root,root)
|
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc edl-v10 epl-v10
|
%doc edl-v10 epl-v10
|
||||||
%{_libdir}/libmosquitto.so.*
|
%{_libdir}/libmosquitto.so.*
|
||||||
|
|
||||||
%files -n %{cpp_lib}
|
%files -n %{cpp_lib}
|
||||||
%defattr(-,root,root)
|
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc edl-v10 epl-v10
|
%doc edl-v10 epl-v10
|
||||||
%{_libdir}/libmosquittopp.so.*
|
%{_libdir}/libmosquittopp.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_libdir}/libmosquitto.so
|
%{_libdir}/libmosquitto.so
|
||||||
%{_libdir}/libmosquittopp.so
|
%{_libdir}/libmosquittopp.so
|
||||||
%{_includedir}/mosquitto.h
|
%{_includedir}/mosquitto.h
|
||||||
%{_includedir}/mosquitto_broker.h
|
%{_includedir}/mosquitto_broker.h
|
||||||
%{_includedir}/mosquitto_plugin.h
|
%{_includedir}/mosquitto_plugin.h
|
||||||
%{_includedir}/mosquittopp.h
|
%{_includedir}/mosquittopp.h
|
||||||
%{_mandir}/man3/libmosquitto.3%{ext_man}
|
%{_mandir}/man3/libmosquitto.3%{?ext_man}
|
||||||
%{_libdir}/pkgconfig/libmosquitto.pc
|
%{_libdir}/pkgconfig/libmosquitto.pc
|
||||||
%{_libdir}/pkgconfig/libmosquittopp.pc
|
%{_libdir}/pkgconfig/libmosquittopp.pc
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user