Compare commits

...
Sign in to create a new pull request.

21 commits

Author SHA1 Message Date
Fedora Release Engineering
14daa18d17 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 09:40:03 +00:00
Björn Persson
770ed5d4e5 Rebuilt because GCC 16.0.1-0.10 broke ALI. 2026-03-28 23:37:39 +01:00
Fedora Release Engineering
a9a7a88140 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 21:07:41 +00:00
0cce2495c3 Make the generated project file architecture-independent 2026-01-15 21:14:57 +01:00
765d0c1647 Add the low-level binding generation step and an option to disable it 2026-01-15 21:14:57 +01:00
58bf2a3af4 Remove README.md as documentation, mark COPYING as license
The README-file doesn't contain any useful information for Fedora users.
2026-01-15 21:14:57 +01:00
5967ddb0cd Add a check section and an option to disable it 2026-01-15 21:14:57 +01:00
8bc5aca6dd Improve overall spec readability 2026-01-15 21:14:57 +01:00
89e51fa9eb Update summary and descriptions 2026-01-15 21:14:57 +01:00
7d4a2efc84 Simplify the build and installation 2026-01-15 21:14:57 +01:00
188d8acb55 Remove version requirement on zeromq and fedora-gnat-project-common
All Fedora releases that are currently supported contain a version of
ZeroMQ >= 2.1 and verion of fedora-gnat-project-common >= 2.
2026-01-15 21:14:57 +01:00
11bf7e690c Update SPDX license expression 2026-01-15 21:14:57 +01:00
1729460926 Update to 4.1.5, Git revision c9a0e98 (Nov 17, 2025) 2026-01-15 21:14:57 +01:00
21cad67a8d Update the URL 2026-01-09 19:50:36 +01:00
42040bac4a Remove unnecessary use of chrpath 2026-01-09 19:50:36 +01:00
24275de9b9 Remove useless %ldconfig_scriptlets 2026-01-09 19:50:36 +01:00
982f6dd3e4 Remove debug package creation opt-out 2026-01-09 19:50:34 +01:00
Fedora Release Engineering
2d047f5e45 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:17:41 +00:00
Fedora Release Engineering
219a9b4634 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:44:47 +00:00
Miroslav Suchý
cb4a0c1f79 convert GPLv2+ license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-07-26 04:04:21 +02:00
Fedora Release Engineering
b2f1308092 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 10:50:59 +00:00
9 changed files with 334 additions and 134 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
/zeromq-ada-24032011git.tar.gz
/zeromq-ada.tar.gz
/zeromq-ada-4.1.5.tar.gz
/zeromq-ada-c9a0e98.tar.gz

View file

@ -1 +1 @@
SHA512 (zeromq-ada-4.1.5.tar.gz) = c18fa9537eceda1a747890b671d6a0704ce24afe19087f410b40e082a20b4357c0ac3d8ef3ff3a004cc2591b98fb38ddfe6b69838dda914e582d09ad1fb912f0
SHA512 (zeromq-ada-c9a0e98.tar.gz) = 6b86be70c39ed30d4862374cee15fc7ba946ff4b9a773d0157cfcde1dadf255008b31bc9dfcc586b7f27e2c0f8fd3e3783c41aa40759648286f1d85f4be93a9a

View file

@ -0,0 +1,18 @@
--- a/examples/zmq-examples.gpr.inst
+++ b/examples/zmq-examples.gpr.inst
@@ -1,4 +1,6 @@
with "zmq.gpr";
+with "gnatcoll_core.gpr";
+
project ZMQ.Examples is
for Main use ("zmq-examples-client.adb",
@@ -10,7 +12,7 @@
for Exec_Dir use ".";
package Compiler is
- for Default_Switches ("ada") use ("-g", "-O2", "-gnatf", "-gnat05");
+ for Default_Switches ("ada") use ("-g", "-O2", "-gnatf");
end Compiler;
package Binder is

View file

@ -0,0 +1,28 @@
--- a/tests/zmq-tests.gpr
+++ b/tests/zmq-tests.gpr
@@ -1,7 +1,7 @@
with "zmq.gpr";
with "aunit.gpr";
-with "helpers/zmq-helpers.gpr";
-with "examples/zmq-examples.gpr";
+with "gnatcoll_core.gpr";
+with "../examples/zmq-examples.gpr";
project ZMQ.Tests is
@@ -19,15 +19,8 @@
for Default_Switches ("ada") use ("-k", "-j0");
end Builder;
- package Compiler is
- for Default_Switches ("ada") use Zmq.Compiler'Default_Switches ("ada") & ("-gnaty-s", "-gnata");
- end Compiler;
-
package Binder is
for Default_Switches ("ada") use ("-E");
end Binder;
- package Ide renames Zmq.Ide;
-
end ZMQ.Tests;
-

View file

@ -1,45 +0,0 @@
diff --git a/zmq.gpr.inst b/zmq.gpr.inst
index 748cab2..1667469 100644
--- a/zmq.gpr.inst
+++ b/zmq.gpr.inst
@@ -29,22 +29,21 @@
-- covered by the GNU Public License. --
-- --
------------------------------------------------------------------------------
-with "libzmq.gpr";
+with "directories";
+
project ZMQ is
- For Languages use ("Ada", "Makefile", "Python");
+ For Languages use ("Ada");
- type ZMQ_Kind_Type is ("static", "relocatable");
- ZMQ_Kind : ZMQ_Kind_Type := external ("LIBRARY_TYPE", "static");
+ type ZMQ_Kind_Type is ("relocatable");
+ ZMQ_Kind : ZMQ_Kind_Type := external ("LIBRARY_TYPE", "relocatable");
Version := "4.0.1";
for Library_Name use "zmqAda";
for Library_Version use "lib" & project'Library_Name & ".so." & Version;
- for Library_Dir use "../zmq/" & ZMQ_Kind;
- for Source_Dirs use ("../../include/zmq");
+ for Library_Dir use Directories.Libdir & "/zmq/" & ZMQ_Kind;
+ for Source_Dirs use (Directories.Includedir & "/zmq");
for Externally_Built use "True";
case ZMQ_Kind is
- when "static" =>
- for Library_Kind use "static";
when "relocatable" =>
for Library_Kind use "dynamic";
for Library_Auto_Init use "True";
@@ -57,5 +56,10 @@ project ZMQ is
"ZMQ.Utilities",
"ZMQ.Utilities.Memory_Streams");
end case;
+
+ package Linker is
+ for Linker_Options use ("-lzmq", "-lsodium");
+ end Linker;
+
end ZMQ;

View file

@ -1,28 +0,0 @@
diff --git a/Makefile b/Makefile
index 7c75354..0e76efb 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,6 @@ Makefile.config: configure
GNATMAKE = gprbuild ${GNATFLAGS} -p -f -R
compile:
- ${GNATMAKE} -P zmq.gpr -XLIBRARY_TYPE=static
${GNATMAKE} -P zmq.gpr -XLIBRARY_TYPE=relocatable
uninstall:
@@ -46,6 +45,7 @@ install: compile uninstall
cp -f src/zmq.ad* ${DESTDIR}/${PREFIX}/include/zmq
cp -f src/zmq-*.ad* ${DESTDIR}/${PREFIX}/include/zmq
+ cp -f src/gen/* ${DESTDIR}/${PREFIX}/include/zmq
chmod -w ${DESTDIR}/${PREFIX}/include/zmq/*.ad?
# (cd ${DESTDIR}/${PREFIX}/lib; for i in `find -name lib*.so*`; do ln -s $$i ; done)s
cp zmq.gpr.inst ${DESTDIR}/${ADA_PROJECT_DIR}/zmq.gpr
@@ -53,6 +53,7 @@ install: compile uninstall
mkdir -p ${DESTDIR}/${PREFIX}/share/zmq/examples/Ada
cp examples/zmq-examples*.ad* ${DESTDIR}/${PREFIX}/share/zmq/examples/Ada
cp examples/zmq-examples.gpr.inst ${DESTDIR}/${PREFIX}/share/zmq/examples/Ada/zmq-examples.gpr
+ cd ${DESTDIR}/${LIBDIR}/ && ln -s zmq/relocatable/libzmqAda.so* .
samples:
${GNATMAKE} -P examples/zmq-examples.gpr

View file

@ -0,0 +1,11 @@
--- a/zmq.gpr
+++ b/zmq.gpr
@@ -31,7 +31,7 @@
------------------------------------------------------------------------------
with "libzmq.gpr";
project ZMQ is
- for Languages use ("Ada", "Makefile", "Python");
+ for Languages use ("Ada");
type ZMQ_Kind_Type is ("static", "relocatable");
ZMQ_Kind : ZMQ_Kind_Type := external ("LIBRARY_TYPE", "static");

View file

@ -0,0 +1,25 @@
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,6 @@
(cd .temp;g++ -c -fdump-ada-spec -C x.c)
python rename.py .temp/zmq_h.ads
cp .temp/zmq_h.ads src/gen/zmq-low_level.ads
- gnatpp -rf -M128 --comments-special src/gen/*.ads
sed "s-Zmq.Low_Level-ZMQ.Low_Level-" -i src/gen/zmq-low_level.ads
chmod -w src/gen/*.ads
clean:
@@ -85,7 +84,7 @@
helpers/getinfo:$(wildcard src/*.ads)
cd helpers;gprbuild -p
-
+
tag:helpers/getinfo
@if [ -n "`git status --porcelain`" ] ; then \
echo "Folder is not clean";\
@@ -94,5 +93,3 @@
fi
@(VERSION=`helpers/getinfo --binding-version`-`date +%Y%m%d`;\
git tag $${VERSION})
-
-

View file

@ -1,81 +1,271 @@
%define debug_package %{nil}
%global git_commit fca30bb86f41e24d878c32ce399500f195513400
%global git_date 20200330
# The test suite is normally run. It can be disabled with "--without=check".
%bcond_without check
%global git_short_commit %(echo %{git_commit} | cut -c -8)
%global git_suffix %{git_date}git%{git_short_commit}
# The low-level bindings are normally regenerated. Regeneration can be disabled
# with "--without=generate".
%bcond_without generate
Name: zeromq-ada
Version: 4.1.5
Release: 12.git%{?dist}
Summary: Ada binding for zeromq
License: GPLv2+
URL: http://zeromq.org
Source0: https://github.com/persan/zeromq-Ada/archive/%{git_commit}/%{name}-%{version}.tar.gz
## Use shared libs instead static
Patch0: %{name}-libdir.patch
## Use directories.gpr
Patch1: %{name}-fedora.patch
BuildRequires: make
BuildRequires: fedora-gnat-project-common >= 2 zeromq-devel >= 2.1
BuildRequires: chrpath gcc-gnat gprbuild
Requires: zeromq >= 2.1
# gcc-gnat only available on these:
ExclusiveArch: %{GPRbuild_arches}
# Upstream source information.
%global upstream_owner persan
%global upstream_name zeromq-Ada
%global upstream_version 4.1.5
%global upstream_commit_date 20251117
%global upstream_commit c9a0e984b673ee61cbf86819c300d7d54f563fea
%global upstream_shortcommit %(c=%{upstream_commit}; echo ${c:0:7})
%description
Ada bindings for zeromq
Name: zeromq-ada
Version: %{upstream_version}^git%{upstream_commit_date}.%{upstream_shortcommit}
Release: 4%{?dist}
Summary: Ada binding for ZeroMQ
License: MIT
# According to the upstream commit history, the license of this library was
# changed to MIT on Apr 8, 2021 (upstream commit 651ca44).
URL: https://zeromq.org
Source0: https://github.com/%{upstream_owner}/%{upstream_name}/archive/%{upstream_commit}.tar.gz#/%{name}-%{upstream_shortcommit}.tar.gz
# [Fedora-specific] Remove Python and Makefile languages from the ZMQ
# GPRbuild-file. Both languages are used only during the development of the
# bindings/library and are of no relevance to the user of the bindings.
Patch: %{name}-remove-unnecessary-languages.patch
# [Fedora-specific] Indicate that the examples depend on GNATcoll Core.
Patch: %{name}-add-gnatcoll-core-dependency-to-zmq-example.patch
# [Fedora-specific] The gnatpp tool, a source code formatter tool which is part
# of the now obsolete ASIS-toolset, is not available in Fedora.
Patch: %{name}-skip-gnatpp-during-generate.patch
# [Fedora-specific] Update the GPRbuild project for building the test suite.
# Note that we want to run the test suite against the Ada bindings installed
# in the buildroot and must therefore remove any reference to packages that
# are only defined in the ZMQ project in the source tree.
#
# - Remove the `helpers' project; the dependency isn't used by any test.
# - Update the dependency from GNATcoll to GNATcoll Core.
# - Remove the compiler switches. They're inherited from the ZMQ project in
# the source tree. When building the testsuite, we'll use the switches of
# Fedora instead.
# - Remove the `Ide' package. The package is inherited from the the ZMQ
# project in the source tree and isn't needed when packaging the library.
#
Patch: %{name}-adjust-zmq-tests-project.patch
BuildRequires: gcc-gnat gprbuild
BuildRequires: fedora-gnat-project-common
BuildRequires: zeromq-devel
%if %{with generate}
BuildRequires: make gcc-g++ sed
BuildRequires: python3-devel
BuildRequires: python-unversioned-command
%endif
%if %{with check}
BuildRequires: aunit-devel
BuildRequires: gnatcoll-core-devel
BuildRequires: xmlada-devel
%endif
Requires: zeromq
# Build only on architectures where GPRbuild is available:
ExclusiveArch: %{GPRbuild_arches}
%global common_description_en \
The ZeroMQ lightweight messaging kernel is a library which extends the \
standard socket interfaces with features traditionally provided by specialized \
messaging middleware products. ZeroMQ sockets provide an abstraction of \
asynchronous message queues, multiple messaging patterns, message filtering \
(subscriptions), seamless access to multiple transport protocols and more.
%description %{common_description_en}
This package provides an Ada binding to the ZeroMQ library.
#################
## Subpackages ##
#################
%package devel
Summary: Devel package for Ada binding for zeromq
License: GPLv2+
Requires: fedora-gnat-project-common >= 2
Summary: Development package for the Ada binding for ZeroMQ
License: MIT AND GPL-2.0-or-later WITH GNAT-exception
# The license is MIT except for:
# - libzmq.gpr.in : GPLv2+ with GNAT runtime exception
# - zmq.gpr.inst : GPLv2+ with GNAT runtime exception
# - zmq.gpr : GPLv2+ with GNAT runtime exception
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: zeromq-devel >= 2.1
Requires: fedora-gnat-project-common
Requires: zeromq-devel
%description devel %{common_description_en}
This package contains source code and linking information for developing
applications that use the Ada binding for ZeroMQ. It also contains some
code examples.
#############
## Prepare ##
#############
%description devel
%{summary}
%prep
%setup -q -n zeromq-Ada-%{git_commit}
%patch -P0 -p1
%patch -P1 -p1
touch Makefile.config
cp -v libsodium.gpr.in libsodium.gpr
cp -v libzmq.gpr.in libzmq.gpr
%autosetup -C -p1
# Work with the GPRbuild-project to be used by users of the Ada bindings.
rm examples/zmq-examples.gpr
cp --preserve=timestamp examples/zmq-examples.gpr.inst \
examples/zmq-examples.gpr
# libzmq.gpr is needed by zmq.gpr.
cp libzmq.gpr.in libzmq.gpr
# Regenerate the low-level bindings.
%if %{with generate}
make generate
%endif
###########
## Build ##
###########
%build
make %{?_smp_mflags} GNATFLAGS="%{GNAT_optflags}" GNATMAKE="gprbuild -p -R %{GNAT_optflags}" PREFIX=/usr
## for tests aunit needed
# Build the library.
gprbuild %{GPRbuild_flags} -XLIBRARY_TYPE=relocatable -P zmq.gpr
#############
## Install ##
#############
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} ADA_PROJECT_DIR=%{_GNAT_project_dir} GNATFLAGS="%{GNAT_optflags}" PREFIX=/usr
rm -f %{buildroot}/%{_libdir}/zmq/static/libzmqAda.a
rm -rf %{buildroot}/%{_libdir}/zmq/static
chrpath --delete %{buildroot}%{_libdir}/zmq/relocatable/libzmqAda.so.%{version}
%ldconfig_scriptlets
# Install the library.
%{GPRinstall} -XLIBRARY_TYPE=relocatable -P zmq.gpr
# Fix up the symlink.
ln --symbolic --force libzmqAda.so.%{upstream_version} \
%{buildroot}%{_libdir}/libzmqAda.so
# Copy the examples.
mkdir --parents %{buildroot}%{_pkgdocdir}/examples
cp --preserve=timestamps examples/zmq-examples*.ad* \
%{buildroot}%{_pkgdocdir}/examples
cp --preserve=timestamps examples/zmq-examples.gpr \
%{buildroot}%{_pkgdocdir}/examples
# Before making the project files architecture-independent, copy the buildroot
# into a separate directory for later testing. The testsuite fails if applied to
# the buildroot after making the project files architecture-independent because
# of the hardcoded paths in `directories.gpr`.
%if %{with check}
%global checkroot %{_builddir}/%{name}-%{version}/checkroot
mkdir %{checkroot} # without --parents to not clobber any upstream directory
cp --recursive %{buildroot}/* %{checkroot}/
%endif
# Make the generated usage project file architecture-independent.
sed --regexp-extended --in-place \
'--expression=1i with "directories";' \
'--expression=/^-- This project has been generated/d' \
'--expression=/package Linker is/,/end Linker/d' \
'--expression=s|^( *for +Source_Dirs +use +).*;$|\1(Directories.Includedir \& "/'%{name}'");|i' \
'--expression=s|^( *for +Library_Dir +use +).*;$|\1Directories.Libdir;|i' \
'--expression=s|^( *for +Library_ALI_Dir +use +).*;$|\1Directories.Libdir \& "/'%{name}'";|i' \
%{buildroot}%{_GNAT_project_dir}/zmq.gpr
# The Sed commands are:
# 1: Insert a with clause before the first line to import the directories
# project.
# 2: Delete a comment that mentions the architecture.
# 3: Delete the package Linker, which contains linker parameters that a
# shared library normally doesn't need, and can contain architecture-
# specific pathnames.
# 4: Replace the value of Source_Dirs with a pathname based on
# Directories.Includedir.
# 5: Replace the value of Library_Dir with Directories.Libdir.
# 6: Replace the value of Library_ALI_Dir with a pathname based on
# Directories.Libdir.
###########
## Check ##
###########
%if %{with check}
%check
# Make the files of this packages visible to the test runner.
export PATH=%{checkroot}%{_bindir}:$PATH
export LD_LIBRARY_PATH=%{checkroot}%{_libdir}:$LD_LIBRARY_PATH
export GPR_PROJECT_PATH=%{checkroot}%{_GNAT_project_dir}:$GPR_PROJECT_PATH
cd tests
# Build the test suite.
gprbuild %{GPRbuild_flags} -P zmq-tests.gpr -cargs -fPIE
# Run the test suite.
bin/test_all
%endif
###########
## Files ##
###########
%files
%doc README.md COPYING
%dir %{_libdir}/zmq
%dir %{_libdir}/zmq/relocatable
%{_libdir}/zmq/relocatable/libzmqAda.so.%{version}
%{_libdir}/libzmqAda.so.*
%license COPYING
%{_libdir}/libzmqAda.so.%{upstream_version}
%files devel
%{_libdir}/zmq/relocatable/libzmqAda.so
%{_libdir}/libzmqAda.so
%dir %{_includedir}/zmq/
%{_includedir}/zmq/*.adb
%{_includedir}/zmq/*.ads
%{_GNAT_project_dir}/zmq.gpr
%{_libdir}/zmq/relocatable/*.ali
%{_datadir}/zmq/*
%{_includedir}/%{name}
%dir %{_libdir}/%{name}
%attr(444,-,-) %{_libdir}/%{name}/*.ali
%{_libdir}/libzmqAda.so
%{_pkgdocdir}/examples
###############
## Changelog ##
###############
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5^git20251117.c9a0e98-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Mar 28 2026 Björn Persson <Bjorn@Rombobjörn.se> - 4.1.5^git20251117.c9a0e98-3
- Rebuilt because GCC 16.0.1-0.10 broke ALI.
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5^git20251117.c9a0e98-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jan 09 2026 Dennis van Raaij <dvraaij@fedoraproject.org> - 4.1.5^git20251117.c9a0e98-1
- Removed debug package creation opt-out.
- Updated to Git revision c9a0e98 (Nov 17, 2025).
- Updated the SPDX license expression.
- The examples can now be found in the package documentation directory.
- All package summaries and descriptions have been updated.
- The README-file has been removed from the package as it doesn't contain any
useful information for Fedora users.
- The license file can now be found in the package license directory.
- Made the generated project file architecture-independent.
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5-16.git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5-15.git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 4.1.5-14.git
- convert license to SPDX
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5-13.git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.5-12.git
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
@ -159,7 +349,7 @@ chrpath --delete %{buildroot}%{_libdir}/zmq/relocatable/libzmqAda.so.%{version}
- Use GNAT_arches rather than an explicit list
* Sun Apr 20 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 2.1.0-13.24032011git
- Rebuild with new GCC
- Rebuild with new GCC
* Sun Mar 02 2014 Pavel Zhukov <landgraf@fedoraproject.org> - 2.1.0-12.24032011git
- Fix library finalization. https://github.com/persan/zeromq-Ada/issues/10