pandoc-vl.spec 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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
  72. ICML, EPUB (v2 or v3), FictionBook2, and several kinds of HTML/javascript
  73. slide shows (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
  77. Markdown.pl.
  78. In contrast to existing tools for converting markdown to HTML,
  79. which use regex substitutions, pandoc has a modular design:
  80. it consists of a set of readers, which parse text in a given format
  81. and produce a native representation of the document,
  82. and a set of writers, which convert this native representation into a target
  83. format.
  84. Thus, adding an input or output format requires only adding a reader or writer.
  85. %description -l ja
  86. Pandoc はあるマークアップ形式から別の形式に変換するHaskellライブラリで、
  87. また、このライブラリを使ったコマンドラインツールです。
  88. markdown、HTML (のサブセット)、reStructuredText、 LaTeX、DocBook、
  89. MediaWikiマークアップ、Haddockマークアップ、OPML、Emacs Org-mode、
  90. およびTextileを読み取り、
  91. markdown、reStructuredText、HTML、LaTeX (プレインPDFまたはbeamerスライドショー
  92. での描画を含む)、ConTeXt、DocBook、OPML、OpenDocument、ODT、Word docx、RTF、
  93. MediaWiki、Textile、groff manページ、GNU Texinfo、プレーンテキスト、
  94. Emacs Org-Mode、AsciiDoc、InDesign ICML、EPUB (v2 または v3)、FictionBook2、
  95. およびいくつかの種類のHTML/javascriptスライドショー
  96. (S5, Slidy, Slideous, DZSlides, reveal.js) に書き出せます。
  97. Pandocは標準的なmarkdownの文法に脚注、組み込み LaTeX、定義リスト、表、
  98. およびその他の機能を拡張しています。
  99. Markdown.plの気軽な置き換えを希望する方向けに互換モードを提供しています。
  100. markdownからHTMLに変換する既存のツールは正規表現で置換していますが、
  101. これらとは異なり、pandoc はモジュール式の設計になっています:
  102. テキストを指定された形式でパースし、文書のネイティブ表現を生成するリーダ一式、
  103. および、このネイティブ表現を対象とする形式に変換するライタ一式で構成されて
  104. います。したがって、入力または出力形式を追加するにはリーダやライタを追加する
  105. ことだけが必要です。
  106. %package citeproc
  107. Version: %{citeproc_version}
  108. Summary: Library and executable for using citeproc with pandoc
  109. License: BSD3
  110. Group: Applications/Text
  111. Requires: pandoc = %{pkg_version}-%{release}
  112. %description citeproc
  113. The pandoc-citeproc library exports functions for using the citeproc system
  114. with pandoc. It relies on citeproc-hs, a library for rendering bibliographic
  115. reference citations into a variety of styles using a macro language called
  116. Citation Style Language (CSL).
  117. More details on CSL can be found here: http://citationstyles.org/.
  118. %package crossref
  119. Summary: A pandoc filter for numbering figures, equations, tables and cross-references to them
  120. Version: %{crossref_version}
  121. License: GPLv2
  122. Group: Applications/Text
  123. Requires: pandoc = %{pkg_version}-%{release}
  124. %description crossref
  125. pandoc-crossref is a pandoc filter for numbering figures, equations, tables
  126. and cross-references to them. Input file (like demo.md) can be converted into
  127. html, latex, pdf, md or other formats.
  128. Optionally, you can use cleveref for latex/pdf output,
  129. e.g. cleveref pdf, cleveref latex, and listings package,
  130. e.g. listings pdf, listings latex.
  131. You can also enable per-chapter numbering (as with --chapters for latex output).
  132. You need to specify -M chapters for non-latex/pdf output however.
  133. Examples: html, markdown, latex, pdf.
  134. %prep
  135. %{__rm} -rf ${RPM_BUILD_ROOT}
  136. %setup -q -b 1 -b 2
  137. %build
  138. # Initialise the package db
  139. ghc-pkg init %{_builddir}/package.conf
  140. # install dependent packages
  141. cd %{_builddir}
  142. for pkg in `cat %{_sourcedir}/packages`; do
  143. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  144. cd ${pkg}
  145. cabal configure
  146. cabal build
  147. cabal copy
  148. cabal register --inplace
  149. cd ..
  150. done
  151. # build pandoc and related packages
  152. for pkg in pandoc-%{pkg_version} pandoc-citeproc-%{citeproc_version} \
  153. pandoc-crossref-%{crossref_version};
  154. do
  155. cd %{_builddir}/${pkg}
  156. cabal configure \
  157. --prefix=%{_prefix} \
  158. --libdir=%{_libdir}/${pkg} \
  159. --libsubdir= \
  160. --datadir=%{_datadir}/${pkg} \
  161. --datasubdir= \
  162. --docdir=%{_docdir}/${pkg} \
  163. --disable-shared
  164. cabal build
  165. cabal haddock
  166. cabal copy --destdir=${RPM_BUILD_ROOT}
  167. cabal register --inplace
  168. done
  169. %install
  170. # pandoc
  171. cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-%{pkg_version}
  172. %{__rm} COPYRIGHT README
  173. %{__mv} man ${RPM_BUILD_ROOT}%{_mandir}/
  174. # pandoc-citeproc
  175. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version}
  176. cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-citeproc-%{citeproc_version}
  177. %{__mv} README.md changelog \
  178. ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version}
  179. %{__mv} man/man1/* ${RPM_BUILD_ROOT}%{_mandir}/man1
  180. %{__rm} -rf man
  181. # pandoc-crossref
  182. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version}
  183. %{__install} -m 644 \
  184. %{_builddir}/pandoc-crossref-%{crossref_version}/{demo,LICENSE,README}.md \
  185. ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version}
  186. %{__rm} -rf ${RPM_BUILD_ROOT}%{_datadir}/pandoc-crossref-%{crossref_version}
  187. # delete unnecessary folder
  188. %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}
  189. %clean
  190. %{__rm} -rf ${RPM_BUILD_ROOT}
  191. %files
  192. %defattr(-, root, root)
  193. %doc COPYING COPYRIGHT README
  194. %{_bindir}/pandoc
  195. # %{_libdir}/pandoc-%{pkg_version}/
  196. %{_datadir}/pandoc-%{pkg_version}/
  197. %{_mandir}/man1/pandoc.1.gz
  198. %files citeproc
  199. %defattr(-, root, root)
  200. %{_bindir}/pandoc-citeproc
  201. # %{_libdir}/pandoc-citeproc-%{citeproc_version}/
  202. %{_datadir}/pandoc-citeproc-%{citeproc_version}/locales/
  203. %{_datadir}/pandoc-citeproc-%{citeproc_version}/chicago-author-date.csl
  204. %{_docdir}/pandoc-citeproc-%{citeproc_version}/
  205. %{_mandir}/man1/pandoc-citeproc.1.gz
  206. %files crossref
  207. %defattr(-, root, root)
  208. %{_bindir}/pandoc-crossref
  209. # %{_libdir}/pandoc-crossref-%{crossref_version}/
  210. %{_docdir}/pandoc-crossref-%{crossref_version}/
  211. %changelog
  212. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-5
  213. - correct SPEC file
  214. * Mon Mar 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-4
  215. - correct pandoc-citeproc error
  216. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-2
  217. - rebuild under dependent rpm packages
  218. * Sun Feb 21 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-2
  219. - rebuild under ghc-7.10.3 and haskell-platform-2015.7.10.3
  220. * Sun Feb 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-1
  221. - new package