pandoc-crossref-vl.spec 3.1 KB

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