1 | %define pkg_name pandoc |
---|
2 | %define pkg_version 1.16.0.2 |
---|
3 | %define pkg_release 5%{?_dist_release} |
---|
4 | |
---|
5 | %define citeproc_version 0.9 |
---|
6 | %define crossref_version 0.1.6.5 |
---|
7 | |
---|
8 | |
---|
9 | Summary: general markup converter |
---|
10 | Summary(ja): 汎用マークアップ変換ツール |
---|
11 | |
---|
12 | Name: %{pkg_name} |
---|
13 | Version: %{pkg_version} |
---|
14 | Release: %{pkg_release} |
---|
15 | |
---|
16 | License: GPLv2+ |
---|
17 | Group: Applications/Text |
---|
18 | URL: http://hackage.haskell.org |
---|
19 | |
---|
20 | Source0: pandoc-%{pkg_version}/pandoc-%{pkg_version}.tar.gz |
---|
21 | Source1: pandoc-citeproc-%{citeproc_version}.tar.gz |
---|
22 | Source2: pandoc-crossref-%{crossref_version}.tar.gz |
---|
23 | |
---|
24 | Source3: JuicyPixels-3.2.7.tar.gz |
---|
25 | Source4: SHA-1.6.4.2.tar.gz |
---|
26 | Source5: blaze-markup-0.7.0.3.tar.gz |
---|
27 | Source6: blaze-html-0.8.1.1.tar.gz |
---|
28 | Source7: cmark-0.5.1.tar.gz |
---|
29 | Source8: cmdargs-0.10.14.tar.gz |
---|
30 | Source9: aeson-pretty-0.7.2.tar.gz |
---|
31 | Source10: conduit-extra-1.1.10.1.tar.gz |
---|
32 | Source11: data-accessor-0.2.2.7.tar.gz |
---|
33 | Source12: data-accessor-transformers-0.2.1.7.tar.gz |
---|
34 | Source13: digest-0.0.1.2.tar.gz |
---|
35 | Source14: extensible-exceptions-0.1.1.4.tar.gz |
---|
36 | Source15: haddock-library-1.2.1.tar.gz |
---|
37 | Source16: hs-bibutils-5.5.tar.gz |
---|
38 | Source17: hslua-0.4.1.tar.gz |
---|
39 | Source18: pandoc-types-1.16.1.tar.gz |
---|
40 | Source19: regex-pcre-builtin-0.94.4.8.8.35.tar.gz |
---|
41 | Source20: rfc5051-0.1.0.3.tar.gz |
---|
42 | Source21: setenv-0.1.1.3.tar.gz |
---|
43 | Source22: tagsoup-0.13.8.tar.gz |
---|
44 | Source23: temporary-1.2.0.4.tar.gz |
---|
45 | Source24: unix-compat-0.4.1.4.tar.gz |
---|
46 | Source25: filemanip-0.3.6.3.tar.gz |
---|
47 | Source26: utf8-string-1.0.1.1.tar.gz |
---|
48 | Source27: highlighting-kate-0.6.1.tar.gz |
---|
49 | Source28: xml-1.3.14.tar.gz |
---|
50 | Source29: texmath-0.8.4.2.tar.gz |
---|
51 | Source30: xml-types-0.3.6.tar.gz |
---|
52 | Source31: xml-conduit-1.3.3.1.tar.gz |
---|
53 | Source32: zip-archive-0.2.3.7.tar.gz |
---|
54 | |
---|
55 | Source100: packages |
---|
56 | |
---|
57 | BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root |
---|
58 | |
---|
59 | BuildRequires: ghc haskell-platform-base cabal-install |
---|
60 | BuildRequires: libffi-devel gmp-devel zlib-devel |
---|
61 | |
---|
62 | BuildRequires: libghc-data-default-class |
---|
63 | BuildRequires: libghc-dlist |
---|
64 | BuildRequires: libghc-data-default |
---|
65 | BuildRequires: libghc-aeson |
---|
66 | BuildRequires: libghc-http-client-tls |
---|
67 | BuildRequires: yaml |
---|
68 | |
---|
69 | BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl |
---|
70 | BuildRequires: hscolour |
---|
71 | |
---|
72 | Requires: libffi |
---|
73 | |
---|
74 | Vendor: Project Vine |
---|
75 | Distribution: Vine Linux |
---|
76 | Packager: ara_t |
---|
77 | |
---|
78 | |
---|
79 | %description |
---|
80 | Pandoc is a Haskell library for converting from one markup format to another, |
---|
81 | and a command-line tool that uses this library. |
---|
82 | It can read markdown and (subsets of) HTML, reStructuredText, LaTeX, DocBook, |
---|
83 | MediaWiki markup, Haddock markup, OPML, Emacs Org-mode, and Textile, |
---|
84 | and it can write markdown, reStructuredText, HTML, |
---|
85 | LaTeX (including rendering as plain PDF or beamer slide shows), |
---|
86 | ConTeXt, DocBook, OPML, OpenDocument, ODT, Word docx, RTF, MediaWiki, Textile, |
---|
87 | groff man pages, GNU Texinfo, plain text, Emacs Org-Mode, AsciiDoc, InDesign |
---|
88 | ICML, EPUB (v2 or v3), FictionBook2, and several kinds of HTML/javascript |
---|
89 | slide shows (S5, Slidy, Slideous, DZSlides, reveal.js). |
---|
90 | |
---|
91 | Pandoc extends standard markdown syntax with footnotes, embedded LaTeX, |
---|
92 | definition lists, tables, and other features. |
---|
93 | A compatibility mode is provided for those who need a drop-in replacement for |
---|
94 | Markdown.pl. |
---|
95 | |
---|
96 | In contrast to existing tools for converting markdown to HTML, |
---|
97 | which use regex substitutions, pandoc has a modular design: |
---|
98 | it consists of a set of readers, which parse text in a given format |
---|
99 | and produce a native representation of the document, |
---|
100 | and a set of writers, which convert this native representation into a target |
---|
101 | format. |
---|
102 | Thus, adding an input or output format requires only adding a reader or writer. |
---|
103 | |
---|
104 | %description -l ja |
---|
105 | Pandoc はあるマークアップ形式から別の形式に変換するHaskellライブラリで、 |
---|
106 | また、このライブラリを使ったコマンドラインツールです。 |
---|
107 | markdown、HTML (のサブセット)、reStructuredText、 LaTeX、DocBook、 |
---|
108 | MediaWikiマークアップ、Haddockマークアップ、OPML、Emacs Org-mode、 |
---|
109 | およびTextileを読み取り、 |
---|
110 | markdown、reStructuredText、HTML、LaTeX (プレインPDFまたはbeamerスライドショー |
---|
111 | での描画を含む)、ConTeXt、DocBook、OPML、OpenDocument、ODT、Word docx、RTF、 |
---|
112 | MediaWiki、Textile、groff manページ、GNU Texinfo、プレーンテキスト、 |
---|
113 | Emacs Org-Mode、AsciiDoc、InDesign ICML、EPUB (v2 または v3)、FictionBook2、 |
---|
114 | およびいくつかの種類のHTML/javascriptスライドショー |
---|
115 | (S5, Slidy, Slideous, DZSlides, reveal.js) に書き出せます。 |
---|
116 | |
---|
117 | Pandocは標準的なmarkdownの文法に脚注、組み込み LaTeX、定義リスト、表、 |
---|
118 | およびその他の機能を拡張しています。 |
---|
119 | Markdown.plの気軽な置き換えを希望する方向けに互換モードを提供しています。 |
---|
120 | |
---|
121 | markdownからHTMLに変換する既存のツールは正規表現で置換していますが、 |
---|
122 | これらとは異なり、pandoc はモジュール式の設計になっています: |
---|
123 | テキストを指定された形式でパースし、文書のネイティブ表現を生成するリーダ一式、 |
---|
124 | および、このネイティブ表現を対象とする形式に変換するライタ一式で構成されて |
---|
125 | います。したがって、入力または出力形式を追加するにはリーダやライタを追加する |
---|
126 | ことだけが必要です。 |
---|
127 | |
---|
128 | |
---|
129 | %package citeproc |
---|
130 | Version: %{citeproc_version} |
---|
131 | Summary: Library and executable for using citeproc with pandoc |
---|
132 | License: BSD3 |
---|
133 | Group: Applications/Text |
---|
134 | Requires: pandoc = %{pkg_version}-%{release} |
---|
135 | |
---|
136 | %description citeproc |
---|
137 | The pandoc-citeproc library exports functions for using the citeproc system |
---|
138 | with pandoc. It relies on citeproc-hs, a library for rendering bibliographic |
---|
139 | reference citations into a variety of styles using a macro language called |
---|
140 | Citation Style Language (CSL). |
---|
141 | More details on CSL can be found here: http://citationstyles.org/. |
---|
142 | |
---|
143 | |
---|
144 | %package crossref |
---|
145 | Summary: A pandoc filter for numbering figures, equations, tables and cross-references to them |
---|
146 | Version: %{crossref_version} |
---|
147 | License: GPLv2 |
---|
148 | Group: Applications/Text |
---|
149 | Requires: pandoc = %{pkg_version}-%{release} |
---|
150 | |
---|
151 | %description crossref |
---|
152 | pandoc-crossref is a pandoc filter for numbering figures, equations, tables |
---|
153 | and cross-references to them. Input file (like demo.md) can be converted into |
---|
154 | html, latex, pdf, md or other formats. |
---|
155 | Optionally, you can use cleveref for latex/pdf output, |
---|
156 | e.g. cleveref pdf, cleveref latex, and listings package, |
---|
157 | e.g. listings pdf, listings latex. |
---|
158 | |
---|
159 | You can also enable per-chapter numbering (as with --chapters for latex output). |
---|
160 | You need to specify -M chapters for non-latex/pdf output however. |
---|
161 | Examples: html, markdown, latex, pdf. |
---|
162 | |
---|
163 | |
---|
164 | %prep |
---|
165 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
166 | %setup -q -b 1 -b 2 |
---|
167 | |
---|
168 | %build |
---|
169 | # Initialise the package db |
---|
170 | ghc-pkg init %{_builddir}/package.conf |
---|
171 | |
---|
172 | # install dependent packages |
---|
173 | cd %{_builddir} |
---|
174 | for pkg in `cat %{_sourcedir}/packages`; do |
---|
175 | %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz |
---|
176 | cd ${pkg} |
---|
177 | cabal configure |
---|
178 | cabal build |
---|
179 | cabal copy |
---|
180 | cabal register --inplace |
---|
181 | cd .. |
---|
182 | done |
---|
183 | |
---|
184 | # build pandoc and related packages |
---|
185 | for pkg in pandoc-%{pkg_version} pandoc-citeproc-%{citeproc_version} \ |
---|
186 | pandoc-crossref-%{crossref_version}; |
---|
187 | do |
---|
188 | cd %{_builddir}/${pkg} |
---|
189 | cabal configure \ |
---|
190 | --prefix=%{_prefix} \ |
---|
191 | --libdir=%{_libdir}/${pkg} \ |
---|
192 | --libsubdir= \ |
---|
193 | --datadir=%{_datadir}/${pkg} \ |
---|
194 | --datasubdir= \ |
---|
195 | --docdir=%{_docdir}/${pkg} \ |
---|
196 | --disable-shared |
---|
197 | |
---|
198 | cabal build |
---|
199 | cabal haddock |
---|
200 | cabal copy --destdir=${RPM_BUILD_ROOT} |
---|
201 | cabal register --inplace |
---|
202 | done |
---|
203 | |
---|
204 | %install |
---|
205 | # pandoc |
---|
206 | cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-%{pkg_version} |
---|
207 | %{__rm} COPYRIGHT README |
---|
208 | %{__mv} man ${RPM_BUILD_ROOT}%{_mandir}/ |
---|
209 | |
---|
210 | # pandoc-citeproc |
---|
211 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version} |
---|
212 | cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-citeproc-%{citeproc_version} |
---|
213 | %{__mv} README.md changelog \ |
---|
214 | ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version} |
---|
215 | %{__mv} man/man1/* ${RPM_BUILD_ROOT}%{_mandir}/man1 |
---|
216 | %{__rm} -rf man |
---|
217 | |
---|
218 | # pandoc-crossref |
---|
219 | %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version} |
---|
220 | %{__install} -m 644 \ |
---|
221 | %{_builddir}/pandoc-crossref-%{crossref_version}/{demo,LICENSE,README}.md \ |
---|
222 | ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version} |
---|
223 | %{__rm} -rf ${RPM_BUILD_ROOT}%{_datadir}/pandoc-crossref-%{crossref_version} |
---|
224 | |
---|
225 | # delete unnecessary folder |
---|
226 | %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir} |
---|
227 | |
---|
228 | %clean |
---|
229 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
230 | |
---|
231 | |
---|
232 | %files |
---|
233 | %defattr(-, root, root) |
---|
234 | %doc COPYING COPYRIGHT README |
---|
235 | %{_bindir}/pandoc |
---|
236 | # %{_libdir}/pandoc-%{pkg_version}/ |
---|
237 | %{_datadir}/pandoc-%{pkg_version}/ |
---|
238 | %{_mandir}/man1/pandoc.1.gz |
---|
239 | |
---|
240 | %files citeproc |
---|
241 | %defattr(-, root, root) |
---|
242 | %{_bindir}/pandoc-citeproc |
---|
243 | # %{_libdir}/pandoc-citeproc-%{citeproc_version}/ |
---|
244 | %{_datadir}/pandoc-citeproc-%{citeproc_version}/locales/ |
---|
245 | %{_datadir}/pandoc-citeproc-%{citeproc_version}/chicago-author-date.csl |
---|
246 | %{_docdir}/pandoc-citeproc-%{citeproc_version}/ |
---|
247 | %{_mandir}/man1/pandoc-citeproc.1.gz |
---|
248 | |
---|
249 | %files crossref |
---|
250 | %defattr(-, root, root) |
---|
251 | %{_bindir}/pandoc-crossref |
---|
252 | # %{_libdir}/pandoc-crossref-%{crossref_version}/ |
---|
253 | %{_docdir}/pandoc-crossref-%{crossref_version}/ |
---|
254 | |
---|
255 | |
---|
256 | %changelog |
---|
257 | * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-5 |
---|
258 | - correct SPEC file |
---|
259 | |
---|
260 | * Mon Mar 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-4 |
---|
261 | - correct pandoc-citeproc error |
---|
262 | |
---|
263 | * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-2 |
---|
264 | - rebuild under dependent rpm packages |
---|
265 | |
---|
266 | * Sun Feb 21 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-2 |
---|
267 | - rebuild under ghc-7.10.3 and haskell-platform-2015.7.10.3 |
---|
268 | |
---|
269 | * Sun Feb 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-1 |
---|
270 | - new package |
---|