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