diff options
author | Remi Collet <remi@remirepo.net> | 2018-03-28 14:42:47 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-03-28 14:42:47 +0200 |
commit | e037a637215fbcfb5443cafe71a59ca78668a8f2 (patch) | |
tree | 1fea18718c9ac359223be526acdae16ab3f64ad7 | |
parent | d00cfabc415882d63fee32470f01c6e443dd694a (diff) |
cleanup condition to always run tests
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | cmark.spec | 76 |
3 files changed, 58 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6f69818 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.bz2 +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..91b0fd5 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../common/Makefile + @@ -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 <remi@remirepo.net> - 0.28.3-1 +- rename to cmark-static for remirepo +- cleanup condition to always run tests + * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.28.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild |