pandoc-vl.spec 9.3 KB

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