File libmultiprocess.spec of Package libmultiprocess
#
# spec file for package libmultiprocess
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#
Name:           libmultiprocess
Version:        0.0_git20251007
Release:        0
Summary:        Multiprocess C++ library
License:        MIT
Group:          System/Libraries
URL:            https://github.com/chaincodelabs/%{name}
Source0:        %{name}-%{version}.tar.xz
Source1:        %{name}-rpmlintrc
BuildRequires:  capnproto
BuildRequires:  cmake
%if 0%{?suse_version} && 0%{?suse_version} > 1500
BuildRequires:  gcc-c++
%else
BuildRequires:  gcc11-c++
%endif
BuildRequires:  libcapnp-devel
BuildRequires:  pkg-config
%description
This is a C++ library and code generator making it easy to call functions and reference objects in different processes.
%package devel-static
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
%description devel-static
The %{name}-devel package contains libraries and header files for developing applications that use %{name}.
%prep
%setup -q
%build
%if 0%{?suse_version} && 0%{?is_opensuse} && 0%{?suse_version} > 1500
export CXXFLAGS="${CXXFLAGS} -ffat-lto-objects"
%else
export CXX=g++-11
export CXXFLAGS="${CXXFLAGS} -fPIE"
%endif
%cmake
%make_build
%{__strip} -s mpgen
%install
%cmake_install
%check
cd build
%{__make} check
%files
%defattr(-,root,root,-)
%attr(755,root,root) %{_bindir}/mpgen
%files devel-static
%defattr(-,root,root,-)
%{_includedir}/mp
%{_includedir}/*.mk
%attr(644,root,root) %{_libdir}/*.a
%{_libdir}/cmake/
%{_libdir}/pkgconfig/*.pc
%doc README.md doc/design.md doc/usage.md
%license COPYING
%changelog