package created using the webbuild interface [release 1.58.0-1mamba;Fri Jul 28 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 21:32:12 +01:00
parent 1d1d28d6db
commit 9bc5db0a12
3 changed files with 103 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# cppdap # cppdap
C++ library for the Debug Adapter Protocol.

View File

@ -0,0 +1,24 @@
From 6a3cc9a804e83c40f4202fe6a34c8911d2c7c12b Mon Sep 17 00:00:00 2001
From: Julien Schueller <schueller@phimeca.com>
Date: Thu, 13 Jul 2023 19:36:52 +0200
Subject: [PATCH] CMake: Allow to build dynamic lib
This allows taking cmake BUILD_SHARED_LIBS option to decide whether to build a shared or static lib
This does not change the default (static)
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 717f02e..3a14f59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -226,7 +226,7 @@ endfunction(cppdap_set_target_options)
###########################################################
# dap
-add_library(cppdap STATIC ${CPPDAP_LIST})
+add_library(cppdap ${CPPDAP_LIST})
set_target_properties(cppdap PROPERTIES POSITION_INDEPENDENT_CODE 1)
cppdap_set_target_options(cppdap)

77
cppdap.spec Normal file
View File

@ -0,0 +1,77 @@
Name: cppdap
Version: 1.58.0
Release: 1mamba
Summary: C++ library for the Debug Adapter Protocol
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/google/cppdap
Source: https://github.com/google/cppdap.git/dap-%{version}-a/cppdap-%{version}.tar.bz2
Patch0: cppdap-1.58.0-upstream-shared-libs.patch
License: Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libstdc++6-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRequires: libnlohmann-json-devel
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
C++ library for the Debug Adapter Protocol.
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
%patch 0 -p1 -b .upstream-shared-libs
%build
%cmake -d build \
-DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON \
-DBUILD_SHARED_LIBS=ON
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/libcppdap.so
%doc LICENSE
%files -n lib%{name}-devel
%defattr(-,root,root)
%dir %{_includedir}/dap
%{_includedir}/dap/*.h
#%{_libdir}/libcppdap.a
%dir %{_libdir}/cmake/cppdap
%{_libdir}/cmake/cppdap/cppdap*.cmake
%doc README.md
%changelog
* Fri Jul 28 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 1.58.0-1mamba
- package created using the webbuild interface