[packages/nng] new

bszx bszx at pld-linux.org
Thu Apr 16 22:43:19 CEST 2026


commit 2fd50e11231d768a9050c365a7490bacb2ddeef4
Author: Bartek Szady <bszx at bszx.eu>
Date:   Thu Apr 16 22:39:38 2026 +0200

    new

 install.patch | 12 ++++++++
 nng.spec      | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)
---
diff --git a/nng.spec b/nng.spec
new file mode 100644
index 0000000..d18c20d
--- /dev/null
+++ b/nng.spec
@@ -0,0 +1,97 @@
+# Conditional build:
+%bcond_with	tests		# build with tests
+
+Summary:	Light-weight brokerless messaging
+Summary(pl.UTF-8):	-
+Name:		nng
+Version:	1.11
+Release:	0.1
+License:	MIT
+Group:		Libraries
+Source0:	https://github.com/nanomsg/nng/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	e901b96cbf0626076f2b05ffbc2012b8
+Patch0:		install.patch
+URL:		https://nanomsg.github.io/nng/
+BuildRequires:	cmake
+BuildRequires:	mbedtls-devel
+BuildRequires:	rpmbuild(macros) >= 1.605
+BuildRequires:	ruby-asciidoctor
+
+%description
+nng (nanomsg next generation) 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.
+
+%package  devel
+Summary:	Header files for %{name} library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki %{name}
+Group:		Development/Libraries
+Requires:	%{name} = %{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 nng
+Requires:	%{name} = %{version}-%{release}
+
+%description utils
+Includes nngcat, a simple utility for reading and writing to nanomsg
+sockets and bindings, which can include local and remote connections.
+
+%prep
+%setup -q
+
+%patch -P0 -p1
+
+%build
+%cmake -B build \
+	-DBUILD_SHARED_LIBS=ON \
+	-DNNG_ENABLE_TLS=ON \
+	-DNNG_ENABLE_NNGCAT=ON \
+	-DNNG_TESTS=%{!?with_tests:OFF}%{?with_tests:ON} \
+	-DNNG_ENABLE_DOC=ON
+
+%{__make} -C build
+
+%{?with_tests:%{__make} -C build test ARGS=--output-on-failure}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.adoc UKRAINE.adoc LICENSE.txt
+%{_libdir}/libnng.so.1*
+
+%files devel
+%defattr(644,root,root,755)
+%{_docdir}/nng/
+%{_includedir}/nng/
+%{_libdir}/libnng.so
+%{_libdir}/cmake/nng/
+%{_mandir}/man3/*.3.*
+%{_mandir}/man5/*.5.*
+%{_mandir}/man7/*.7.*
+
+%files utils
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/nngcat
+%{_mandir}/man1/nngcat.1*
+
diff --git a/install.patch b/install.patch
new file mode 100644
index 0000000..1c04179
--- /dev/null
+++ b/install.patch
@@ -0,0 +1,12 @@
+diff -up nng-1.11/docs/man/CMakeLists.txt._orig nng-1.11/docs/man/CMakeLists.txt
+--- nng-1.11/docs/man/CMakeLists.txt._orig	2025-06-02 16:33:39.000000000 +0200
++++ nng-1.11/docs/man/CMakeLists.txt	2026-04-14 20:02:02.972653391 +0200
+@@ -46,7 +46,7 @@ if (NNG_ENABLE_DOC)
+ 
+         install(
+                 FILES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECT}.html
+-                DESTINATION ${CMAKE_INSTALL_DOCDIR}
++                DESTINATION ${CMAKE_INSTALL_DOCDIR}/nng
+         )
+         install(
+                 FILES ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.${SECT}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nng.git/commitdiff/2fd50e11231d768a9050c365a7490bacb2ddeef4



More information about the pld-cvs-commit mailing list