1
0
forked from pool/libexmdbpp
Files
libexmdbpp/libexmdbpp.spec

148 lines
4.0 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package libexmdbpp
#
2025-07-15 10:05:35 +02:00
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define lname libexmdbpp0
Name: libexmdbpp
Version: 1.11.0.58baa16
Release: 0
Summary: A C++ implementation of the exmdb wire protocol
License: AGPL-3.0-or-later
Group: Productivity/Networking/Email/Servers
URL: https://grommunio.com/
Source: %name-%version.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
2025-07-15 10:05:35 +02:00
%if 0%{?rhel} || 0%{?fedora_version}
BuildRequires: pkgconfig(python3)
2025-07-15 10:05:35 +02:00
BuildRequires: pybind11-devel
BuildRequires: python3
%endif
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
2025-07-16 18:50:15 +02:00
%define skip_python2 1
2025-07-15 10:05:35 +02:00
%{?sle15allpythons}
BuildRequires: python3-rpm-macros
BuildRequires: %{python_module base}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pybind11-devel}
%define python_subpackage_only 1
%python_subpackages
%endif
%description
The library provides a C++ API and implementation for constructing
exmdb protocol requests and responses and conversing with a server.
%package -n %lname
Summary: A C++ implementation of the exmdb wire protocol
Group: System/Libraries
%description -n %lname
The library provides a C++ API and implementation for constructing
exmdb protocol requests and responses and conversing with a server.
2025-07-15 10:05:35 +02:00
%package -n libexmdbpp-devel
Summary: Development files for libexmdbpp
Group: System/Libraries
Requires: %lname = %version-%release
2025-07-15 10:05:35 +02:00
%description -n libexmdbpp-devel
The library provides a C++ API and implementation for constructing
exmdb protocol requests and responses and conversing with a server.
This subpackage contains the header files for the library.
2025-07-16 18:50:15 +02:00
%if 0%{?suse_version}
2025-07-15 10:05:35 +02:00
%package -n python-pyexmdb
Summary: Python bindings for libexmdbpp
Group: Development/Languages/Python
Requires: %lname = %version-%release
%description -n python-pyexmdb
The library provides a C++ API and implementation for constructing
exmdb protocol requests and responses and conversing with a server.
This subpackage contains bindings for Python.
2025-07-16 18:50:15 +02:00
%endif
2025-07-15 10:05:35 +02:00
2025-07-16 18:50:15 +02:00
%if 0%{?rhel} || 0%{?fedora}
%package -n python3-pyexmdb
Summary: Python bindings for libexmdbpp
Group: Development/Languages/Python
Requires: %lname = %version-%release
%description -n python3-pyexmdb
The library provides a C++ API and implementation for constructing
exmdb protocol requests and responses and conversing with a server.
This subpackage contains bindings for Python.
2025-07-16 18:50:15 +02:00
%endif
%prep
%autosetup -p1
%build
2025-07-15 10:05:35 +02:00
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
base="$PWD"
%{python_expand #
%define __builddir b%$python_bin_suffix
%cmake -DPython3_EXECUTABLE=%{_bindir}/python%$python_bin_suffix
%cmake_build
cd "$base"
}
%else
%cmake
%cmake_build
2025-07-15 10:05:35 +02:00
%endif
%install
2025-07-15 10:05:35 +02:00
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
base="$PWD"
%{python_expand #
%define __builddir b%$python_bin_suffix
%cmake_install
cd "$base"
}
%else
%cmake_install
# Stop check-rpaths from complaining about standard runpaths (fedora).
export QA_RPATHS=0x0001
2025-07-15 10:05:35 +02:00
%endif
2025-07-15 10:05:35 +02:00
%ldconfig_scriptlets -n %lname
%files -n %lname
%_libdir/libexmdbpp.so.0
%license LICENSE.txt
2025-07-15 10:05:35 +02:00
%files -n libexmdbpp-devel
%_includedir/exmdbpp/
%_libdir/libexmdbpp.so
%_datadir/exmdbpp/
2025-07-16 18:50:15 +02:00
%if 0%{?suse_version}
2025-07-15 10:05:35 +02:00
%files %{python_files pyexmdb}
%python_sitearch/*
2025-07-16 18:50:15 +02:00
%endif
%if 0%{?rhel} || 0%{?fedora}
%files -n python3-pyexmdb
2025-07-15 10:05:35 +02:00
%python3_sitearch/*
%endif
%changelog