[packages/criterion] - added libdir patch (fix library install and .pc file) - use system dyncall and nanomsg libraries -
qboosh
qboosh at pld-linux.org
Wed Apr 29 21:19:43 CEST 2020
commit 6e4706211ff1ab50d30bf517c24305edfd1c8ddf
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Apr 29 21:20:01 2020 +0200
- added libdir patch (fix library install and .pc file)
- use system dyncall and nanomsg libraries
- release 3
criterion-libdir.patch | 35 +++++++++++++++++++++++++++++++++++
criterion.spec | 23 ++++++++++++++++-------
2 files changed, 51 insertions(+), 7 deletions(-)
---
diff --git a/criterion.spec b/criterion.spec
index ceb55cd..4a118c5 100644
--- a/criterion.spec
+++ b/criterion.spec
@@ -1,18 +1,31 @@
+# TODO:
+# - system boxfort (when released): https://github.com/diacritic/BoxFort
+# - system libcsptr (when some post-2017 release made): https://github.com/Snaipe/libcsptr
Summary: A cross-platform C and C++ unit testing framework for the 21th century
+Summary(pl.UTF-8): Wieloplatformowy szkielet do testów jednostkowych dla C i C++ w XXI wieku
Name: criterion
Version: 2.3.3
-Release: 2
+Release: 3
License: LGPL v2.1+
Group: Libraries
+#Source0Download: https://github.com/Snaipe/Criterion/releases
Source0: https://github.com/Snaipe/Criterion/releases/download/v%{version}/%{name}-v%{version}.tar.bz2
# Source0-md5: 0305dbb5e00f04fd65b22e9ad82ba952
+Patch0: %{name}-libdir.patch
URL: https://github.com/Snaipe/Criterion
BuildRequires: cmake >= 2.8.0
+BuildRequires: dyncall >= 1.0
+BuildRequires: nanomsg-devel >= 1.0.0
+BuildRequires: rpmbuild(macros) >= 1.605
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
A dead-simple, yet extensible, C and C++ unit testing framework.
+%description -l pl.UTF-8
+Bardzo prosty, ale rozszerzalny szkielet testów jednostkowych dla C i
+C++.
+
%package devel
Summary: Header files for criterion library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki criterion
@@ -28,6 +41,7 @@ Pliki nagłówkowe biblioteki criterion.
%prep
%setup -q -n %{name}-v%{version}
+%patch0 -p1
%build
install -d build
@@ -41,11 +55,6 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-%if "%{_lib}" != "lib"
- install -d $RPM_BUILD_ROOT%{_libdir}
- mv $RPM_BUILD_ROOT{%{_prefix}/lib/*,%{_libdir}}
-%endif
-
%find_lang Criterion
%clean
@@ -65,4 +74,4 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libcriterion.so
%{_includedir}/criterion
-%{_npkgconfigdir}/criterion.pc
+%{_pkgconfigdir}/criterion.pc
diff --git a/criterion-libdir.patch b/criterion-libdir.patch
new file mode 100644
index 0000000..fb00e10
--- /dev/null
+++ b/criterion-libdir.patch
@@ -0,0 +1,35 @@
+--- criterion-v2.3.3/src/criterion.pc.in.orig 2018-11-05 01:59:28.000000000 +0100
++++ criterion-v2.3.3/src/criterion.pc.in 2020-04-29 21:13:27.924872823 +0200
+@@ -1,7 +1,7 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=${prefix}
+ includedir=${prefix}/include
+-libdir=${prefix}/lib
++libdir=${prefix}/lib at LIB_SUFFIX@
+
+ Name: @PROJECT_NAME@
+ Description: A KISS, Cross platform unit testing framework for C and C++
+--- criterion-v2.3.3/src/CMakeLists.txt.orig 2018-11-05 01:59:28.000000000 +0100
++++ criterion-v2.3.3/src/CMakeLists.txt 2020-04-29 21:14:27.667882501 +0200
+@@ -141,7 +141,7 @@
+ @ONLY
+ )
+
+-install (FILES "${CMAKE_CURRENT_BINARY_DIR}/criterion.pc" DESTINATION "share/pkgconfig")
++install (FILES "${CMAKE_CURRENT_BINARY_DIR}/criterion.pc" DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
+
+ set (SOURCE_FILES ${SOURCE_FILES} PARENT_SCOPE)
+ set (INTERFACE_FILES ${INTERFACE_FILES} PARENT_SCOPE)
+--- criterion-v2.3.3/.cmake/Modules/PackageUtils.cmake.orig 2018-11-05 01:59:28.000000000 +0100
++++ criterion-v2.3.3/.cmake/Modules/PackageUtils.cmake 2020-04-29 21:16:30.190552072 +0200
+@@ -51,8 +51,8 @@
+
+ install(TARGETS ${_LIB}
+ RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib ${install_flags}
++ LIBRARY DESTINATION lib${LIB_SUFFIX}
++ ARCHIVE DESTINATION lib${LIB_SUFFIX} ${install_flags}
+ )
+ endfunction ()
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/criterion.git/commitdiff/6e4706211ff1ab50d30bf517c24305edfd1c8ddf
More information about the pld-cvs-commit
mailing list