[10242] | 1 | %define pkg_name pandoc-citeproc |
---|
[11383] | 2 | %define pkg_version 0.12.2.5 |
---|
[10242] | 3 | %define pkg_release 1%{?_dist_release} |
---|
| 4 | |
---|
[11383] | 5 | %define pandoc_version 2.0.6 |
---|
[10242] | 6 | |
---|
| 7 | Summary: Library and executable for using citeproc with pandoc |
---|
| 8 | Name: %{pkg_name} |
---|
| 9 | Version: %{pkg_version} |
---|
| 10 | Release: %{pkg_release} |
---|
| 11 | |
---|
| 12 | License: BSD3 |
---|
| 13 | Group: Applications/Text |
---|
| 14 | URL: http://hackage.haskell.org |
---|
| 15 | |
---|
| 16 | Source0: %{name}-%{version}.tar.gz |
---|
[10917] | 17 | Source1: packages |
---|
[10242] | 18 | |
---|
[10917] | 19 | # num=11; for pkg in `cat packages`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done |
---|
[11383] | 20 | Source11: hs-bibutils-6.2.0.1.tar.gz |
---|
| 21 | Source12: rfc5051-0.1.0.3.tar.gz |
---|
| 22 | Source13: setenv-0.1.1.3.tar.gz |
---|
| 23 | Source14: typed-process-0.2.1.0.tar.gz |
---|
| 24 | Source15: xml-types-0.3.6.tar.gz |
---|
| 25 | Source16: conduit-extra-1.2.3.2.tar.gz |
---|
| 26 | Source17: xml-conduit-1.4.0.4.tar.gz |
---|
[10917] | 27 | |
---|
[10242] | 28 | BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root |
---|
| 29 | |
---|
[10917] | 30 | BuildRequires: ghc haskell-platform |
---|
[10242] | 31 | BuildRequires: libffi-devel gmp-devel zlib-devel |
---|
| 32 | |
---|
| 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 |
---|
[10381] | 40 | BuildRequires: pandoc = %{pandoc_version} |
---|
[10242] | 41 | BuildRequires: pandoc-libs = %{pandoc_version} |
---|
| 42 | |
---|
| 43 | BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl |
---|
| 44 | |
---|
| 45 | Requires: pandoc = %{pandoc_version} |
---|
| 46 | |
---|
| 47 | Vendor: Project Vine |
---|
| 48 | Distribution: Vine Linux |
---|
| 49 | Packager: ara_t |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | %description |
---|
| 53 | The pandoc-citeproc library exports functions for using the citeproc system |
---|
| 54 | with pandoc. It relies on citeproc-hs, a library for rendering bibliographic |
---|
| 55 | reference citations into a variety of styles using a macro language called |
---|
| 56 | Citation Style Language (CSL). |
---|
| 57 | More details on CSL can be found here: http://citationstyles.org/. |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | %prep |
---|
| 61 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
[10917] | 62 | %{__rm} -rf %{_builddir}/package.conf |
---|
| 63 | %{__rm} -rf ${HOME}/.ghc |
---|
[10242] | 64 | %setup -q |
---|
| 65 | |
---|
| 66 | %build |
---|
| 67 | # Initialise the package db |
---|
| 68 | ghc-pkg init %{_builddir}/package.conf |
---|
| 69 | |
---|
| 70 | # install dependent packages |
---|
| 71 | cd %{_builddir} |
---|
[10917] | 72 | for pkg in `cat %{SOURCE1}`; do |
---|
[10242] | 73 | %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz |
---|
| 74 | cd ${pkg} |
---|
| 75 | cabal configure |
---|
| 76 | cabal build |
---|
| 77 | cabal copy |
---|
| 78 | cabal register --inplace |
---|
| 79 | cd .. |
---|
| 80 | done |
---|
| 81 | |
---|
| 82 | # build pandoc-citeproc |
---|
| 83 | cd %{name}-%{version} |
---|
| 84 | cabal configure \ |
---|
| 85 | --prefix=%{_prefix} \ |
---|
| 86 | --libdir=%{_libdir}/%{name}-%{version} \ |
---|
| 87 | --libsubdir= \ |
---|
| 88 | --datadir=%{_datadir}/%{name}-%{version} \ |
---|
| 89 | --datasubdir= \ |
---|
| 90 | --docdir=%{_docdir}/%{name}-%{version} |
---|
| 91 | |
---|
| 92 | cabal build |
---|
| 93 | cabal haddock || : |
---|
| 94 | cabal copy --destdir=${RPM_BUILD_ROOT} |
---|
| 95 | |
---|
| 96 | %install |
---|
| 97 | %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir} |
---|
| 98 | %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/{changelog,README.md} \ |
---|
| 99 | ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
---|
| 100 | %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/man \ |
---|
| 101 | ${RPM_BUILD_ROOT}%{_datadir}/ |
---|
| 102 | |
---|
| 103 | %clean |
---|
| 104 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | %files |
---|
| 108 | %defattr(-, root, root) |
---|
| 109 | %{_bindir}/pandoc-citeproc |
---|
| 110 | %{_datadir}/%{name}-%{version}/ |
---|
| 111 | %{_docdir}/%{name}-%{version}/ |
---|
| 112 | %{_mandir}/man1/ |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | %changelog |
---|
[11383] | 116 | * Tue Jan 09 2018 Toshiaki Ara <ara_t@384.jp> 0.12.2.5-1 |
---|
| 117 | - update to 0.12.2.5 |
---|
| 118 | - build using ghc-8.2.2 |
---|
[11217] | 119 | |
---|
[11383] | 120 | * Tue Feb 21 2017 Toshiaki Ara <ara_t@384.jp> 0.10.4.1-1 |
---|
| 121 | - update to 0.10.4.1 |
---|
| 122 | - build using ghc-8.0.2 |
---|
| 123 | |
---|
[10917] | 124 | * Fri Feb 03 2017 Toshiaki Ara <ara_t@384.jp> 0.10.4-1 |
---|
| 125 | - update to 0.10.4 |
---|
| 126 | - build using ghc-8.0.1 |
---|
| 127 | |
---|
[10381] | 128 | * Sat Jun 18 2016 Toshiaki Ara <ara_t@384.jp> 0.10-1 |
---|
| 129 | - update to 0.10 |
---|
| 130 | |
---|
[10242] | 131 | * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 0.9.1.1-1 |
---|
| 132 | - new package (devide from pandoc) |
---|
| 133 | |
---|