[10242] | 1 | %define pkg_name pandoc-citeproc |
---|
[10381] | 2 | %define pkg_version 0.10 |
---|
[10242] | 3 | %define pkg_release 1%{?_dist_release} |
---|
| 4 | |
---|
[10381] | 5 | %define pandoc_version 1.17.1 |
---|
[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 |
---|
| 17 | Source1: cmdargs-0.10.14.tar.gz |
---|
| 18 | Source2: aeson-pretty-0.7.2.tar.gz |
---|
| 19 | Source3: conduit-extra-1.1.13.1.tar.gz |
---|
| 20 | Source4: hs-bibutils-5.5.tar.gz |
---|
| 21 | Source5: rfc5051-0.1.0.3.tar.gz |
---|
| 22 | Source6: setenv-0.1.1.3.tar.gz |
---|
| 23 | Source7: xml-types-0.3.6.tar.gz |
---|
| 24 | Source8: xml-conduit-1.3.4.2.tar.gz |
---|
| 25 | Source100: packages |
---|
| 26 | |
---|
| 27 | BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root |
---|
| 28 | |
---|
| 29 | BuildRequires: ghc haskell-platform-base cabal-install |
---|
| 30 | BuildRequires: libffi-devel gmp-devel zlib-devel |
---|
| 31 | |
---|
| 32 | BuildRequires: libghc-data-default-class |
---|
| 33 | BuildRequires: libghc-dlist |
---|
| 34 | BuildRequires: libghc-data-default |
---|
| 35 | BuildRequires: libghc-aeson |
---|
| 36 | BuildRequires: libghc-http-client-tls |
---|
| 37 | BuildRequires: yaml |
---|
| 38 | BuildRequires: libghc-build-pandoc |
---|
[10381] | 39 | BuildRequires: pandoc = %{pandoc_version} |
---|
[10242] | 40 | BuildRequires: pandoc-libs = %{pandoc_version} |
---|
| 41 | |
---|
| 42 | BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl |
---|
| 43 | BuildRequires: hscolour |
---|
| 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} |
---|
| 62 | %setup -q |
---|
| 63 | |
---|
| 64 | %build |
---|
| 65 | # Initialise the package db |
---|
| 66 | ghc-pkg init %{_builddir}/package.conf |
---|
| 67 | |
---|
| 68 | # install dependent packages |
---|
| 69 | cd %{_builddir} |
---|
| 70 | for pkg in `cat %{_sourcedir}/packages`; do |
---|
| 71 | %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz |
---|
| 72 | cd ${pkg} |
---|
| 73 | cabal configure |
---|
| 74 | cabal build |
---|
| 75 | cabal copy |
---|
| 76 | cabal register --inplace |
---|
| 77 | cd .. |
---|
| 78 | done |
---|
| 79 | |
---|
| 80 | # build pandoc-citeproc |
---|
| 81 | cd %{name}-%{version} |
---|
| 82 | cabal configure \ |
---|
| 83 | --prefix=%{_prefix} \ |
---|
| 84 | --libdir=%{_libdir}/%{name}-%{version} \ |
---|
| 85 | --libsubdir= \ |
---|
| 86 | --datadir=%{_datadir}/%{name}-%{version} \ |
---|
| 87 | --datasubdir= \ |
---|
| 88 | --docdir=%{_docdir}/%{name}-%{version} |
---|
| 89 | |
---|
| 90 | cabal build |
---|
| 91 | cabal haddock || : |
---|
| 92 | cabal copy --destdir=${RPM_BUILD_ROOT} |
---|
| 93 | |
---|
| 94 | %install |
---|
| 95 | %{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir} |
---|
| 96 | %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/{changelog,README.md} \ |
---|
| 97 | ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}/ |
---|
| 98 | %{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/man \ |
---|
| 99 | ${RPM_BUILD_ROOT}%{_datadir}/ |
---|
| 100 | |
---|
| 101 | %clean |
---|
| 102 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | %files |
---|
| 106 | %defattr(-, root, root) |
---|
| 107 | %{_bindir}/pandoc-citeproc |
---|
| 108 | %{_datadir}/%{name}-%{version}/ |
---|
| 109 | %{_docdir}/%{name}-%{version}/ |
---|
| 110 | %{_mandir}/man1/ |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | %changelog |
---|
[10381] | 114 | * Sat Jun 18 2016 Toshiaki Ara <ara_t@384.jp> 0.10-1 |
---|
| 115 | - update to 0.10 |
---|
| 116 | |
---|
[10242] | 117 | * Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 0.9.1.1-1 |
---|
| 118 | - new package (devide from pandoc) |
---|
| 119 | |
---|