From e037a637215fbcfb5443cafe71a59ca78668a8f2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 28 Mar 2018 14:42:47 +0200 Subject: rename to cmark-static for remirepo cleanup condition to always run tests --- cmark.spec | 76 +++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 31 deletions(-) (limited to 'cmark.spec') diff --git a/cmark.spec b/cmark.spec index 9de93dc..ecc0d79 100644 --- a/cmark.spec +++ b/cmark.spec @@ -1,20 +1,35 @@ -%if %{defined rhel} -%if %{rhel} < 7 -%bcond_without tests -%endif -%endif - -Name: cmark +# remirepo spec file for cmark-static +# renamed for static build only, from: +# +# Fedora spec file for cmark +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please preserve changelog entries +# +%global libname cmark +%global debug_package %{nil} +%global __debug_install_post /bin/true +%global _build_id_links none + + +Name: %{libname}-static Version: 0.28.3 -Release: 2%{?dist} +Release: 1%{?dist} Summary: CommonMark parsing and rendering License: BSD and MIT URL: https://github.com/jgm/cmark -Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz#/%{libname}-%{version}.tar.gz -BuildRequires: cmake BuildRequires: gcc-c++ +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 +BuildRequires: cmake3 +%else +BuildRequires: cmake +%endif + %description `cmark` is the C reference implementation of CommonMark, @@ -30,7 +45,8 @@ documents. %package devel Summary: Development files for cmark -Requires: cmark-lib = %{version}-%{release} +Requires: %{libname}-static-lib%{?_isa} = %{version}-%{release} +Conflicts: %{libname}-devel %description devel This package provides the development files for cmark. @@ -41,18 +57,23 @@ This package provides the development files for cmark. Summary: CommonMark parsing and rendering library %description lib -This package provides the cmark library. +This package provides the cmark static library. %prep -%setup -q +%setup -qn %{libname}-%{version} %build mkdir build cd build -%cmake %{?_without_tests:-DCMARK_TESTS=OFF} .. +%if 0%{?rhel} == 6 || 0%{?rhel} == 7 +%cmake3 .. +%else +%cmake .. +%endif + make %{?_smp_mflags} @@ -60,31 +81,21 @@ make %{?_smp_mflags} cd build make install DESTDIR=%{buildroot} -rm %{buildroot}%{_libdir}/libcmark.a +# only keep static library +rm %{buildroot}%{_libdir}/libcmark.so* +rm %{buildroot}%{_bindir}/cmark +rm %{buildroot}%{_mandir}/man1/cmark.* %check -%if %{with tests} cd build make test -%endif - - -%post lib -p /sbin/ldconfig - - -%postun lib -p /sbin/ldconfig - - -%files -%license COPYING -%{_bindir}/cmark -%{_mandir}/man1/cmark.1.gz %files lib +%{!?_licensedir:%global license %%doc} %license COPYING -%{_libdir}/libcmark.so.%{version} +%{_libdir}/libcmark.a %files devel @@ -92,13 +103,16 @@ make test %{_includedir}/cmark.h %{_includedir}/cmark_export.h %{_includedir}/cmark_version.h -%{_libdir}/libcmark.so %{_libdir}/pkgconfig/libcmark.pc %{_mandir}/man3/cmark.3.gz %{_libdir}/cmake/cmark*.cmake %changelog +* Wed Mar 28 2018 Remi Collet - 0.28.3-1 +- rename to cmark-static for remirepo +- cleanup condition to always run tests + * Wed Feb 07 2018 Fedora Release Engineering - 0.28.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild -- cgit