diff --git a/cmark-0.25.2-libcmark.pc-libdir.patch b/cmark-0.25.2-libcmark.pc-libdir.patch new file mode 100644 index 0000000..eb1bb5b --- /dev/null +++ b/cmark-0.25.2-libcmark.pc-libdir.patch @@ -0,0 +1,10 @@ +--- cmark-0.25.2/src/libcmark.pc.in~ 2016-03-27 05:24:14.000000000 +0900 ++++ cmark-0.25.2/src/libcmark.pc.in 2017-02-05 18:22:28.962548069 +0900 +@@ -1,6 +1,6 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=@CMAKE_INSTALL_PREFIX@ +-libdir=@CMAKE_INSTALL_PREFIX@/lib ++libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ + includedir=@CMAKE_INSTALL_PREFIX@/include + + Name: libcmark diff --git a/cmark.spec b/cmark.spec index 4258e02..39fd9dd 100644 --- a/cmark.spec +++ b/cmark.spec @@ -1,18 +1,19 @@ %if %{defined rhel} %if %{rhel} < 7 -%global disable_tests -DCMARK_TESTS=OFF +%bcond_without tests %endif %endif Name: cmark Version: 0.25.2 -Release: 1%{?dist} +Release: 2%{?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 Patch1: cmark-lib64.patch +Patch2: cmark-0.25.2-libcmark.pc-libdir.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -49,12 +50,13 @@ This package provides the cmark library. %prep %setup -q %patch1 -p1 -b .orig +%patch2 -p1 -b .orig %build mkdir build cd build -%cmake %{?disable_tests} .. +%cmake %{?_without_tests:-DCMARK_TESTS=OFF} .. make %{?_smp_mflags} @@ -66,7 +68,7 @@ rm %{buildroot}%{_libdir}/libcmark.a %check -%if %{undefined disable_tests} +%if %{with tests} cd build make test %endif @@ -100,6 +102,10 @@ make test %changelog +* Sun Feb 5 2017 Jens Petersen - 0.25.2-2 +- fix libdir in libcmark.pc for pkgconf (#1416426) +- use bcond for tests + * Fri Apr 29 2016 John Dulaney - 0.25.2-1 - Update to 0.25.2