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