zeromq.spec 6.71 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.2.3
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 27 28 29 30
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
BuildRequires:  e2fsprogs-devel
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%endif
%if %{with pgm}
BuildRequires:  openpgm-devel
BuildRequires:  krb5-devel
%endif
31
BuildRequires: gcc, make, gcc-c++, libstdc++-devel, asciidoc, xmlto
32 33
Requires:      libstdc++

34 35
#
# Conditional build options
36
# Default values are:
37
#    --without-libgssapi_krb5
38 39 40 41 42
#    --without-libsodium
#    --without-pgm
#

# If neither macro exists, use the default value.
43
%{!?_with_libgssapi_krb5: %{!?_without_libgssapi_krb5: %define _without_libgssapi_krb5 --without-liblibgssapi_krb5}}
44 45 46 47
%{!?_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
48
%{?_with_libgssapi_krb5: %{?_without_libgssapi_krb5: %{error: both _with_libgssapi_krb5 and _without_libgssapi_krb5}}}
49 50 51
%{?_with_libsodium: %{?_without_libsodium: %{error: both _with_libsodium and _without_libsodium}}}
%{?_with_pgm: %{?_without_pgm: %{error: both _with_pgm and _without_pgm}}}

52 53
%{?_with_libgssapi_krb5:BuildRequires: krb5-devel}
%{?_with_libgssapi_krb5:Requires: krb5-libs}
54

55 56 57 58 59 60
%{?_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
61
%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64
62 63
%{!?_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
64 65 66
%endif

%description
Martin Lucina's avatar
Martin Lucina committed
67 68 69 70 71 72 73
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.

74 75 76 77 78 79 80 81 82 83 84 85 86
%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
87
This package contains the ZeroMQ shared library.
Mikko Koppanen's avatar
Mikko Koppanen committed
88 89

%package devel
Martin Lucina's avatar
Martin Lucina committed
90
Summary:  Development files and static library for the ZeroMQ library
Mikko Koppanen's avatar
Mikko Koppanen committed
91
Group:    Development/Libraries
92
Requires: %{lib_name} = %{version}-%{release}, pkgconfig
Mikko Koppanen's avatar
Mikko Koppanen committed
93 94

%description devel
Martin Lucina's avatar
Martin Lucina committed
95 96 97 98 99 100
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
101

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

104 105 106 107 108 109 110 111 112 113 114 115 116 117
%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
118 119 120
%prep
%setup -q

121 122 123 124 125
# 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
126
%build
127
autoreconf -fi
128
%configure --enable-drafts=%{DRAFTS} \
129 130 131 132
    %{?_with_libsodium} \
    %{?_without_libsodium} \
    %{?_with_pgm} \
    %{?_without_pgm} \
133 134
    %{?_with_libgssapi_krb5} \
    %{?_without_libgssapi_krb5} \
135 136 137 138
    %{?_with_pic} \
    %{?_without_pic} \
    %{?_with_gnu_ld} \
    %{?_without_gnu_ld}
Mikko Koppanen's avatar
Mikko Koppanen committed
139 140 141 142 143 144 145

%{__make} %{?_smp_mflags}

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

# Install the package to build area
146
%{__make} check
Mikko Koppanen's avatar
Mikko Koppanen committed
147 148 149 150 151 152 153 154 155 156 157
%makeinstall

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

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

158
%files -n %{lib_name}
Mikko Koppanen's avatar
Mikko Koppanen committed
159 160 161
%defattr(-,root,root,-)

# docs in the main package
162
%doc AUTHORS COPYING COPYING.LESSER NEWS
Mikko Koppanen's avatar
Mikko Koppanen committed
163 164

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

Mikko Koppanen's avatar
Mikko Koppanen committed
167 168 169 170 171
%{_mandir}/man7/zmq.7.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/zmq.h
Min RK's avatar
Min RK committed
172
%{_includedir}/zmq_utils.h
Mikko Koppanen's avatar
Mikko Koppanen committed
173 174 175 176 177 178

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

179 180
%{_mandir}/man3/zmq*
%{_mandir}/man7/zmq_curve.7.gz
Mikko Koppanen's avatar
Mikko Koppanen committed
181 182
%{_mandir}/man7/zmq_inproc.7.gz
%{_mandir}/man7/zmq_ipc.7.gz
183
%{_mandir}/man7/zmq_null.7.gz
184
%{_mandir}/man7/zmq_pgm.7.gz
185
%{_mandir}/man7/zmq_plain.7.gz
186
%{_mandir}/man7/zmq_tcp.7.gz
187
%{_mandir}/man7/zmq_tipc.7.gz
188 189
%{_mandir}/man7/zmq_udp.7.gz
%{_mandir}/man7/zmq_vmci.7.gz
Mikko Koppanen's avatar
Mikko Koppanen committed
190

191 192 193 194
%files -n libzmq-tools
%defattr(-,root,root,-)
%{_bindir}/curve_keygen

Mikko Koppanen's avatar
Mikko Koppanen committed
195
%changelog
196 197 198
* Sun Nov 06 2016 Luca Boccassi <luca.boccassi@gmail.com>
- Add libzmq-tool to package curve_keygen in /usr/bin

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

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

205 206 207 208
* Sat Oct 18 2014 J.T. Conklin <jtc@acorntoolworks.com>
- Add --with/--without pgm support
- Add --with/--without libsodium support

209 210 211
* Tue Jun 10 2014 Tristian Celestin <tristian.celestin@outlook.com> 4.0.4
- Updated packaged files

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

215 216 217
* 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
218 219
* Sat Apr 10 2010 Mikko Koppanen <mkoppanen@php.net> 2.0.7-1
- Initial packaging