Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RPM spec file for nanomsg 1.0.0
# Don't create static libraries (unless we want to)
%bcond_with static
Name: nanomsg
Version: 1.0.0
Release: 1%{?dist}
Summary: A fast, scalable, and easy to use socket library
Group: System Environment/Libraries
License: MIT
BuildRequires: rubygem-asciidoctor xmlto cmake
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
nanomsg is a socket library that provides several common communication
patterns. It aims to make the networking layer fast, scalable, and easy
to use. Implemented in C, it works on a wide range of operating systems
with no further dependencies.
The communication patterns, also called "scalability protocols", are
basic blocks for building distributed systems. By combining them you can
create a vast array of distributed applications.
%if %{with static}
%package static
Summary: Libraries for static linking of applications which will use nanomsg
Group: Development/Libraries
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description static
nanomsg is a socket library that provides several common communication
patterns. The nanomsg-static package includes static libraries needed to
link and develop applications using this library.
Most users will not need to install this package.
%package devel
Summary: Development files for the nanomsg socket library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains files needed to develop applications using nanomsg,
a socket library that provides several common communication patterns.
%package utils
Summary: Command line interface for communicating with nanomsg
Group: Applications/Internet
%description utils
Includes nanocat, a simple utility for reading and writing to nanomsg
sockets and bindings, which can include local and remote connections.
%setup -q -n %{name}-%{version}
# Enabling static library build disables the dynamic library.
# First configure and build the static library, then reconfigure and build
# the dynamic libs, tools and docs afterwards instead of patching CMake build files
%if %{with static}
make %{?_smp_mflags} V=1
make %{?_smp_mflags} V=1
rm -fR %{buildroot}
make install DESTDIR="%{buildroot}"
make test LD_LIBRARY_PATH="%{buildroot}%{_libdir}" DESTDIR="%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
rm -fR %{buildroot}
%if %{with static}
%files static
%files devel
%files utils
* Sat Apr 1 2017 Tarjei Knapstad <> - 1.0.0-1
- Updated to 1.0.0 final release
- nanomsg moved to CMake, so this spec did too
- Changed source URL
- Moved contents of -doc package into -devel
- Removed conditional check, all tests should pass
- The nanocat symlink stuff is gone, nanocat is now a single binary with options
* Tue Oct 27 2015 Japheth Cleaver <> 0.7-0.1.beta
- update to 0.7-beta release
* Fri Nov 14 2014 Japheth Cleaver <> 0.5-0.1.beta
- update to 0.5-beta release
* Sun Jul 27 2014 Japheth Cleaver <> 0.4-0.3.beta
- compile with correct Fedora flags
- move documentation back to base package
- spec file cleanups
* Thu Jul 17 2014 Japheth Cleaver <> 0.4-0.2.beta
- drop the 'lib' prefix from package name
- remove explicit pkgconfig requires in nanomsg-devel
- move overview man pages to devel subpackage
- move html to doc subpackage
* Thu Jul 17 2014 Japheth Cleaver <> 0.4-0.1.beta
- new "libnanomsg" package based on BZ#1012392, with current versioning
- devel and utils subpackages created, static lib a build conditional
- check section added as a build conditional
- ensure man pages for nanocat symlinks present
- disable RPATH in library
- License set to MIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment