%define pkg_name pandoc %define pkg_version 1.16.0.2 %define pkg_release 5%{?_dist_release} %define citeproc_version 0.9 %define crossref_version 0.1.6.5 Summary: general markup converter Summary(ja): 汎用マークアップ変換ツール Name: %{pkg_name} Version: %{pkg_version} Release: %{pkg_release} License: GPLv2+ Group: Applications/Text URL: http://hackage.haskell.org Source0: pandoc-%{pkg_version}/pandoc-%{pkg_version}.tar.gz Source1: pandoc-citeproc-%{citeproc_version}.tar.gz Source2: pandoc-crossref-%{crossref_version}.tar.gz Source3: JuicyPixels-3.2.7.tar.gz Source4: SHA-1.6.4.2.tar.gz Source5: blaze-markup-0.7.0.3.tar.gz Source6: blaze-html-0.8.1.1.tar.gz Source7: cmark-0.5.1.tar.gz Source8: cmdargs-0.10.14.tar.gz Source9: aeson-pretty-0.7.2.tar.gz Source10: conduit-extra-1.1.10.1.tar.gz Source11: data-accessor-0.2.2.7.tar.gz Source12: data-accessor-transformers-0.2.1.7.tar.gz Source13: digest-0.0.1.2.tar.gz Source14: extensible-exceptions-0.1.1.4.tar.gz Source15: haddock-library-1.2.1.tar.gz Source16: hs-bibutils-5.5.tar.gz Source17: hslua-0.4.1.tar.gz Source18: pandoc-types-1.16.1.tar.gz Source19: regex-pcre-builtin-0.94.4.8.8.35.tar.gz Source20: rfc5051-0.1.0.3.tar.gz Source21: setenv-0.1.1.3.tar.gz Source22: tagsoup-0.13.8.tar.gz Source23: temporary-1.2.0.4.tar.gz Source24: unix-compat-0.4.1.4.tar.gz Source25: filemanip-0.3.6.3.tar.gz Source26: utf8-string-1.0.1.1.tar.gz Source27: highlighting-kate-0.6.1.tar.gz Source28: xml-1.3.14.tar.gz Source29: texmath-0.8.4.2.tar.gz Source30: xml-types-0.3.6.tar.gz Source31: xml-conduit-1.3.3.1.tar.gz Source32: zip-archive-0.2.3.7.tar.gz Source100: packages BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root BuildRequires: ghc haskell-platform-base cabal-install BuildRequires: libffi-devel gmp-devel zlib-devel BuildRequires: libghc-data-default-class BuildRequires: libghc-dlist BuildRequires: libghc-data-default BuildRequires: libghc-aeson BuildRequires: libghc-http-client-tls BuildRequires: yaml BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl BuildRequires: hscolour Requires: libffi Vendor: Project Vine Distribution: Vine Linux Packager: ara_t %description Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read markdown and (subsets of) HTML, reStructuredText, LaTeX, DocBook, MediaWiki markup, Haddock markup, OPML, Emacs Org-mode, and Textile, and it can write markdown, reStructuredText, HTML, LaTeX (including rendering as plain PDF or beamer slide shows), ConTeXt, DocBook, OPML, OpenDocument, ODT, Word docx, RTF, MediaWiki, Textile, groff man pages, GNU Texinfo, plain text, Emacs Org-Mode, AsciiDoc, InDesign ICML, EPUB (v2 or v3), FictionBook2, and several kinds of HTML/javascript slide shows (S5, Slidy, Slideous, DZSlides, reveal.js). Pandoc extends standard markdown syntax with footnotes, embedded LaTeX, definition lists, tables, and other features. A compatibility mode is provided for those who need a drop-in replacement for Markdown.pl. In contrast to existing tools for converting markdown to HTML, which use regex substitutions, pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document, and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. %description -l ja Pandoc はあるマークアップ形式から別の形式に変換するHaskellライブラリで、 また、このライブラリを使ったコマンドラインツールです。 markdown、HTML (のサブセット)、reStructuredText、 LaTeX、DocBook、 MediaWikiマークアップ、Haddockマークアップ、OPML、Emacs Org-mode、 およびTextileを読み取り、 markdown、reStructuredText、HTML、LaTeX (プレインPDFまたはbeamerスライドショー での描画を含む)、ConTeXt、DocBook、OPML、OpenDocument、ODT、Word docx、RTF、 MediaWiki、Textile、groff manページ、GNU Texinfo、プレーンテキスト、 Emacs Org-Mode、AsciiDoc、InDesign ICML、EPUB (v2 または v3)、FictionBook2、 およびいくつかの種類のHTML/javascriptスライドショー (S5, Slidy, Slideous, DZSlides, reveal.js) に書き出せます。 Pandocは標準的なmarkdownの文法に脚注、組み込み LaTeX、定義リスト、表、 およびその他の機能を拡張しています。 Markdown.plの気軽な置き換えを希望する方向けに互換モードを提供しています。 markdownからHTMLに変換する既存のツールは正規表現で置換していますが、 これらとは異なり、pandoc はモジュール式の設計になっています: テキストを指定された形式でパースし、文書のネイティブ表現を生成するリーダ一式、 および、このネイティブ表現を対象とする形式に変換するライタ一式で構成されて います。したがって、入力または出力形式を追加するにはリーダやライタを追加する ことだけが必要です。 %package citeproc Version: %{citeproc_version} Summary: Library and executable for using citeproc with pandoc License: BSD3 Group: Applications/Text Requires: pandoc = %{pkg_version}-%{release} %description citeproc The pandoc-citeproc library exports functions for using the citeproc system with pandoc. It relies on citeproc-hs, a library for rendering bibliographic reference citations into a variety of styles using a macro language called Citation Style Language (CSL). More details on CSL can be found here: http://citationstyles.org/. %package crossref Summary: A pandoc filter for numbering figures, equations, tables and cross-references to them Version: %{crossref_version} License: GPLv2 Group: Applications/Text Requires: pandoc = %{pkg_version}-%{release} %description crossref pandoc-crossref is a pandoc filter for numbering figures, equations, tables and cross-references to them. Input file (like demo.md) can be converted into html, latex, pdf, md or other formats. Optionally, you can use cleveref for latex/pdf output, e.g. cleveref pdf, cleveref latex, and listings package, e.g. listings pdf, listings latex. You can also enable per-chapter numbering (as with --chapters for latex output). You need to specify -M chapters for non-latex/pdf output however. Examples: html, markdown, latex, pdf. %prep %{__rm} -rf ${RPM_BUILD_ROOT} %setup -q -b 1 -b 2 %build # Initialise the package db ghc-pkg init %{_builddir}/package.conf # install dependent packages cd %{_builddir} for pkg in `cat %{_sourcedir}/packages`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz cd ${pkg} cabal configure cabal build cabal copy cabal register --inplace cd .. done # build pandoc and related packages for pkg in pandoc-%{pkg_version} pandoc-citeproc-%{citeproc_version} \ pandoc-crossref-%{crossref_version}; do cd %{_builddir}/${pkg} cabal configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/${pkg} \ --libsubdir= \ --datadir=%{_datadir}/${pkg} \ --datasubdir= \ --docdir=%{_docdir}/${pkg} \ --disable-shared cabal build cabal haddock cabal copy --destdir=${RPM_BUILD_ROOT} cabal register --inplace done %install # pandoc cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-%{pkg_version} %{__rm} COPYRIGHT README %{__mv} man ${RPM_BUILD_ROOT}%{_mandir}/ # pandoc-citeproc %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version} cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-citeproc-%{citeproc_version} %{__mv} README.md changelog \ ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version} %{__mv} man/man1/* ${RPM_BUILD_ROOT}%{_mandir}/man1 %{__rm} -rf man # pandoc-crossref %{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version} %{__install} -m 644 \ %{_builddir}/pandoc-crossref-%{crossref_version}/{demo,LICENSE,README}.md \ ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version} %{__rm} -rf ${RPM_BUILD_ROOT}%{_datadir}/pandoc-crossref-%{crossref_version} # delete unnecessary folder %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir} %clean %{__rm} -rf ${RPM_BUILD_ROOT} %files %defattr(-, root, root) %doc COPYING COPYRIGHT README %{_bindir}/pandoc # %{_libdir}/pandoc-%{pkg_version}/ %{_datadir}/pandoc-%{pkg_version}/ %{_mandir}/man1/pandoc.1.gz %files citeproc %defattr(-, root, root) %{_bindir}/pandoc-citeproc # %{_libdir}/pandoc-citeproc-%{citeproc_version}/ %{_datadir}/pandoc-citeproc-%{citeproc_version}/locales/ %{_datadir}/pandoc-citeproc-%{citeproc_version}/chicago-author-date.csl %{_docdir}/pandoc-citeproc-%{citeproc_version}/ %{_mandir}/man1/pandoc-citeproc.1.gz %files crossref %defattr(-, root, root) %{_bindir}/pandoc-crossref # %{_libdir}/pandoc-crossref-%{crossref_version}/ %{_docdir}/pandoc-crossref-%{crossref_version}/ %changelog * Tue Apr 12 2016 Toshiaki Ara 1.16.0.3-5 - correct SPEC file * Mon Mar 07 2016 Toshiaki Ara 1.16.0.3-4 - correct pandoc-citeproc error * Tue Mar 01 2016 Toshiaki Ara 1.16.0.3-2 - rebuild under dependent rpm packages * Sun Feb 21 2016 Toshiaki Ara 1.16.0.2-2 - rebuild under ghc-7.10.3 and haskell-platform-2015.7.10.3 * Sun Feb 07 2016 Toshiaki Ara 1.16.0.2-1 - new package