fix libdir in libcmark.pc for pkgconf ()

use %bcond for tests
epel9
Jens Petersen 8 years ago
parent 315a4ad7c6
commit 57ac0eba94

@ -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

@ -1,18 +1,19 @@
%if %{defined rhel} %if %{defined rhel}
%if %{rhel} < 7 %if %{rhel} < 7
%global disable_tests -DCMARK_TESTS=OFF %bcond_without tests
%endif %endif
%endif %endif
Name: cmark Name: cmark
Version: 0.25.2 Version: 0.25.2
Release: 1%{?dist} Release: 2%{?dist}
Summary: CommonMark parsing and rendering Summary: CommonMark parsing and rendering
License: BSD and MIT License: BSD and MIT
URL: https://github.com/jgm/cmark URL: https://github.com/jgm/cmark
Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz Source0: https://github.com/jgm/cmark/archive/%{version}.tar.gz
Patch1: cmark-lib64.patch Patch1: cmark-lib64.patch
Patch2: cmark-0.25.2-libcmark.pc-libdir.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -49,12 +50,13 @@ This package provides the cmark library.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .orig %patch1 -p1 -b .orig
%patch2 -p1 -b .orig
%build %build
mkdir build mkdir build
cd build cd build
%cmake %{?disable_tests} .. %cmake %{?_without_tests:-DCMARK_TESTS=OFF} ..
make %{?_smp_mflags} make %{?_smp_mflags}
@ -66,7 +68,7 @@ rm %{buildroot}%{_libdir}/libcmark.a
%check %check
%if %{undefined disable_tests} %if %{with tests}
cd build cd build
make test make test
%endif %endif
@ -100,6 +102,10 @@ make test
%changelog %changelog
* Sun Feb 5 2017 Jens Petersen <petersen@redhat.com> - 0.25.2-2
- fix libdir in libcmark.pc for pkgconf (#1416426)
- use bcond for tests
* Fri Apr 29 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.25.2-1 * Fri Apr 29 2016 John Dulaney <jdulaney@fedoraproject.org> - 0.25.2-1
- Update to 0.25.2 - Update to 0.25.2

Loading…
Cancel
Save