1 | %define pkg_name pandoc-crossref |
---|
2 | %define pkg_version 0.2.1.1 |
---|
3 | %define pkg_release 1%{?_dist_release} |
---|
4 | |
---|
5 | %define pandoc_version 1.17.0.3 |
---|
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}/ |
---|
100 | |
---|
101 | %clean |
---|
102 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
103 | |
---|
104 | |
---|
105 | %files |
---|
106 | %defattr(-, root, root) |
---|
107 | %{_bindir}/pandoc-crossref |
---|
108 | %{_datadir}/%{name}-%{version}/ |
---|
109 | %{_docdir}/%{name}-%{version}/ |
---|
110 | |
---|
111 | |
---|
112 | %changelog |
---|
113 | * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 0.2.1.1-1 |
---|
114 | - new package (devide from pandoc) |
---|
115 | |
---|