From 855b4d98165c173eb69ef249246abff11ca9eb33 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Tue, 12 Nov 2024 11:19:05 +0800 Subject: [PATCH] adopt to new cmake macro --- cmark.spec | 35 ++++++++++++++++------------------- cmark.yaml | 6 +++--- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/cmark.spec b/cmark.spec index 6a25888..796be61 100644 --- a/cmark.spec +++ b/cmark.spec @@ -1,14 +1,16 @@ +%undefine __cmake_in_source_build %bcond_with tests Name: cmark Version: 0.30.3 -Release: 1 +Release: 2 Summary: CommonMark parsing and rendering library and program in C -License: BSD and MIT -URL: https://github.com/jgm/cmark -Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +License: BSD-2-Clause AND MIT +URL: https://github.com/commonmark/cmark +Source0: https://github.com/commonmark/cmark/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -BuildRequires: cmake gcc-c++ pkgconfig +BuildRequires: gcc-c++ +BuildRequires: cmake >= 3.7 %description `cmark` is the C reference implementation of CommonMark, @@ -24,26 +26,17 @@ This package provides the development files for cmark. %setup -q %build -rm -rf CMakeCache.txt -mkdir -p build -pushd build -%cmake -DCMARK_TESTS=OFF -DCMARK_STATIC=OFF %{?_without_tests:-DCMARK_TESTS=OFF} .. -%make_build -popd +%cmake -DCMARK_TESTS=OFF -DCMARK_STATIC=OFF %{?_without_tests:-DCMARK_TESTS=OFF} +%cmake_build %install -pushd build -%make_install -popd +%cmake_install -%check %if %{with tests} -%cmake_build --target test +%check +%ctest %endif -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - %files %license COPYING %doc README.md @@ -62,6 +55,10 @@ popd %{_libdir}/cmake/cmark/cmark*.cmake %changelog +* Tue Nov 12 2024 Funda Wang - 0.30.3-2 +- adopt to new cmake macro +- force out-of-source build + * Thu Nov 23 2023 zhangxianting - 0.30.3-1 - update to version 0.30.3 diff --git a/cmark.yaml b/cmark.yaml index 78e91f2..f787d5b 100644 --- a/cmark.yaml +++ b/cmark.yaml @@ -1,4 +1,4 @@ -version_control: git -src_repo: https://github.com/commonmark/cmark.git -tag_prefix: ^ +version_control: github +src_repo: commonmark/cmark +tag_prefix: separator: "." -- Gitee