zeromq.spec 5.76 KB
Newer Older
1
%define lib_name libzmq5
Mikko Koppanen's avatar
Mikko Koppanen committed
2
Name:          zeromq
3
Version:       4.2.0
Mikko Koppanen's avatar
Mikko Koppanen committed
4
Release:       1%{?dist}
Martin Lucina's avatar
Martin Lucina committed
5
Summary:       The ZeroMQ messaging library
Mikko Koppanen's avatar
Mikko Koppanen committed
6 7 8
Group:         Applications/Internet
License:       LGPLv3+
URL:           http://www.zeromq.org/
9
Source:        http://download.zeromq.org/%{name}-%{version}.tar.gz
Mikko Koppanen's avatar
Mikko Koppanen committed
10 11
Prefix:        %{_prefix}
Buildroot:     %{_tmppath}/%{name}-%{version}-%{release}-root
12
BuildRequires:  autoconf automake libtool libsodium-devel glib2-devel
13 14 15 16 17 18 19 20 21 22
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
BuildRequires:  e2fsprogs-devel
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%else
BuildRequires:  libuuid-devel
%endif
%if %{with pgm}
BuildRequires:  openpgm-devel
BuildRequires:  krb5-devel
%endif
23
BuildRequires: gcc, make, gcc-c++, libstdc++-devel, asciidoc, xmlto
24 25
Requires:      libstdc++

26 27
#
# Conditional build options
28
# Default values are:
29
#    --without-libgssapi_krb5
30 31 32 33 34
#    --without-libsodium
#    --without-pgm
#

# If neither macro exists, use the default value.
35
%{!?_with_libgssapi_krb5: %{!?_without_libgssapi_krb5: %define _without_libgssapi_krb5 --without-liblibgssapi_krb5}}
36 37 38 39
%{!?_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
40
%{?_with_libgssapi_krb5: %{?_without_libgssapi_krb5: %{error: both _with_libgssapi_krb5 and _without_libgssapi_krb5}}}
41 42 43
%{?_with_libsodium: %{?_without_libsodium: %{error: both _with_libsodium and _without_libsodium}}}
%{?_with_pgm: %{?_without_pgm: %{error: both _with_pgm and _without_pgm}}}

44 45
%{?_with_libgssapi_krb5:BuildRequires: krb5-devel}
%{?_with_libgssapi_krb5:Requires: krb5-libs}
46

47 48 49 50 51 52
%{?_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
53
%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64
54 55
%{!?_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
56 57 58
%endif

%description
Martin Lucina's avatar
Martin Lucina committed
59 60 61 62 63 64 65
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.

66 67 68 69 70 71 72 73 74 75 76 77 78
%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
79
This package contains the ZeroMQ shared library.
Mikko Koppanen's avatar
Mikko Koppanen committed
80 81

%package devel
Martin Lucina's avatar
Martin Lucina committed
82
Summary:  Development files and static library for the ZeroMQ library
Mikko Koppanen's avatar
Mikko Koppanen committed
83
Group:    Development/Libraries
84
Requires: %{lib_name} = %{version}-%{release}, pkgconfig
Mikko Koppanen's avatar
Mikko Koppanen committed
85 86

%description devel
Martin Lucina's avatar
Martin Lucina committed
87 88 89 90 91 92
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
93

Martin Lucina's avatar
Martin Lucina committed
94
This package contains ZeroMQ related development libraries and header files.
Mikko Koppanen's avatar
Mikko Koppanen committed
95 96 97 98

%prep
%setup -q

99 100 101 102 103
# 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
104
%build
105
autoreconf -fi
106 107 108 109 110
%configure \
    %{?_with_libsodium} \
    %{?_without_libsodium} \
    %{?_with_pgm} \
    %{?_without_pgm} \
111 112
    %{?_with_libgssapi_krb5} \
    %{?_without_libgssapi_krb5} \
113 114 115 116
    %{?_with_pic} \
    %{?_without_pic} \
    %{?_with_gnu_ld} \
    %{?_without_gnu_ld}
Mikko Koppanen's avatar
Mikko Koppanen committed
117 118 119 120 121 122 123

%{__make} %{?_smp_mflags}

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

# Install the package to build area
124
%{__make} check
Mikko Koppanen's avatar
Mikko Koppanen committed
125 126 127 128 129 130 131 132 133 134 135
%makeinstall

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

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

136
%files -n %{lib_name}
Mikko Koppanen's avatar
Mikko Koppanen committed
137 138 139
%defattr(-,root,root,-)

# docs in the main package
140
%doc AUTHORS COPYING COPYING.LESSER NEWS
Mikko Koppanen's avatar
Mikko Koppanen committed
141 142

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

Mikko Koppanen's avatar
Mikko Koppanen committed
145 146 147 148 149
%{_mandir}/man7/zmq.7.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/zmq.h
Min RK's avatar
Min RK committed
150
%{_includedir}/zmq_utils.h
Mikko Koppanen's avatar
Mikko Koppanen committed
151 152 153 154 155 156

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

157 158
%{_mandir}/man3/zmq*
%{_mandir}/man7/zmq_curve.7.gz
Mikko Koppanen's avatar
Mikko Koppanen committed
159 160
%{_mandir}/man7/zmq_inproc.7.gz
%{_mandir}/man7/zmq_ipc.7.gz
161
%{_mandir}/man7/zmq_null.7.gz
162
%{_mandir}/man7/zmq_pgm.7.gz
163
%{_mandir}/man7/zmq_plain.7.gz
164
%{_mandir}/man7/zmq_tcp.7.gz
165
%{_mandir}/man7/zmq_tipc.7.gz
166 167
%{_mandir}/man7/zmq_udp.7.gz
%{_mandir}/man7/zmq_vmci.7.gz
Mikko Koppanen's avatar
Mikko Koppanen committed
168 169

%changelog
170 171 172
* Sun Jul 31 2016 Luca Boccassi <luca.boccassi@gmail.com>
- Follow RPM standards and rename zeromq to libzmq5

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

176 177 178 179
* Sat Oct 18 2014 J.T. Conklin <jtc@acorntoolworks.com>
- Add --with/--without pgm support
- Add --with/--without libsodium support

180 181 182
* Tue Jun 10 2014 Tristian Celestin <tristian.celestin@outlook.com> 4.0.4
- Updated packaged files

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

186 187 188
* 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
189 190
* Sat Apr 10 2010 Mikko Koppanen <mkoppanen@php.net> 2.0.7-1
- Initial packaging