pandoc-crossref-vl.spec 3.8 KB

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