]> git.pld-linux.org Git - packages/mosquitto.git/blame - mosquitto.spec
updated to 2.0.15
[packages/mosquitto.git] / mosquitto.spec
CommitLineData
4e9afdf1 1# TODO
e831164d 2# - initscript
4e9afdf1
ER
3Summary: An Open Source MQTT v3.1 Broker
4Name: mosquitto
a54f563f 5Version: 2.0.15
a78fe3e2 6Release: 1
4e9afdf1
ER
7License: BSD
8Group: Applications
9Source0: http://mosquitto.org/files/source/%{name}-%{version}.tar.gz
a54f563f 10# Source0-md5: 22b7a8b05caa692cb22496b791529193
4e9afdf1 11URL: http://mosquitto.org/
35af0a1d 12BuildRequires: cmake >= 3.0
a78fe3e2 13BuildRequires: cjson-devel
4e9afdf1
ER
14BuildRequires: libstdc++-devel
15BuildRequires: libwrap-devel
35af0a1d 16BuildRequires: libxslt-progs
4e9afdf1 17BuildRequires: openssl-devel
35af0a1d
JP
18BuildRequires: pkgconfig
19BuildRequires: rpmbuild(macros) >= 1.605
a54f563f 20BuildRequires: systemd-devel
35af0a1d 21BuildRequires: uthash-devel
e831164d
ER
22Requires(postun): /usr/sbin/groupdel
23Requires(postun): /usr/sbin/userdel
24Requires(pre): /bin/id
25Requires(pre): /usr/bin/getgid
26Requires(pre): /usr/sbin/groupadd
27Requires(pre): /usr/sbin/useradd
3e97cdf8 28Suggests: %{name}-clients
e831164d
ER
29Provides: group(mosquitto)
30Provides: user(mosquitto)
4e9afdf1
ER
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34Mosquitto is an open source (BSD licensed) message broker that
35implements the MQ Telemetry Transport protocol version 3.1. MQTT
36provides a lightweight method of carrying out messaging using a
37publish/subscribe model. This makes it suitable for "machine to
38machine" messaging such as with low power sensors or mobile devices
39such as phones, embedded computers or micro-controllers like the
40Arduino.
41
42%package clients
43Summary: Mosquitto command line pub/sub clients
44Group: Applications/Networking
45Requires: libmosquitto = %{version}-%{release}
46
47%description clients
48This is two MQTT version 3 clients. The first can publish messages to
49a broker, the second can subscribe to multiple topics on a broker.
50
51%package -n libmosquitto
52Summary: MQTT C client library
53Group: Development/Libraries
54
55%description -n libmosquitto
56This is a library that provides a means of implementing MQTT version 3
57clients. MQTT provides a lightweight method of carrying out messaging
58using a publish/subscribe model.
59
60%package -n libmosquitto-devel
61Summary: MQTT C client library development files
62Group: Development/Libraries
4e9afdf1
ER
63Requires: libmosquitto = %{version}-%{release}
64
65%description -n libmosquitto-devel
66This is a library that provides a means of implementing MQTT version 3
67clients. MQTT provides a lightweight method of carrying out messaging
68using a publish/subscribe model.
69
70%package -n libmosquittopp
71Summary: MQTT C++ client library
72Group: Development/Libraries
73
74%description -n libmosquittopp
75This is a library that provides a means of implementing MQTT version 3
76clients. MQTT provides a lightweight method of carrying out messaging
77using a publish/subscribe model.
78
79%package -n libmosquittopp-devel
80Summary: MQTT C++ client library development files
81Group: Development/Libraries
82Requires: libmosquittopp = %{version}-%{release}
a54f563f 83Requires: libmosquitto-devel = %{version}-%{release}
4e9afdf1
ER
84
85%description -n libmosquittopp-devel
86This is a library that provides a means of implementing MQTT version 3
87clients. MQTT provides a lightweight method of carrying out messaging
88using a publish/subscribe model.
89
4e9afdf1
ER
90%prep
91%setup -q
92
93%build
94install -d build
95cd build
96%cmake \
97 -DUSE_LIBWRAP:BOOL=ON \
35af0a1d 98 -DWITH_BUNDLED_DEPS:BOOL=OFF \
a54f563f 99 -DWITH_SYSTEMD:BOOL=ON \
4e9afdf1
ER
100 ..
101%{__make}
102cd ..
103
4e9afdf1 104%install
5ad35818 105rm -rf $RPM_BUILD_ROOT
4e9afdf1
ER
106%{__make} -C build install \
107 DESTDIR=$RPM_BUILD_ROOT
108
a78fe3e2
AO
109for file in aclfile pskfile pwfile ; do
110 %{__rm} $RPM_BUILD_ROOT/etc/mosquitto/$file.example
111 :> $RPM_BUILD_ROOT/etc/%{name}/$file
112done
5ad35818 113
4e9afdf1
ER
114%clean
115rm -rf $RPM_BUILD_ROOT
116
117%pre
e831164d
ER
118%groupadd -g 293 -r mosquitto
119%useradd -u 293 -r -g mosquitto -d %{_sysconfdir}/%{name} -s /sbin/nologin -c "Mosquitto Broker" mosquitto
120
121if [ "$1" = "0" ]; then
122 %userremove mosquitto
123 %groupremove mosquitto
124fi
4e9afdf1
ER
125
126%post -n libmosquitto -p /sbin/ldconfig
127%postun -n libmosquitto -p /sbin/ldconfig
128
129%post -n libmosquittopp -p /sbin/ldconfig
130%postun -n libmosquittopp -p /sbin/ldconfig
131
132%files
133%defattr(644,root,root,755)
a78fe3e2 134%doc LICENSE.txt CONTRIBUTING.md ChangeLog.txt README.md examples aclfile.example mosquitto.conf pskfile.example pwfile.example
4e9afdf1
ER
135%dir %{_sysconfdir}/%{name}
136%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
5ad35818
AM
137%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/aclfile
138%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/pskfile
139%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/pwfile
a78fe3e2 140%attr(755,root,root) %{_bindir}/mosquitto_ctrl
4e9afdf1
ER
141%attr(755,root,root) %{_bindir}/mosquitto_passwd
142%attr(755,root,root) %{_sbindir}/mosquitto
a54f563f 143%attr(755,root,root) %{_libdir}/mosquitto_dynamic_security.so
a78fe3e2
AO
144%{_mandir}/man1/mosquitto_ctrl.1*
145%{_mandir}/man1/mosquitto_ctrl_dynsec.1*
4e9afdf1
ER
146%{_mandir}/man1/mosquitto_passwd.1*
147%{_mandir}/man5/mosquitto.conf.5*
148%{_mandir}/man7/mosquitto-tls.7*
149%{_mandir}/man7/mqtt.7*
150%{_mandir}/man8/mosquitto.8*
151
152%files clients
153%defattr(644,root,root,755)
154%attr(755,root,root) %{_bindir}/mosquitto_pub
517b6e7d 155%attr(755,root,root) %{_bindir}/mosquitto_rr
4e9afdf1
ER
156%attr(755,root,root) %{_bindir}/mosquitto_sub
157%{_mandir}/man1/mosquitto_pub.1*
517b6e7d 158%{_mandir}/man1/mosquitto_rr.1*
4e9afdf1
ER
159%{_mandir}/man1/mosquitto_sub.1*
160
161%files -n libmosquitto
162%defattr(644,root,root,755)
163%attr(755,root,root) %{_libdir}/libmosquitto.so.*.*.*
164%ghost %{_libdir}/libmosquitto.so.1
165
166%files -n libmosquitto-devel
167%defattr(644,root,root,755)
168%{_mandir}/man3/libmosquitto.3*
169%{_libdir}/libmosquitto.so
5ad35818 170%{_includedir}/mosquitto_broker.h
4e9afdf1
ER
171%{_includedir}/mosquitto.h
172%{_includedir}/mosquitto_plugin.h
a78fe3e2 173%{_includedir}/mqtt_protocol.h
5ad35818
AM
174%{_pkgconfigdir}/libmosquitto.pc
175%{_pkgconfigdir}/libmosquittopp.pc
4e9afdf1
ER
176
177%files -n libmosquittopp
178%defattr(644,root,root,755)
179%attr(755,root,root) %{_libdir}/libmosquittopp.so.*.*.*
180%ghost %{_libdir}/libmosquittopp.so.1
181
182%files -n libmosquittopp-devel
183%defattr(644,root,root,755)
184%{_libdir}/libmosquittopp.so
185%{_includedir}/mosquittopp.h
This page took 0.144308 seconds and 4 git commands to generate.