|
|
|
%if %{defined rhel}
|
|
|
|
%if %{rhel} < 7
|
|
|
|
%global disable_tests -DCMARK_TESTS=OFF
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Name: cmark
|
|
|
|
Version: 0.23.0
|
|
|
|
Release: 5%{?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
|
|
|
|
Patch1: cmark-lib64.patch
|
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
|
|
|
%description
|
|
|
|
`cmark` is the C reference implementation of CommonMark,
|
|
|
|
a rationalized version of Markdown syntax with a spec.
|
|
|
|
|
|
|
|
It provides a shared library (`libcmark`) with functions for parsing
|
|
|
|
CommonMark documents to an abstract syntax tree (AST), manipulating
|
|
|
|
the AST, and rendering the document to HTML, groff man, LaTeX,
|
|
|
|
CommonMark, or an XML representation of the AST. It also provides a
|
|
|
|
command-line program (`cmark`) for parsing and rendering CommonMark
|
|
|
|
documents.
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for cmark
|
|
|
|
Requires: cmark-lib = %{version}-%{release}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package provides the development files for cmark.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package lib
|
|
|
|
Summary: CommonMark parsing and rendering library
|
|
|
|
|
|
|
|
%description lib
|
|
|
|
This package provides the cmark library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch1 -p1 -b .orig
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
%cmake %{?disable_tests} ..
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
cd build
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
|
|
|
|
rm %{buildroot}%{_libdir}/libcmark.a
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%if %{undefined disable_tests}
|
|
|
|
cd build
|
|
|
|
ctest -V %{?_smp_mflags}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%post lib -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
%postun lib -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license COPYING
|
|
|
|
%{_bindir}/cmark
|
|
|
|
%{_mandir}/man1/cmark.1.gz
|
|
|
|
|
|
|
|
|
|
|
|
%files lib
|
|
|
|
%license COPYING
|
|
|
|
%{_libdir}/libcmark.so.%{version}
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/cmark.h
|
|
|
|
%{_includedir}/cmark_export.h
|
|
|
|
%{_includedir}/cmark_version.h
|
|
|
|
%{_libdir}/libcmark.so
|
|
|
|
%{_libdir}/pkgconfig/libcmark.pc
|
|
|
|
%{_mandir}/man3/cmark.3.gz
|
|
|
|
%doc README.md
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.0-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
|
|
|
* Thu Jan 28 2016 Jens Petersen <petersen@redhat.com> - 0.23.0-4
|
|
|
|
- BR c++ explicitly
|
|
|
|
- disable tests for EPEL6 since no python3
|
|
|
|
|
|
|
|
* Mon Jan 25 2016 Jens Petersen <petersen@redhat.com> - 0.23.0-3
|
|
|
|
- include license in lib (#1266429)
|
|
|
|
|
|
|
|
* Thu Jan 21 2016 Jens Petersen <petersen@redhat.com> - 0.23.0-2
|
|
|
|
- tweak the github release source url (#1266429)
|
|
|
|
|
|
|
|
* Wed Jan 20 2016 Jens Petersen <petersen@redhat.com> - 0.23.0-1
|
|
|
|
- update to 0.23.0
|
|
|
|
- cmake include GNUInstallDirs (Marco Driusso, #1266429)
|
|
|
|
|
|
|
|
* Fri Sep 25 2015 Jens Petersen <petersen@redhat.com> - 0.22.0-1
|
|
|
|
- initial packaging
|
|
|
|
- force lib64
|
|
|
|
- run tests
|