From f260f674ec31b8275f0527e78bba4547361bdcf2 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Fri, 8 Nov 2024 11:53:17 +0800 Subject: [PATCH] adopt to new cmake macro --- libcomps.spec | 38 +++++++++++++++----------------------- libcomps.yaml | 4 ++-- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git a/libcomps.spec b/libcomps.spec index c5641ee..3b9cc05 100644 --- a/libcomps.spec +++ b/libcomps.spec @@ -1,8 +1,8 @@ Name: libcomps Version: 0.1.21 -Release: 1 +Release: 2 Summary: Comps XML file manipulation library -License: GPLv2+ +License: GPL-2.0-or-later URL: https://github.com/rpm-software-management/libcomps Source0: %{url}/archive/refs/tags/%{version}.tar.gz @@ -43,33 +43,22 @@ Python3 bindings for libcomps library. %autosetup -n %{name}-%{version} -p1 %build -mkdir build-py3 -pushd build-py3 -%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3 -%make_build -popd - -mkdir build-doc -pushd build-doc -%cmake ../libcomps/ -DPYTHON_DESIRED:STRING=3 -make %{?_smp_mflags} docs -make %{?_smp_mflags} pydocs -popd +%cmake -S libcomps -DPYTHON_DESIRED:STRING=3 +%cmake_build +%cmake_build --target docs +%cmake_build --target pydocs %install -pushd build-py3 -%make_install -popd +%cmake_install + +mv %{__cmake_builddir}/src/python/docs/html %{__cmake_builddir}/src/python/docs/pydocs-html %check -pushd build-py3 +pushd %{__cmake_builddir} make test make pytest popd -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - %files %license COPYING %doc README.md @@ -81,14 +70,17 @@ popd %{_includedir}/%{name}/ %files help -%doc build-doc/docs/libcomps-doc/html -%doc build-doc/src/python/docs/html +%doc %{__cmake_builddir}/docs/libcomps-doc/html +%doc %{__cmake_builddir}/src/python/docs/pydocs-html %files -n python3-%{name} %{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Nov 08 2024 Funda Wang - 0.1.21-2 +- adopt to new cmake macro + * Mon Jun 17 2024 yangxiaodong - 0.1.21-1 - Type:update - ID:NA diff --git a/libcomps.yaml b/libcomps.yaml index 3e69d85..373c3e8 100644 --- a/libcomps.yaml +++ b/libcomps.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: rpm-software-management/libcomps -tag_prefix: "^libcomps-" -seperator: "." +tag_prefix: +separator: "." -- Gitee