[10243] | 1 | %define pkg_name pandoc-crossref |
---|
[10383] | 2 | %define pkg_version 0.2.1.3 |
---|
| 3 | %define pkg_release 2%{?_dist_release} |
---|
[10243] | 4 | |
---|
[10383] | 5 | %define pandoc_version 1.17.1 |
---|
[10243] | 6 | |
---|
| 7 | Summary: Library and executable for using citeproc with pandoc |
---|
| 8 | Name: %{pkg_name} |
---|
| 9 | Version: %{pkg_version} |
---|
| 10 | Release: %{pkg_release} |
---|
| 11 | |
---|
| 12 | License: BSD3 |
---|
| 13 | Group: Applications/Text |
---|
| 14 | URL: http://hackage.haskell.org |
---|
| 15 | |
---|
| 16 | Source0: %{name}-%{version}.tar.gz |
---|
| 17 | Source1: base-unicode-symbols-0.2.2.4.tar.gz |
---|
| 18 | Source2: data-accessor-0.2.2.7.tar.gz |
---|
| 19 | Source3: data-accessor-transformers-0.2.1.7.tar.gz |
---|
| 20 | Source4: roman-numerals-0.5.1.5.tar.gz |
---|
| 21 | Source5: utility-ht-0.0.11.tar.gz |
---|
| 22 | Source6: data-accessor-template-0.2.1.12.tar.gz |
---|
| 23 | Source100: packages |
---|
| 24 | |
---|
| 25 | BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root |
---|
| 26 | |
---|
| 27 | BuildRequires: ghc haskell-platform-base cabal-install |
---|
| 28 | BuildRequires: libffi-devel gmp-devel zlib-devel |
---|
| 29 | |
---|
| 30 | BuildRequires: libghc-data-default-class |
---|
| 31 | BuildRequires: libghc-dlist |
---|
| 32 | BuildRequires: libghc-data-default |
---|
| 33 | BuildRequires: libghc-aeson |
---|
| 34 | BuildRequires: libghc-http-client-tls |
---|
| 35 | BuildRequires: yaml |
---|
| 36 | BuildRequires: libghc-build-pandoc |
---|
| 37 | BuildRequires: pandoc-libs = %{pandoc_version} |
---|
| 38 | |
---|
| 39 | BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl |
---|
| 40 | BuildRequires: hscolour |
---|
| 41 | |
---|
| 42 | Requires: pandoc = %{pandoc_version} |
---|
| 43 | |
---|
| 44 | Vendor: Project Vine |
---|
| 45 | Distribution: Vine Linux |
---|
| 46 | Packager: ara_t |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | %description |
---|
| 50 | pandoc-crossref is a pandoc filter for numbering figures, equations, tables |
---|
| 51 | and cross-references to them. Input file (like demo.md) can be converted into |
---|
| 52 | html, latex, pdf, md or other formats. |
---|
| 53 | Optionally, you can use cleveref for latex/pdf output, |
---|
| 54 | e.g. cleveref pdf, cleveref latex, and listings package, |
---|
| 55 | e.g. listings pdf, listings latex. |
---|
| 56 | |
---|
| 57 | You can also enable per-chapter numbering (as with --chapters for latex output). |
---|
| 58 | You need to specify -M chapters for non-latex/pdf output however. |
---|
| 59 | Examples: html, markdown, latex, pdf. |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | %prep |
---|
| 63 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 64 | %setup -q |
---|
| 65 | |
---|
| 66 | %build |
---|
| 67 | # Initialise the package db |
---|
| 68 | ghc-pkg init %{_builddir}/package.conf |
---|
| 69 | |
---|
| 70 | # install dependent packages |
---|
| 71 | cd %{_builddir} |
---|
| 72 | for pkg in `cat %{_sourcedir}/packages`; do |
---|
| 73 | %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz |
---|
| 74 | cd ${pkg} |
---|
| 75 | cabal configure |
---|
| 76 | cabal build |
---|
| 77 | cabal copy |
---|
| 78 | cabal register --inplace |
---|
| 79 | cd .. |
---|
| 80 | done |
---|
| 81 | |
---|
| 82 | # build pandoc-crossref |
---|
| 83 | cd %{name}-%{version} |
---|
| 84 | cabal configure \ |
---|
| 85 | --prefix=%{_prefix} \ |
---|
| 86 | --libdir=%{_libdir}/%{name}-%{version} \ |
---|
| 87 | --libsubdir= \ |
---|
| 88 | --datadir=%{_datadir}/%{name}-%{version} \ |
---|
| 89 | --datasubdir= \ |
---|
| 90 | --docdir=%{_docdir}/%{name}-%{version} |
---|
| 91 | |
---|
| 92 | cabal build |
---|
| 93 | cabal haddock || : |
---|
| 94 | cabal copy --destdir=${RPM_BUILD_ROOT} |
---|
| 95 | |
---|
| 96 | %install |
---|
| 97 | %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir} |
---|
| 98 | %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/*.md \ |
---|
| 99 | ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
---|
[10383] | 100 | %{__mv} ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/html/*.md \ |
---|
| 101 | ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
---|
[10243] | 102 | |
---|
| 103 | %clean |
---|
| 104 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | %files |
---|
| 108 | %defattr(-, root, root) |
---|
| 109 | %{_bindir}/pandoc-crossref |
---|
| 110 | %{_docdir}/%{name}-%{version}/ |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | %changelog |
---|
[10383] | 114 | * Sun Jun 19 2016 Toshiaki Ara <ara_t@384.jp> 0.2.1.3-2 |
---|
| 115 | - rebuild under pandoc-1.17.1 |
---|
| 116 | |
---|
| 117 | * Sun Jun 05 2016 Toshiaki Ara <ara_t@384.jp> 0.2.1.3-1 |
---|
| 118 | - update to 0.2.1.3 |
---|
| 119 | |
---|
[10243] | 120 | * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 0.2.1.1-1 |
---|
| 121 | - new package (devide from pandoc) |
---|
| 122 | |
---|