zeromq.spec 7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
# To build with draft APIs, use "--with drafts" in rpmbuild for local builds or add
#   Macros:
#   %_with_drafts 1
# at the BOTTOM of the OBS prjconf
%bcond_with drafts
%if %{with drafts}
%define DRAFTS yes
%else
%define DRAFTS no
%endif
11
%define lib_name libzmq5
Mikko Koppanen's avatar
Mikko Koppanen committed
12
Name:          zeromq
13
Version:       4.3.1
Mikko Koppanen's avatar
Mikko Koppanen committed
14
Release:       1%{?dist}
Martin Lucina's avatar
Martin Lucina committed
15
Summary:       The ZeroMQ messaging library
Mikko Koppanen's avatar
Mikko Koppanen committed
16 17 18
Group:         Applications/Internet
License:       LGPLv3+
URL:           http://www.zeromq.org/
19
Source:        http://download.zeromq.org/%{name}-%{version}.tar.gz
Mikko Koppanen's avatar
Mikko Koppanen committed
20 21
Prefix:        %{_prefix}
Buildroot:     %{_tmppath}/%{name}-%{version}-%{release}-root
22
BuildRequires:  autoconf automake libtool libsodium-devel glib2-devel
23 24 25 26
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
BuildRequires:  e2fsprogs-devel
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%endif
27
%bcond_with pgm
28 29
%if %{with pgm}
BuildRequires:  openpgm-devel
30 31 32 33 34 35
%define PGM yes
%else
%define PGM no
%endif
%bcond_with libgssapi_krb5
%if %{with libgssapi_krb5}
36
BuildRequires:  krb5-devel
37 38 39 40 41 42 43 44 45 46
%define GSSAPI yes
%else
%define GSSAPI no
%endif
%bcond_with libsodium
%if %{with libsodium}
BuildRequires:  libsodium-devel
%define SODIUM yes
%else
%define SODIUM no
47
%endif
48
BuildRequires: gcc, make, gcc-c++, libstdc++-devel, asciidoc, xmlto
49 50
Requires:      libstdc++

51 52
#
# Conditional build options
53
# Default values are:
54
#    --without-libgssapi_krb5
55 56 57 58 59
#    --without-libsodium
#    --without-pgm
#

# If neither macro exists, use the default value.
60
%{!?_with_libgssapi_krb5: %{!?_without_libgssapi_krb5: %define _without_libgssapi_krb5 --without-liblibgssapi_krb5}}
61 62 63 64
%{!?_with_libsodium: %{!?_without_libsodium: %define _without_libsodium --without-libsodium}}
%{!?_with_pgm: %{!?_without_pgm: %define _without_pgm --without-pgm}}

# It's an error if both --with and --without options are specified
65
%{?_with_libgssapi_krb5: %{?_without_libgssapi_krb5: %{error: both _with_libgssapi_krb5 and _without_libgssapi_krb5}}}
66 67 68
%{?_with_libsodium: %{?_without_libsodium: %{error: both _with_libsodium and _without_libsodium}}}
%{?_with_pgm: %{?_without_pgm: %{error: both _with_pgm and _without_pgm}}}

69 70
%{?_with_libgssapi_krb5:BuildRequires: krb5-devel}
%{?_with_libgssapi_krb5:Requires: krb5-libs}
71

72 73 74 75 76 77
%{?_with_libsodium:BuildRequires: libsodium-devel}
%{?_with_libsodium:Requires: libsodium}

%{?_with_pgm:BuildRequires: openpgm-devel}
%{?_with_pgm:Requires: openpgm}

Mikko Koppanen's avatar
Mikko Koppanen committed
78
%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64
79 80
%{!?_with_pic: %{!?_without_pic: %define _with_pic --with-pic}}
%{!?_with_gnu_ld: %{!?_without_gnu_ld: %define _with_gnu_ld --with-gnu_ld}}
Mikko Koppanen's avatar
Mikko Koppanen committed
81 82
%endif

83 84 85
# We do not want to ship libzmq.la
%define _unpackaged_files_terminate_build 0

Mikko Koppanen's avatar
Mikko Koppanen committed
86
%description
Martin Lucina's avatar
Martin Lucina committed
87 88 89 90 91 92 93
The 0MQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products. 0MQ sockets provide an
abstraction of asynchronous message queues, multiple messaging
patterns, message filtering (subscriptions), seamless access to
multiple transport protocols and more.

94 95 96 97 98 99 100 101 102 103 104 105 106
%package -n %{lib_name}
Summary:   Shared Library for ZeroMQ
Group:     Productivity/Networking/Web/Servers
Conflicts: zeromq

%description -n %{lib_name}
The 0MQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products. 0MQ sockets provide an
abstraction of asynchronous message queues, multiple messaging
patterns, message filtering (subscriptions), seamless access to
multiple transport protocols and more.

Martin Lucina's avatar
Martin Lucina committed
107
This package contains the ZeroMQ shared library.
Mikko Koppanen's avatar
Mikko Koppanen committed
108 109

%package devel
Martin Lucina's avatar
Martin Lucina committed
110
Summary:  Development files and static library for the ZeroMQ library
Mikko Koppanen's avatar
Mikko Koppanen committed
111
Group:    Development/Libraries
112
Requires: %{lib_name} = %{version}-%{release}, pkgconfig
Mikko Koppanen's avatar
Mikko Koppanen committed
113 114

%description devel
Martin Lucina's avatar
Martin Lucina committed
115 116 117 118 119 120
The 0MQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products. 0MQ sockets provide an
abstraction of asynchronous message queues, multiple messaging
patterns, message filtering (subscriptions), seamless access to
multiple transport protocols and more.
Mikko Koppanen's avatar
Mikko Koppanen committed
121

Martin Lucina's avatar
Martin Lucina committed
122
This package contains ZeroMQ related development libraries and header files.
Mikko Koppanen's avatar
Mikko Koppanen committed
123

124 125 126 127 128 129 130 131 132 133 134 135 136 137
%package -n libzmq-tools
Summary:   ZeroMQ tools
Group:     Productivity/Networking/Web/Servers

%description -n libzmq-tools
The 0MQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products. 0MQ sockets provide an
abstraction of asynchronous message queues, multiple messaging
patterns, message filtering (subscriptions), seamless access to
multiple transport protocols and more.

This package contains tools such as curve_keygen to use with libzmq.

Mikko Koppanen's avatar
Mikko Koppanen committed
138 139 140
%prep
%setup -q

141 142 143 144 145
# Sed version number of openpgm into configure
%global openpgm_pc $(basename %{_libdir}/pkgconfig/openpgm*.pc .pc)
sed -i "s/openpgm-[0-9].[0-9]/%{openpgm_pc}/g" \
    configure*

Mikko Koppanen's avatar
Mikko Koppanen committed
146
%build
147 148
# Workaround for automake < 1.14 bug
mkdir -p config
149
autoreconf -fi
150
%configure --enable-drafts=%{DRAFTS} \
151 152 153
    --with-pgm=%{PGM} \
    --with-libsodium=%{SODIUM} \
    --with-libgssapi_krb5=%{GSSAPI} \
154 155 156 157
    %{?_with_pic} \
    %{?_without_pic} \
    %{?_with_gnu_ld} \
    %{?_without_gnu_ld}
Mikko Koppanen's avatar
Mikko Koppanen committed
158 159 160 161 162 163 164

%{__make} %{?_smp_mflags}

%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

# Install the package to build area
165
%{__make} check
Mikko Koppanen's avatar
Mikko Koppanen committed
166 167 168 169 170 171 172 173 174 175 176
%makeinstall

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

177
%files -n %{lib_name}
Mikko Koppanen's avatar
Mikko Koppanen committed
178 179 180
%defattr(-,root,root,-)

# docs in the main package
181
%doc AUTHORS COPYING COPYING.LESSER NEWS
Mikko Koppanen's avatar
Mikko Koppanen committed
182 183

# libraries
184
%{_libdir}/libzmq.so.*
Pieter Hintjens's avatar
Pieter Hintjens committed
185

Mikko Koppanen's avatar
Mikko Koppanen committed
186 187 188 189 190
%{_mandir}/man7/zmq.7.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/zmq.h
Min RK's avatar
Min RK committed
191
%{_includedir}/zmq_utils.h
Mikko Koppanen's avatar
Mikko Koppanen committed
192 193 194 195 196

%{_libdir}/libzmq.a
%{_libdir}/pkgconfig/libzmq.pc
%{_libdir}/libzmq.so

197
%{_mandir}/man3/zmq*
198 199
# skip man7/zmq.7.gz
%{_mandir}/man7/zmq_*
Mikko Koppanen's avatar
Mikko Koppanen committed
200

201 202 203 204
%files -n libzmq-tools
%defattr(-,root,root,-)
%{_bindir}/curve_keygen

Mikko Koppanen's avatar
Mikko Koppanen committed
205
%changelog
206 207 208 209 210
* Sat Aug 19 2017 Luca Boccassi <luca.boccassi@gmail.com>
- Fix parsing and usage of conditionals for sodium/pgm/krb5 so that they work
  in OBS
- Do not ship libzmq.la anymore, it's not needed and causes overlinking

211 212 213
* Sun Nov 06 2016 Luca Boccassi <luca.boccassi@gmail.com>
- Add libzmq-tool to package curve_keygen in /usr/bin

214 215 216
* Sun Jul 31 2016 Luca Boccassi <luca.boccassi@gmail.com>
- Follow RPM standards and rename zeromq to libzmq5

217 218 219
* Sat Oct 25 2014 Phillip Mienk <mienkphi@gmail.com>
- Add --with/--without libgssapi_krb5 support following J.T.Conklin's pattern

220 221 222 223
* Sat Oct 18 2014 J.T. Conklin <jtc@acorntoolworks.com>
- Add --with/--without pgm support
- Add --with/--without libsodium support

224 225 226
* Tue Jun 10 2014 Tristian Celestin <tristian.celestin@outlook.com> 4.0.4
- Updated packaged files

Ian Barber's avatar
Ian Barber committed
227 228 229
* Mon Nov 26 2012 Justin Cook <jhcook@gmail.com> 3.2.2
- Update packaged files

230 231 232
* Fri Apr 8 2011 Mikko Koppanen <mikko@kuut.io> 3.0.0-1
- Update dependencies and packaged files

Mikko Koppanen's avatar
Mikko Koppanen committed
233 234
* Sat Apr 10 2010 Mikko Koppanen <mkoppanen@php.net> 2.0.7-1
- Initial packaging