pandoc-vl.spec 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. %define pkg_name pandoc
  2. %define pkg_version 1.19.2.4
  3. %define pkg_release 1%{?_dist_release}
  4. %define ghc_version 8.0.1
  5. Summary: general markup converter
  6. Summary(ja): 汎用マークアップ変換ツール
  7. Name: %{pkg_name}
  8. Version: %{pkg_version}
  9. Release: %{pkg_release}
  10. License: GPLv2+
  11. Group: Applications/Text
  12. URL: http://hackage.haskell.org
  13. Source0: pandoc-%{pkg_version}/pandoc-%{pkg_version}.tar.gz
  14. Source1: pandoc.cabal
  15. BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
  16. BuildRequires: ghc haskell-platform
  17. BuildRequires: libffi-devel gmp-devel zlib-devel
  18. BuildRequires: libghc-data-default-class
  19. BuildRequires: libghc-dlist
  20. BuildRequires: libghc-data-default
  21. BuildRequires: libghc-aeson
  22. # BuildRequires: libghc-http-client-tls
  23. BuildRequires: yaml
  24. BuildRequires: libghc-build-pandoc
  25. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  26. Requires: libffi
  27. Vendor: Project Vine
  28. Distribution: Vine Linux
  29. Packager: ara_t
  30. %description
  31. Pandoc is a Haskell library for converting from one markup format to another,
  32. and a command-line tool that uses this library.
  33. It can read markdown and (subsets of) HTML, reStructuredText, LaTeX, DocBook,
  34. MediaWiki markup, Haddock markup, OPML, Emacs Org-mode, and Textile,
  35. and it can write markdown, reStructuredText, HTML,
  36. LaTeX (including rendering as plain PDF or beamer slide shows),
  37. ConTeXt, DocBook, OPML, OpenDocument, ODT, Word docx, RTF, MediaWiki, Textile,
  38. groff man pages, GNU Texinfo, plain text, Emacs Org-Mode, AsciiDoc, InDesign
  39. ICML, EPUB (v2 or v3), FictionBook2, and several kinds of HTML/javascript
  40. slide shows (S5, Slidy, Slideous, DZSlides, reveal.js).
  41. Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
  42. definition lists, tables, and other features.
  43. A compatibility mode is provided for those who need a drop-in replacement for
  44. Markdown.pl.
  45. In contrast to existing tools for converting markdown to HTML,
  46. which use regex substitutions, pandoc has a modular design:
  47. it consists of a set of readers, which parse text in a given format
  48. and produce a native representation of the document,
  49. and a set of writers, which convert this native representation into a target
  50. format.
  51. Thus, adding an input or output format requires only adding a reader or writer.
  52. %description -l ja
  53. Pandoc はあるマークアップ形式から別の形式に変換するHaskellライブラリで、
  54. また、このライブラリを使ったコマンドラインツールです。
  55. markdown、HTML (のサブセット)、reStructuredText、 LaTeX、DocBook、
  56. MediaWikiマークアップ、Haddockマークアップ、OPML、Emacs Org-mode、
  57. およびTextileを読み取り、
  58. markdown、reStructuredText、HTML、LaTeX (プレインPDFまたはbeamerスライドショー
  59. での描画を含む)、ConTeXt、DocBook、OPML、OpenDocument、ODT、Word docx、RTF、
  60. MediaWiki、Textile、groff manページ、GNU Texinfo、プレーンテキスト、
  61. Emacs Org-Mode、AsciiDoc、InDesign ICML、EPUB (v2 または v3)、FictionBook2、
  62. およびいくつかの種類のHTML/javascriptスライドショー
  63. (S5, Slidy, Slideous, DZSlides, reveal.js) に書き出せます。
  64. Pandocは標準的なmarkdownの文法に脚注、組み込み LaTeX、定義リスト、表、
  65. およびその他の機能を拡張しています。
  66. Markdown.plの気軽な置き換えを希望する方向けに互換モードを提供しています。
  67. markdownからHTMLに変換する既存のツールは正規表現で置換していますが、
  68. これらとは異なり、pandoc はモジュール式の設計になっています:
  69. テキストを指定された形式でパースし、文書のネイティブ表現を生成するリーダ一式、
  70. および、このネイティブ表現を対象とする形式に変換するライタ一式で構成されて
  71. います。したがって、入力または出力形式を追加するにはリーダやライタを追加する
  72. ことだけが必要です。
  73. %package libs
  74. Summary: Library of pandoc
  75. Group: Development/Libraries
  76. %description libs
  77. Librariy of pandoc for building pandoc-citeproc and pandoc-crossref
  78. %prep
  79. %{__rm} -rf ${RPM_BUILD_ROOT}
  80. %{__rm} -rf %{_builddir}/package.conf
  81. %{__rm} -rf ${HOME}/.ghc
  82. %setup -q
  83. %build
  84. # Initialise the package db
  85. ghc-pkg init %{_builddir}/package.conf
  86. PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
  87. %{__rm} -rf ${PKG_CONF_DIR}
  88. %{__mkdir_p} ${PKG_CONF_DIR}
  89. %{__cp} %{SOURCE1} .
  90. cabal configure \
  91. --prefix=%{_prefix} \
  92. --libdir=%{_libdir}/%{name}-%{version} \
  93. --libsubdir= \
  94. --datadir=%{_datadir}/%{name}-%{version} \
  95. --datasubdir= \
  96. --docdir=%{_docdir}/%{name}-%{version}
  97. cabal build
  98. cabal haddock
  99. cabal copy --destdir=${RPM_BUILD_ROOT}
  100. cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}.conf
  101. %install
  102. %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
  103. %{__cp} BUGS changelog CONTRIBUTING.md COPYING.md COPYRIGHT README.md \
  104. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
  105. %{__rm} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/COPYRIGHT
  106. %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/man \
  107. ${RPM_BUILD_ROOT}%{_datadir}
  108. %clean
  109. %{__rm} -rf ${RPM_BUILD_ROOT}
  110. %post libs
  111. ghc-pkg recache
  112. %postun libs
  113. ghc-pkg recache
  114. %files
  115. %defattr(-, root, root)
  116. %{_bindir}/pandoc
  117. %{_datadir}/%{name}-%{version}/
  118. %{_docdir}/%{name}-%{version}/
  119. %{_mandir}/man1/pandoc.1.gz
  120. %files libs
  121. %defattr(-, root, root)
  122. %{_libdir}/%{name}-%{version}/
  123. %{_libdir}/ghc-%{ghc_version}/
  124. %changelog
  125. * Sun Oct 29 2017 Toshiaki Ara <ara_t@384.jp> 1.19.2.4-1
  126. - update to 1.19.2.4
  127. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 1.17.1-2
  128. - rebuild using ghc-8.0.1
  129. * Sat Jun 18 2016 Toshiaki Ara <ara_t@384.jp> 1.17.1-1
  130. - update to 1.17.1
  131. * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 1.17.0.3-5
  132. - update to 1.17.0.3
  133. - add BuildRequires: libghc-build-pandoc
  134. - provide pandoc-libs for building pandoc-citeproc and pacdoc-crossref
  135. - delete subpackages: pandoc-citeproc and pacdoc-crossref
  136. * Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-5
  137. - correct SPEC file
  138. * Mon Mar 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-4
  139. - correct pandoc-citeproc error
  140. * Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-2
  141. - rebuild under dependent rpm packages
  142. * Sun Feb 21 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-2
  143. - rebuild under ghc-7.10.3 and haskell-platform-2015.7.10.3
  144. * Sun Feb 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-1
  145. - new package