summaryrefslogtreecommitdiffstats
path: root/cmark.spec
blob: ecc0d794613e4c6e45435946388dfda8b26e7a71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# 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:        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#/%{libname}-%{version}.tar.gz

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,
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:       %{libname}-static-lib%{?_isa} = %{version}-%{release}
Conflicts:      %{libname}-devel

%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 static library.



%prep
%setup -qn %{libname}-%{version}


%build
mkdir build
cd build
%if 0%{?rhel} == 6 || 0%{?rhel} == 7
%cmake3 ..
%else
%cmake  ..
%endif

make %{?_smp_mflags}


%install
cd build
make install DESTDIR=%{buildroot}

# only keep static library
rm %{buildroot}%{_libdir}/libcmark.so*
rm %{buildroot}%{_bindir}/cmark
rm %{buildroot}%{_mandir}/man1/cmark.*


%check
cd build
make test


%files lib
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/libcmark.a


%files devel
%doc README.md
%{_includedir}/cmark.h
%{_includedir}/cmark_export.h
%{_includedir}/cmark_version.h
%{_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

* Mon Dec 11 2017 Jens Petersen <petersen@redhat.com> - 0.28.3-1
- update to 0.28.3 (#1516914)
  https://github.com/commonmark/cmark/releases

* Sun Aug 06 2017 Björn Esser <besser82@fedoraproject.org> - 0.27.1-4
- Rebuilt for AutoReq cmake-filesystem

* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.27.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed Feb 22 2017 Jens Petersen <petersen@redhat.com> - 0.27.1-1
- update to 0.27.1

* Tue Feb  7 2017 Jens Petersen <petersen@redhat.com> - 0.25.2-3
- drop lib64 patch

* 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
- Update to 0.25.2

* Thu Feb  4 2016 Jens Petersen <petersen@redhat.com> - 0.24.1-1
- update to 0.24.1

* 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