pandoc-crossref-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. %define pkg_name pandoc-crossref
  2. %define pkg_version 0.2.6.0
  3. %define pkg_release 1%{?_dist_release}
  4. %define pandoc_version 1.19.2.4
  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: packages
  14. # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
  15. Source11: base-unicode-symbols-0.2.2.4.tar.gz
  16. Source12: data-accessor-0.2.2.7.tar.gz
  17. Source13: data-accessor-transformers-0.2.1.7.tar.gz
  18. Source14: roman-numerals-0.5.1.5.tar.gz
  19. Source15: utility-ht-0.0.14.tar.gz
  20. Source16: data-accessor-template-0.2.1.14.tar.gz
  21. BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
  22. BuildRequires: ghc haskell-platform
  23. BuildRequires: libffi-devel gmp-devel zlib-devel
  24. BuildRequires: libghc-data-default-class
  25. BuildRequires: libghc-dlist
  26. BuildRequires: libghc-data-default
  27. BuildRequires: libghc-aeson
  28. BuildRequires: libghc-http-client-tls
  29. BuildRequires: yaml
  30. BuildRequires: libghc-build-pandoc
  31. BuildRequires: pandoc-libs = %{pandoc_version}
  32. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  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. %{__rm} -rf %{_builddir}/package.conf
  50. %{__rm} -rf ${HOME}/.ghc
  51. %setup -q
  52. %build
  53. # Initialise the package db
  54. ghc-pkg init %{_builddir}/package.conf
  55. # install dependent packages
  56. cd %{_builddir}
  57. for pkg in `cat %{_sourcedir}/packages`; do
  58. %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
  59. cd ${pkg}
  60. cabal configure
  61. cabal build
  62. cabal copy
  63. cabal register --inplace
  64. cd ..
  65. done
  66. # build pandoc-crossref
  67. cd %{name}-%{version}
  68. cabal configure \
  69. --prefix=%{_prefix} \
  70. --libdir=%{_libdir}/%{name}-%{version} \
  71. --libsubdir= \
  72. --datadir=%{_datadir}/%{name}-%{version} \
  73. --datasubdir= \
  74. --docdir=%{_docdir}/%{name}-%{version}
  75. cabal build
  76. cabal haddock || :
  77. cabal copy --destdir=${RPM_BUILD_ROOT}
  78. %install
  79. %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}
  80. %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/*.md \
  81. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/
  82. %{__mv} ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/html/*.md \
  83. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/
  84. %clean
  85. %{__rm} -rf ${RPM_BUILD_ROOT}
  86. %files
  87. %defattr(-, root, root)
  88. %{_bindir}/pandoc-crossref
  89. %{_docdir}/%{name}-%{version}/
  90. %changelog
  91. * Sun Oct 29 2017 Toshiaki Ara <ara_t@384.jp> 0.2.6.0-1
  92. - update to 0.2.6.0
  93. * Thu Feb 02 2017 Toshiaki Ara <ara_t@384.jp> 0.2.4.2-1
  94. - update to 0.2.4.2
  95. - rebuild using ghc-8.0.1
  96. * Sun Jun 19 2016 Toshiaki Ara <ara_t@384.jp> 0.2.1.3-2
  97. - rebuild under pandoc-1.17.1
  98. * Sun Jun 05 2016 Toshiaki Ara <ara_t@384.jp> 0.2.1.3-1
  99. - update to 0.2.1.3
  100. * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 0.2.1.1-1
  101. - new package (devide from pandoc)