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