%define pkg_name pandoc-citeproc %define pkg_version 0.12.2.5 %define pkg_release 1%{?_dist_release} %define pandoc_version 2.0.6 Summary: Library and executable for using citeproc with pandoc Name: %{pkg_name} Version: %{pkg_version} Release: %{pkg_release} License: BSD3 Group: Applications/Text URL: http://hackage.haskell.org Source0: %{name}-%{version}.tar.gz Source1: packages # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done Source11: hs-bibutils-6.2.0.1.tar.gz Source12: rfc5051-0.1.0.3.tar.gz Source13: setenv-0.1.1.3.tar.gz Source14: typed-process-0.2.1.0.tar.gz Source15: xml-types-0.3.6.tar.gz Source16: conduit-extra-1.2.3.2.tar.gz Source17: xml-conduit-1.4.0.4.tar.gz BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root BuildRequires: ghc haskell-platform BuildRequires: libffi-devel gmp-devel zlib-devel BuildRequires: libghc-data-default-class BuildRequires: libghc-dlist BuildRequires: libghc-data-default BuildRequires: libghc-aeson BuildRequires: libghc-http-client-tls BuildRequires: yaml BuildRequires: libghc-build-pandoc BuildRequires: pandoc = %{pandoc_version} BuildRequires: pandoc-libs = %{pandoc_version} BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl Requires: pandoc = %{pandoc_version} Vendor: Project Vine Distribution: Vine Linux Packager: ara_t %description The pandoc-citeproc library exports functions for using the citeproc system with pandoc. It relies on citeproc-hs, a library for rendering bibliographic reference citations into a variety of styles using a macro language called Citation Style Language (CSL). More details on CSL can be found here: http://citationstyles.org/. %prep %{__rm} -rf ${RPM_BUILD_ROOT} %{__rm} -rf %{_builddir}/package.conf %{__rm} -rf ${HOME}/.ghc %setup -q %build # Initialise the package db ghc-pkg init %{_builddir}/package.conf # install dependent packages cd %{_builddir} for pkg in `cat %{SOURCE1}`; do %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz cd ${pkg} cabal configure cabal build cabal copy cabal register --inplace cd .. done # build pandoc-citeproc cd %{name}-%{version} cabal configure \ --prefix=%{_prefix} \ --libdir=%{_libdir}/%{name}-%{version} \ --libsubdir= \ --datadir=%{_datadir}/%{name}-%{version} \ --datasubdir= \ --docdir=%{_docdir}/%{name}-%{version} cabal build cabal haddock || : cabal copy --destdir=${RPM_BUILD_ROOT} %install %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir} %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/{changelog,README.md} \ ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/man \ ${RPM_BUILD_ROOT}%{_datadir}/ %clean %{__rm} -rf ${RPM_BUILD_ROOT} %files %defattr(-, root, root) %{_bindir}/pandoc-citeproc %{_datadir}/%{name}-%{version}/ %{_docdir}/%{name}-%{version}/ %{_mandir}/man1/ %changelog * Tue Jan 09 2018 Toshiaki Ara 0.12.2.5-1 - update to 0.12.2.5 - build using ghc-8.2.2 * Tue Feb 21 2017 Toshiaki Ara 0.10.4.1-1 - update to 0.10.4.1 - build using ghc-8.0.2 * Fri Feb 03 2017 Toshiaki Ara 0.10.4-1 - update to 0.10.4 - build using ghc-8.0.1 * Sat Jun 18 2016 Toshiaki Ara 0.10-1 - update to 0.10 * Fri May 06 2016 Toshiaki Ara 0.9.1.1-1 - new package (devide from pandoc)