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