source: projects/specs/trunk/p/pandoc/pandoc-vl.spec @ 10167

Revision 10167, 9.3 KB checked in by ara_t, 8 years ago (diff)

correct date in SPEC file

Line 
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
9Summary:     general markup converter
10Summary(ja): 汎用マークアップ変換ツール
11
12Name:    %{pkg_name}
13Version: %{pkg_version}
14Release: %{pkg_release}
15
16License: GPLv2+
17Group:   Applications/Text
18URL:     http://hackage.haskell.org
19
20Source0: pandoc-%{pkg_version}/pandoc-%{pkg_version}.tar.gz
21Source1: pandoc-citeproc-%{citeproc_version}.tar.gz
22Source2: pandoc-crossref-%{crossref_version}.tar.gz
23
24Source3: JuicyPixels-3.2.7.tar.gz
25Source4: SHA-1.6.4.2.tar.gz
26Source5: blaze-markup-0.7.0.3.tar.gz
27Source6: blaze-html-0.8.1.1.tar.gz
28Source7: cmark-0.5.1.tar.gz
29Source8: cmdargs-0.10.14.tar.gz
30Source9: aeson-pretty-0.7.2.tar.gz
31Source10: conduit-extra-1.1.10.1.tar.gz
32Source11: data-accessor-0.2.2.7.tar.gz
33Source12: data-accessor-transformers-0.2.1.7.tar.gz
34Source13: digest-0.0.1.2.tar.gz
35Source14: extensible-exceptions-0.1.1.4.tar.gz
36Source15: haddock-library-1.2.1.tar.gz
37Source16: hs-bibutils-5.5.tar.gz
38Source17: hslua-0.4.1.tar.gz
39Source18: pandoc-types-1.16.1.tar.gz
40Source19: regex-pcre-builtin-0.94.4.8.8.35.tar.gz
41Source20: rfc5051-0.1.0.3.tar.gz
42Source21: setenv-0.1.1.3.tar.gz
43Source22: tagsoup-0.13.8.tar.gz
44Source23: temporary-1.2.0.4.tar.gz
45Source24: unix-compat-0.4.1.4.tar.gz
46Source25: filemanip-0.3.6.3.tar.gz
47Source26: utf8-string-1.0.1.1.tar.gz
48Source27: highlighting-kate-0.6.1.tar.gz
49Source28: xml-1.3.14.tar.gz
50Source29: texmath-0.8.4.2.tar.gz
51Source30: xml-types-0.3.6.tar.gz
52Source31: xml-conduit-1.3.3.1.tar.gz
53Source32: zip-archive-0.2.3.7.tar.gz
54
55Source100: packages
56
57BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
58
59BuildRequires: ghc haskell-platform-base cabal-install
60BuildRequires: libffi-devel gmp-devel zlib-devel
61
62BuildRequires: libghc-data-default-class
63BuildRequires: libghc-dlist
64BuildRequires: libghc-data-default
65BuildRequires: libghc-aeson
66BuildRequires: libghc-http-client-tls
67BuildRequires: yaml
68
69BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
70BuildRequires: hscolour
71
72Requires: libffi
73
74Vendor: Project Vine
75Distribution: Vine Linux
76Packager: ara_t
77
78
79%description
80Pandoc is a Haskell library for converting from one markup format to another,
81 and a command-line tool that uses this library.
82It can read markdown and (subsets of) HTML, reStructuredText, LaTeX, DocBook,
83MediaWiki markup, Haddock markup, OPML, Emacs Org-mode, and Textile,
84 and it can write markdown, reStructuredText, HTML,
85LaTeX (including rendering as plain PDF or beamer slide shows),
86ConTeXt, 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
91Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
92 definition lists, tables, and other features.
93A compatibility mode is provided for those who need a drop-in replacement for
94 Markdown.pl.
95
96In 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.
102Thus, adding an input or output format requires only adding a reader or writer.
103
104%description -l ja
105Pandoc はあるマークアップ形式から別の形式に変換するHaskellライブラリで、
106また、このライブラリを使ったコマンドラインツールです。
107markdown、HTML (のサブセット)、reStructuredText、 LaTeX、DocBook、
108MediaWikiマークアップ、Haddockマークアップ、OPML、Emacs Org-mode、
109およびTextileを読み取り、
110markdown、reStructuredText、HTML、LaTeX (プレインPDFまたはbeamerスライドショー
111での描画を含む)、ConTeXt、DocBook、OPML、OpenDocument、ODT、Word docx、RTF、
112MediaWiki、Textile、groff manページ、GNU Texinfo、プレーンテキスト、
113Emacs Org-Mode、AsciiDoc、InDesign ICML、EPUB (v2 または v3)、FictionBook2、
114およびいくつかの種類のHTML/javascriptスライドショー
115(S5, Slidy, Slideous, DZSlides, reveal.js) に書き出せます。
116
117Pandocは標準的なmarkdownの文法に脚注、組み込み LaTeX、定義リスト、表、
118およびその他の機能を拡張しています。
119Markdown.plの気軽な置き換えを希望する方向けに互換モードを提供しています。
120
121markdownからHTMLに変換する既存のツールは正規表現で置換していますが、
122これらとは異なり、pandoc はモジュール式の設計になっています:
123テキストを指定された形式でパースし、文書のネイティブ表現を生成するリーダ一式、
124および、このネイティブ表現を対象とする形式に変換するライタ一式で構成されて
125います。したがって、入力または出力形式を追加するにはリーダやライタを追加する
126ことだけが必要です。
127
128
129%package citeproc
130Version:  %{citeproc_version}
131Summary:  Library and executable for using citeproc with pandoc
132License:  BSD3
133Group:    Applications/Text
134Requires: pandoc = %{pkg_version}-%{release}
135
136%description citeproc
137The pandoc-citeproc library exports functions for using the citeproc system
138with pandoc. It relies on citeproc-hs, a library for rendering bibliographic
139reference citations into a variety of styles using a macro language called
140Citation Style Language (CSL).
141More details on CSL can be found here: http://citationstyles.org/.
142
143
144%package crossref
145Summary:  A pandoc filter for numbering figures, equations, tables and cross-references to them
146Version:  %{crossref_version}
147License:  GPLv2
148Group:    Applications/Text
149Requires: pandoc = %{pkg_version}-%{release}
150
151%description crossref
152pandoc-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.
155Optionally, 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
159You can also enable per-chapter numbering (as with --chapters for latex output).
160You 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
170ghc-pkg init %{_builddir}/package.conf
171
172# install dependent packages
173cd %{_builddir}
174for 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 ..
182done
183
184# build pandoc and related packages
185for pkg in pandoc-%{pkg_version} pandoc-citeproc-%{citeproc_version} \
186           pandoc-crossref-%{crossref_version};
187do
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
202done
203
204%install
205# pandoc
206cd ${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}
212cd ${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
Note: See TracBrowser for help on using the repository browser.