]>
Commit | Line | Data |
---|---|---|
fb75994f JR |
1 | # |
2 | # Conditional build: | |
5a723cea | 3 | %bcond_without static_libs # static library |
fb75994f JR |
4 | # |
5 | Summary: CommonMark parsing and rendering program | |
5a723cea | 6 | Summary(pl.UTF-8): Program do analizy i renderowania formatowania CommonMark |
fb75994f | 7 | Name: cmark |
d19c9d9f | 8 | Version: 0.30.3 |
fb75994f JR |
9 | Release: 1 |
10 | License: BSD and MIT | |
8ccc4e36 | 11 | Group: Applications/Text |
5a723cea | 12 | #Source0Download: https://github.com/CommonMark/cmark/releases |
fb75994f | 13 | Source0: https://github.com/CommonMark/cmark/archive/%{version}/%{name}-%{version}.tar.gz |
d19c9d9f | 14 | # Source0-md5: b99102dd8f3e9af42940efe79c2e973e |
fb75994f | 15 | URL: https://github.com/CommonMark/cmark |
5a723cea | 16 | BuildRequires: cmake >= 3.7 |
fb75994f JR |
17 | Requires: %{name}-lib = %{version}-%{release} |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | Cmark is the C reference implementation of CommonMark, a rationalized | |
22 | version of Markdown syntax with a spec. | |
23 | ||
5a723cea JB |
24 | %description -l pl.UTF-8 |
25 | CMark to wzorcowa implementacja w C formatu CommonMark - | |
26 | zracjonalizowanej wersji składni Markdown, posiadającej specyfikację. | |
27 | ||
fb75994f JR |
28 | %package lib |
29 | Summary: CommonMark parsing and rendering library | |
5a723cea | 30 | Summary(pl.UTF-8): Biblioteka do analizy i renderowania formatowania CommonMark |
fb75994f JR |
31 | Group: Libraries |
32 | ||
33 | %description lib | |
34 | Cmark is the C reference implementation of CommonMark, a rationalized | |
35 | version of Markdown syntax with a spec. | |
36 | ||
5a723cea JB |
37 | %description lib -l pl.UTF-8 |
38 | CMark to wzorcowa implementacja w C formatu CommonMark - | |
39 | zracjonalizowanej wersji składni Markdown, posiadającej specyfikację. | |
40 | ||
fb75994f JR |
41 | %package devel |
42 | Summary: Header files for %{name} library | |
43 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
44 | Group: Development/Libraries | |
45 | Requires: %{name}-lib = %{version}-%{release} | |
46 | ||
47 | %description devel | |
48 | Header files for %{name} library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki %{name}. | |
52 | ||
53 | %package static | |
54 | Summary: Static %{name} library | |
55 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
56 | Group: Development/Libraries | |
57 | Requires: %{name}-devel = %{version}-%{release} | |
58 | ||
59 | %description static | |
60 | Static %{name} library. | |
61 | ||
62 | %description static -l pl.UTF-8 | |
63 | Statyczna biblioteka %{name}. | |
64 | ||
65 | %prep | |
66 | %setup -q | |
67 | ||
68 | %build | |
69 | mkdir build | |
70 | cd build | |
5a723cea JB |
71 | %cmake .. \ |
72 | %{!?with_static_libs:-DCMARK_STATIC=OFF} | |
fb75994f JR |
73 | |
74 | %{__make} | |
75 | ||
76 | %install | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %{__make} -C build install \ | |
80 | DESTDIR=$RPM_BUILD_ROOT | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %post -p /sbin/ldconfig | |
86 | %postun -p /sbin/ldconfig | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
90 | %attr(755,root,root) %{_bindir}/cmark | |
91 | %{_mandir}/man1/cmark.1* | |
92 | ||
93 | %files lib | |
94 | %defattr(644,root,root,755) | |
5a723cea JB |
95 | %doc COPYING README.md changelog.txt |
96 | %attr(755,root,root) %{_libdir}/libcmark.so.%{version} | |
fb75994f JR |
97 | |
98 | %files devel | |
99 | %defattr(644,root,root,755) | |
fb75994f JR |
100 | %attr(755,root,root) %{_libdir}/libcmark.so |
101 | %{_includedir}/cmark*.h | |
102 | %{_pkgconfigdir}/libcmark.pc | |
5a723cea | 103 | %{_libdir}/cmake/cmark |
fb75994f JR |
104 | %{_mandir}/man3/cmark.3* |
105 | ||
106 | %if %{with static_libs} | |
107 | %files static | |
108 | %defattr(644,root,root,755) | |
109 | %{_libdir}/libcmark.a | |
110 | %endif |