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