pandoc-citeproc-vl.spec 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. %define pkg_name pandoc-citeproc
  2. %define pkg_version 0.11.1.2
  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-compat-0.9.3.tar.gz
  16. Source12: cmdargs-0.10.18.tar.gz
  17. Source13: aeson-pretty-0.8.5.tar.gz
  18. Source14: conduit-extra-1.2.0.tar.gz
  19. Source15: hs-bibutils-6.2.0.1.tar.gz
  20. Source16: rfc5051-0.1.0.3.tar.gz
  21. Source17: setenv-0.1.1.3.tar.gz
  22. Source18: xml-types-0.3.6.tar.gz
  23. Source19: xml-conduit-1.6.0.tar.gz
  24. BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
  25. BuildRequires: ghc haskell-platform
  26. BuildRequires: libffi-devel gmp-devel zlib-devel
  27. BuildRequires: libghc-data-default-class
  28. BuildRequires: libghc-dlist
  29. BuildRequires: libghc-data-default
  30. BuildRequires: libghc-aeson
  31. BuildRequires: libghc-http-client-tls
  32. BuildRequires: yaml
  33. BuildRequires: libghc-build-pandoc
  34. BuildRequires: pandoc = %{pandoc_version}
  35. BuildRequires: pandoc-libs = %{pandoc_version}
  36. BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
  37. Requires: pandoc = %{pandoc_version}
  38. Vendor: Project Vine
  39. Distribution: Vine Linux
  40. Packager: ara_t
  41. %description
  42. The pandoc-citeproc library exports functions for using the citeproc system
  43. with pandoc. It relies on citeproc-hs, a library for rendering bibliographic
  44. reference citations into a variety of styles using a macro language called
  45. Citation Style Language (CSL).
  46. More details on CSL can be found here: http://citationstyles.org/.
  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 %{SOURCE1}`; 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-citeproc
  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}/{changelog,README.md} \
  81. ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/
  82. %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/man \
  83. ${RPM_BUILD_ROOT}%{_datadir}/
  84. %clean
  85. %{__rm} -rf ${RPM_BUILD_ROOT}
  86. %files
  87. %defattr(-, root, root)
  88. %{_bindir}/pandoc-citeproc
  89. %{_datadir}/%{name}-%{version}/
  90. %{_docdir}/%{name}-%{version}/
  91. %{_mandir}/man1/
  92. %changelog
  93. * Sun Oct 29 2017 Toshiaki Ara <ara_t@384.jp> 0.11.1.2-1
  94. - update to 0.11.1.2
  95. * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.10.4-1
  96. - update to 0.10.4
  97. - build using ghc-8.0.1
  98. * Sat Jun 18 2016 Toshiaki Ara <ara_t@384.jp> 0.10-1
  99. - update to 0.10
  100. * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 0.9.1.1-1
  101. - new package (devide from pandoc)