Use new cmake macros
This commit is contained in:
parent
085bccad31
commit
9f44b10051
22
json-c.spec
22
json-c.spec
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
Name: json-c
|
Name: json-c
|
||||||
Version: 0.14
|
Version: 0.14
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: JSON implementation in C
|
Summary: JSON implementation in C
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -88,7 +88,6 @@ doxygen -s -u doc/Doxyfile.in
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p %{_vpath_builddir}
|
|
||||||
%cmake \
|
%cmake \
|
||||||
-DBUILD_STATIC_LIBS:BOOL=OFF \
|
-DBUILD_STATIC_LIBS:BOOL=OFF \
|
||||||
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
|
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
|
||||||
@ -97,32 +96,28 @@ mkdir -p %{_vpath_builddir}
|
|||||||
-DDISABLE_WERROR:BOOL=ON \
|
-DDISABLE_WERROR:BOOL=ON \
|
||||||
-DENABLE_RDRAND:BOOL=ON \
|
-DENABLE_RDRAND:BOOL=ON \
|
||||||
-DENABLE_THREADING:BOOL=ON \
|
-DENABLE_THREADING:BOOL=ON \
|
||||||
-G Ninja \
|
-G Ninja
|
||||||
-B $PWD/%{_vpath_builddir} \
|
%cmake_build --target all doc
|
||||||
-S $PWD
|
|
||||||
%ninja_build -C %{_vpath_builddir} all doc
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%ninja_install -C %{_vpath_builddir}
|
%cmake_install
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||||
cp -a %{_vpath_builddir}/doc/html ChangeLog README README.* \
|
cp -a %{__cmake_builddir}/doc/html ChangeLog README README.* \
|
||||||
%{buildroot}%{_pkgdocdir}
|
%{buildroot}%{_pkgdocdir}
|
||||||
hardlink -cfv %{buildroot}%{_pkgdocdir}
|
hardlink -cfv %{buildroot}%{_pkgdocdir}
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd %{_vpath_builddir}
|
|
||||||
export USE_VALGRIND=0
|
export USE_VALGRIND=0
|
||||||
ctest %{_smp_mflags} --force-new-ctest-process --output-on-failure
|
%ctest
|
||||||
%ifarch %{valgrind_arches}
|
%ifarch %{valgrind_arches}
|
||||||
export USE_VALGRIND=1
|
export USE_VALGRIND=1
|
||||||
ctest %{_smp_mflags} --force-new-ctest-process --output-on-failure
|
%ctest
|
||||||
%endif
|
%endif
|
||||||
unset USE_VALGRIND
|
unset USE_VALGRIND
|
||||||
popd
|
|
||||||
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
@ -152,6 +147,9 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 27 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-7
|
||||||
|
- Use new cmake macros
|
||||||
|
|
||||||
* Tue May 26 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-6
|
* Tue May 26 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-6
|
||||||
- Build using Ninja instead of Make
|
- Build using Ninja instead of Make
|
||||||
- Add a patch to move Doxyfile into doc subdir
|
- Add a patch to move Doxyfile into doc subdir
|
||||||
|
Loading…
Reference in New Issue
Block a user