]> git.pld-linux.org Git - packages/czmq.git/blob - czmq.spec
- allow building without systemd
[packages/czmq.git] / czmq.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  systemd # systemd
6
7 Summary:        High-level C binding for 0MQ
8 Summary(pl.UTF-8):      Wysokopoziomowe wiązania C dla 0MQ
9 Name:           czmq
10 Version:        4.2.0
11 Release:        6
12 License:        LGPL v3+
13 Group:          Libraries
14 #Source0Download: https://github.com/zeromq/czmq/releases
15 Source0:        https://github.com/zeromq/czmq/releases/download/v%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  7e09997db6ac3b25e8ed104053040722
17 Patch1:         %{name}-link.patch
18 URL:            http://zeromq.org/
19 BuildRequires:  asciidoc
20 BuildRequires:  autoconf >= 2.61
21 BuildRequires:  automake
22 BuildRequires:  curl-devel >= 7.28.0
23 BuildRequires:  libmicrohttpd-devel
24 BuildRequires:  libtool
25 BuildRequires:  libuuid-devel
26 BuildRequires:  lz4-devel
27 %if %{with python2}
28 BuildRequires:  python-devel >= 1:2.5
29 BuildRequires:  python-setuptools
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-devel >= 1:3.2
33 BuildRequires:  python3-setuptools
34 %endif
35 BuildRequires:  rpm-pythonprov
36 BuildRequires:  rpmbuild(macros) >= 1.714
37 %{?with_systemd:BuildRequires:  systemd-devel >= 1:200}
38 BuildRequires:  xmlto
39 BuildRequires:  zeromq-devel >= 4
40 Requires:       curl-libs >= 7.28.0
41 %{?with_systemd:Requires:       systemd-libs >= 1:200}
42 Requires:       zeromq >= 4
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 High-level C binding for 0MQ.
47
48 %description -l pl.UTF-8
49 Wysokopoziomowe wiązania C dla 0MQ.
50
51 %package devel
52 Summary:        Header files for CZMQ library
53 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki CZMQ
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       curl-devel >= 7.28.0
57 Requires:       libmicrohttpd-devel
58 Requires:       libuuid-devel
59 Requires:       lz4-devel
60 %{?with_systemd:Requires:       systemd-devel >= 1:200}
61 Requires:       zeromq-devel >= 4
62
63 %description devel
64 Header files for CZMQ library.
65
66 %description devel -l pl.UTF-8
67 Pliki nagłówkowe biblioteki CZMQ.
68
69 %package static
70 Summary:        Static CZMQ library
71 Summary(pl.UTF-8):      Statyczna biblioteka CZMQ
72 Group:          Development/Libraries
73 Requires:       %{name}-devel = %{version}-%{release}
74
75 %description static
76 Static CZMQ library.
77
78 %description static -l pl.UTF-8
79 Statyczna biblioteka CZMQ.
80
81 %package -n python-czmq
82 Summary:        Python 2 bindings for CZMQ
83 Summary(pl.UTF-8):      Wiązania Pythona 2 do CZMQ
84 Group:          Libraries/Python
85 Requires:       %{name} = %{version}-%{release}
86
87 %description -n python-czmq
88 Python 2 bindings for CZMQ - the high level C binding for 0MQ.
89
90 %description -n python-czmq -l pl.UTF-8
91 Wiązania Pythona 2 do CZMQ - wysokopoziomowego wiązania C do 0MQ.
92
93 %package -n python3-czmq
94 Summary:        Python 3 bindings for CZMQ
95 Summary(pl.UTF-8):      Wiązania Pythona 3 do CZMQ
96 Group:          Libraries/Python
97 Requires:       %{name} = %{version}-%{release}
98
99 %description -n python3-czmq
100 Python 3 bindings for CZMQ - the high level C binding for 0MQ.
101
102 %description -n python3-czmq -l pl.UTF-8
103 Wiązania Pythona 3 do CZMQ - wysokopoziomowego wiązania C do 0MQ.
104
105 %prep
106 %setup -q
107 %patch1 -p1
108
109 %build
110 %{__libtoolize}
111 %{__aclocal} -I config
112 %{__autoconf}
113 %{__autoheader}
114 %{__automake}
115 # use include subdir - file names could be too common (zfile.h etc.)
116 %configure \
117         --enable-bindings-python \
118         --enable-drafts \
119         --disable-silent-rules \
120         --includedir=%{_includedir}/czmq \
121         %{!?with_systemd:--with-libsystemd=no}
122 %{__make}
123
124 cd bindings/python
125
126 %if %{with python2}
127 %py_build
128 %endif
129
130 %if %{with python3}
131 %py3_build
132 %endif
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136
137 %{__make} install \
138         DESTDIR=$RPM_BUILD_ROOT
139
140 cd bindings/python
141
142 %if %{with python2}
143 %py_install
144
145 %py_postclean
146 %endif
147
148 %if %{with python3}
149 %py3_install
150 %endif
151
152 # obsoleted by pkg-config
153 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libczmq.la
154
155 %clean
156 rm -rf $RPM_BUILD_ROOT
157
158 %files
159 %defattr(644,root,root,755)
160 %doc AUTHORS NEWS README.md
161 %attr(755,root,root) %{_bindir}/zmakecert
162 %attr(755,root,root) %{_libdir}/libczmq.so.*.*.*
163 %attr(755,root,root) %ghost %{_libdir}/libczmq.so.4
164 %{_mandir}/man1/zmakecert.1*
165
166 %files devel
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_libdir}/libczmq.so
169 %{_includedir}/czmq
170 %{_pkgconfigdir}/libczmq.pc
171 %dir %{_datadir}/zproject
172 %{_datadir}/zproject/czmq
173 %{_mandir}/man3/zactor.3*
174 %{_mandir}/man3/zargs.3*
175 %{_mandir}/man3/zarmour.3*
176 %{_mandir}/man3/zauth.3*
177 %{_mandir}/man3/zbeacon.3*
178 %{_mandir}/man3/zcert.3*
179 %{_mandir}/man3/zcertstore.3*
180 %{_mandir}/man3/zchunk.3*
181 %{_mandir}/man3/zclock.3*
182 %{_mandir}/man3/zconfig.3*
183 %{_mandir}/man3/zdigest.3*
184 %{_mandir}/man3/zdir.3*
185 %{_mandir}/man3/zdir_patch.3*
186 %{_mandir}/man3/zfile.3*
187 %{_mandir}/man3/zframe.3*
188 %{_mandir}/man3/zgossip.3*
189 %{_mandir}/man3/zhash.3*
190 %{_mandir}/man3/zhashx.3*
191 %{_mandir}/man3/zhttp_client.3*
192 %{_mandir}/man3/zhttp_request.3*
193 %{_mandir}/man3/zhttp_response.3*
194 %{_mandir}/man3/zhttp_server.3*
195 %{_mandir}/man3/zhttp_server_options.3*
196 %{_mandir}/man3/ziflist.3*
197 %{_mandir}/man3/zlist.3*
198 %{_mandir}/man3/zlistx.3*
199 %{_mandir}/man3/zloop.3*
200 %{_mandir}/man3/zmonitor.3*
201 %{_mandir}/man3/zmsg.3*
202 %{_mandir}/man3/zpoller.3*
203 %{_mandir}/man3/zproc.3*
204 %{_mandir}/man3/zproxy.3*
205 %{_mandir}/man3/zrex.3*
206 %{_mandir}/man3/zsock.3*
207 %{_mandir}/man3/zstr.3*
208 %{_mandir}/man3/zsys.3*
209 %{_mandir}/man3/ztimerset.3*
210 %{_mandir}/man3/ztrie.3*
211 %{_mandir}/man3/zuuid.3*
212 %{_mandir}/man7/czmq.7*
213
214 %files static
215 %defattr(644,root,root,755)
216 %{_libdir}/libczmq.a
217
218 %if %{with python2}
219 %files -n python-czmq
220 %defattr(644,root,root,755)
221 %{py_sitescriptdir}/czmq
222 %{py_sitescriptdir}/czmq-%{version}-py*.egg-info
223 %endif
224
225 %if %{with python3}
226 %files -n python3-czmq
227 %defattr(644,root,root,755)
228 %{py3_sitescriptdir}/czmq
229 %{py3_sitescriptdir}/czmq-%{version}-py*.egg-info
230 %endif
This page took 0.101075 seconds and 4 git commands to generate.