|
@@ -1,10 +1,8 @@
|
|
%define pkg_name pandoc
|
|
%define pkg_name pandoc
|
|
-%define pkg_version 1.16.0.2
|
|
|
|
-%define pkg_release 5%{?_dist_release}
|
|
|
|
-
|
|
|
|
-%define citeproc_version 0.9
|
|
|
|
-%define crossref_version 0.1.6.5
|
|
|
|
|
|
+%define pkg_version 1.17.0.3
|
|
|
|
+%define pkg_release 1%{?_dist_release}
|
|
|
|
|
|
|
|
+%define ghc_version 7.10.3
|
|
|
|
|
|
Summary: general markup converter
|
|
Summary: general markup converter
|
|
Summary(ja): 汎用マークアップ変換ツール
|
|
Summary(ja): 汎用マークアップ変換ツール
|
|
@@ -18,41 +16,6 @@ Group: Applications/Text
|
|
URL: http://hackage.haskell.org
|
|
URL: http://hackage.haskell.org
|
|
|
|
|
|
Source0: pandoc-%{pkg_version}/pandoc-%{pkg_version}.tar.gz
|
|
Source0: pandoc-%{pkg_version}/pandoc-%{pkg_version}.tar.gz
|
|
-Source1: pandoc-citeproc-%{citeproc_version}.tar.gz
|
|
|
|
-Source2: pandoc-crossref-%{crossref_version}.tar.gz
|
|
|
|
-
|
|
|
|
-Source3: JuicyPixels-3.2.7.tar.gz
|
|
|
|
-Source4: SHA-1.6.4.2.tar.gz
|
|
|
|
-Source5: blaze-markup-0.7.0.3.tar.gz
|
|
|
|
-Source6: blaze-html-0.8.1.1.tar.gz
|
|
|
|
-Source7: cmark-0.5.1.tar.gz
|
|
|
|
-Source8: cmdargs-0.10.14.tar.gz
|
|
|
|
-Source9: aeson-pretty-0.7.2.tar.gz
|
|
|
|
-Source10: conduit-extra-1.1.10.1.tar.gz
|
|
|
|
-Source11: data-accessor-0.2.2.7.tar.gz
|
|
|
|
-Source12: data-accessor-transformers-0.2.1.7.tar.gz
|
|
|
|
-Source13: digest-0.0.1.2.tar.gz
|
|
|
|
-Source14: extensible-exceptions-0.1.1.4.tar.gz
|
|
|
|
-Source15: haddock-library-1.2.1.tar.gz
|
|
|
|
-Source16: hs-bibutils-5.5.tar.gz
|
|
|
|
-Source17: hslua-0.4.1.tar.gz
|
|
|
|
-Source18: pandoc-types-1.16.1.tar.gz
|
|
|
|
-Source19: regex-pcre-builtin-0.94.4.8.8.35.tar.gz
|
|
|
|
-Source20: rfc5051-0.1.0.3.tar.gz
|
|
|
|
-Source21: setenv-0.1.1.3.tar.gz
|
|
|
|
-Source22: tagsoup-0.13.8.tar.gz
|
|
|
|
-Source23: temporary-1.2.0.4.tar.gz
|
|
|
|
-Source24: unix-compat-0.4.1.4.tar.gz
|
|
|
|
-Source25: filemanip-0.3.6.3.tar.gz
|
|
|
|
-Source26: utf8-string-1.0.1.1.tar.gz
|
|
|
|
-Source27: highlighting-kate-0.6.1.tar.gz
|
|
|
|
-Source28: xml-1.3.14.tar.gz
|
|
|
|
-Source29: texmath-0.8.4.2.tar.gz
|
|
|
|
-Source30: xml-types-0.3.6.tar.gz
|
|
|
|
-Source31: xml-conduit-1.3.3.1.tar.gz
|
|
|
|
-Source32: zip-archive-0.2.3.7.tar.gz
|
|
|
|
-
|
|
|
|
-Source100: packages
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
|
|
|
|
|
|
@@ -65,6 +28,7 @@ BuildRequires: libghc-data-default
|
|
BuildRequires: libghc-aeson
|
|
BuildRequires: libghc-aeson
|
|
BuildRequires: libghc-http-client-tls
|
|
BuildRequires: libghc-http-client-tls
|
|
BuildRequires: yaml
|
|
BuildRequires: yaml
|
|
|
|
+BuildRequires: libghc-build-pandoc
|
|
|
|
|
|
BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
|
|
BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
|
|
BuildRequires: hscolour
|
|
BuildRequires: hscolour
|
|
@@ -126,141 +90,84 @@ markdownからHTMLに変換する既存のツールは正規表現で置換し
|
|
ことだけが必要です。
|
|
ことだけが必要です。
|
|
|
|
|
|
|
|
|
|
-%package citeproc
|
|
|
|
-Version: %{citeproc_version}
|
|
|
|
-Summary: Library and executable for using citeproc with pandoc
|
|
|
|
-License: BSD3
|
|
|
|
-Group: Applications/Text
|
|
|
|
-Requires: pandoc = %{pkg_version}-%{release}
|
|
|
|
-
|
|
|
|
-%description citeproc
|
|
|
|
-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/.
|
|
|
|
-
|
|
|
|
|
|
+%package libs
|
|
|
|
+Summary: Library of pandoc
|
|
|
|
+Group: Development/Libraries
|
|
|
|
|
|
-%package crossref
|
|
|
|
-Summary: A pandoc filter for numbering figures, equations, tables and cross-references to them
|
|
|
|
-Version: %{crossref_version}
|
|
|
|
-License: GPLv2
|
|
|
|
-Group: Applications/Text
|
|
|
|
-Requires: pandoc = %{pkg_version}-%{release}
|
|
|
|
-
|
|
|
|
-%description crossref
|
|
|
|
-pandoc-crossref is a pandoc filter for numbering figures, equations, tables
|
|
|
|
- and cross-references to them. Input file (like demo.md) can be converted into
|
|
|
|
- html, latex, pdf, md or other formats.
|
|
|
|
-Optionally, you can use cleveref for latex/pdf output,
|
|
|
|
- e.g. cleveref pdf, cleveref latex, and listings package,
|
|
|
|
- e.g. listings pdf, listings latex.
|
|
|
|
-
|
|
|
|
-You can also enable per-chapter numbering (as with --chapters for latex output).
|
|
|
|
-You need to specify -M chapters for non-latex/pdf output however.
|
|
|
|
- Examples: html, markdown, latex, pdf.
|
|
|
|
|
|
+%description libs
|
|
|
|
+Librariy of pandoc for building pandoc-citeproc and pandoc-crossref
|
|
|
|
|
|
|
|
|
|
%prep
|
|
%prep
|
|
%{__rm} -rf ${RPM_BUILD_ROOT}
|
|
%{__rm} -rf ${RPM_BUILD_ROOT}
|
|
-%setup -q -b 1 -b 2
|
|
|
|
|
|
+%setup -q
|
|
|
|
|
|
%build
|
|
%build
|
|
# Initialise the package db
|
|
# Initialise the package db
|
|
ghc-pkg init %{_builddir}/package.conf
|
|
ghc-pkg init %{_builddir}/package.conf
|
|
|
|
|
|
-# install dependent packages
|
|
|
|
-cd %{_builddir}
|
|
|
|
-for pkg in `cat %{_sourcedir}/packages`; do
|
|
|
|
- %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
|
|
|
|
- cd ${pkg}
|
|
|
|
- cabal configure
|
|
|
|
- cabal build
|
|
|
|
- cabal copy
|
|
|
|
- cabal register --inplace
|
|
|
|
- cd ..
|
|
|
|
-done
|
|
|
|
-
|
|
|
|
-# build pandoc and related packages
|
|
|
|
-for pkg in pandoc-%{pkg_version} pandoc-citeproc-%{citeproc_version} \
|
|
|
|
- pandoc-crossref-%{crossref_version};
|
|
|
|
-do
|
|
|
|
- cd %{_builddir}/${pkg}
|
|
|
|
- cabal configure \
|
|
|
|
- --prefix=%{_prefix} \
|
|
|
|
- --libdir=%{_libdir}/${pkg} \
|
|
|
|
- --libsubdir= \
|
|
|
|
- --datadir=%{_datadir}/${pkg} \
|
|
|
|
- --datasubdir= \
|
|
|
|
- --docdir=%{_docdir}/${pkg} \
|
|
|
|
- --disable-shared
|
|
|
|
-
|
|
|
|
- cabal build
|
|
|
|
- cabal haddock
|
|
|
|
- cabal copy --destdir=${RPM_BUILD_ROOT}
|
|
|
|
- cabal register --inplace
|
|
|
|
-done
|
|
|
|
|
|
+PKG_CONF_DIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
|
|
|
|
+%{__mkdir_p} ${PKG_CONF_DIR}
|
|
|
|
+
|
|
|
|
+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}
|
|
|
|
+cabal register --gen-pkg-config=${PKG_CONF_DIR}/%{name}.conf
|
|
|
|
|
|
%install
|
|
%install
|
|
-# pandoc
|
|
|
|
-cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-%{pkg_version}
|
|
|
|
-%{__rm} COPYRIGHT README
|
|
|
|
-%{__mv} man ${RPM_BUILD_ROOT}%{_mandir}/
|
|
|
|
-
|
|
|
|
-# pandoc-citeproc
|
|
|
|
-%{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version}
|
|
|
|
-cd ${RPM_BUILD_ROOT}%{_datadir}/pandoc-citeproc-%{citeproc_version}
|
|
|
|
-%{__mv} README.md changelog \
|
|
|
|
- ${RPM_BUILD_ROOT}%{_docdir}/pandoc-citeproc-%{citeproc_version}
|
|
|
|
-%{__mv} man/man1/* ${RPM_BUILD_ROOT}%{_mandir}/man1
|
|
|
|
-%{__rm} -rf man
|
|
|
|
-
|
|
|
|
-# pandoc-crossref
|
|
|
|
-%{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version}
|
|
|
|
-%{__install} -m 644 \
|
|
|
|
- %{_builddir}/pandoc-crossref-%{crossref_version}/{demo,LICENSE,README}.md \
|
|
|
|
- ${RPM_BUILD_ROOT}%{_docdir}/pandoc-crossref-%{crossref_version}
|
|
|
|
-%{__rm} -rf ${RPM_BUILD_ROOT}%{_datadir}/pandoc-crossref-%{crossref_version}
|
|
|
|
-
|
|
|
|
-# delete unnecessary folder
|
|
|
|
-%{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}
|
|
|
|
|
|
+%{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
|
|
|
|
+%{__cp} BUGS changelog CONTRIBUTING.md COPYING COPYRIGHT README \
|
|
|
|
+ ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
|
|
|
|
+%{__rm} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/{COPYRIGHT,README}
|
|
|
|
+
|
|
|
|
+%{__mv} ${RPM_BUILD_ROOT}%{_datadir}/%{name}-%{version}/man \
|
|
|
|
+ ${RPM_BUILD_ROOT}%{_datadir}
|
|
|
|
|
|
%clean
|
|
%clean
|
|
%{__rm} -rf ${RPM_BUILD_ROOT}
|
|
%{__rm} -rf ${RPM_BUILD_ROOT}
|
|
|
|
|
|
|
|
+%post libs
|
|
|
|
+ghc-pkg recache
|
|
|
|
+
|
|
|
|
+%postun libs
|
|
|
|
+ghc-pkg recache
|
|
|
|
+
|
|
|
|
|
|
%files
|
|
%files
|
|
%defattr(-, root, root)
|
|
%defattr(-, root, root)
|
|
-%doc COPYING COPYRIGHT README
|
|
|
|
%{_bindir}/pandoc
|
|
%{_bindir}/pandoc
|
|
-# %{_libdir}/pandoc-%{pkg_version}/
|
|
|
|
-%{_datadir}/pandoc-%{pkg_version}/
|
|
|
|
|
|
+%{_datadir}/%{name}-%{version}/
|
|
|
|
+%{_docdir}/%{name}-%{version}/
|
|
%{_mandir}/man1/pandoc.1.gz
|
|
%{_mandir}/man1/pandoc.1.gz
|
|
|
|
|
|
-%files citeproc
|
|
|
|
-%defattr(-, root, root)
|
|
|
|
-%{_bindir}/pandoc-citeproc
|
|
|
|
-# %{_libdir}/pandoc-citeproc-%{citeproc_version}/
|
|
|
|
-%{_datadir}/pandoc-citeproc-%{citeproc_version}/locales/
|
|
|
|
-%{_datadir}/pandoc-citeproc-%{citeproc_version}/chicago-author-date.csl
|
|
|
|
-%{_docdir}/pandoc-citeproc-%{citeproc_version}/
|
|
|
|
-%{_mandir}/man1/pandoc-citeproc.1.gz
|
|
|
|
-
|
|
|
|
-%files crossref
|
|
|
|
|
|
+%files libs
|
|
%defattr(-, root, root)
|
|
%defattr(-, root, root)
|
|
-%{_bindir}/pandoc-crossref
|
|
|
|
-# %{_libdir}/pandoc-crossref-%{crossref_version}/
|
|
|
|
-%{_docdir}/pandoc-crossref-%{crossref_version}/
|
|
|
|
|
|
+%{_libdir}/%{name}-%{version}/
|
|
|
|
+%{_libdir}/ghc-%{ghc_version}/
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
-* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-5
|
|
|
|
|
|
+* Fri May 06 2016 Toshiaki Ara <ara_t@384.jp> 1.17.0.3-5
|
|
|
|
+- update to 1.17.0.3
|
|
|
|
+- add BuildRequires: libghc-build-pandoc
|
|
|
|
+- provide pandoc-libs for building pandoc-citeproc and pacdoc-crossref
|
|
|
|
+- delete subpackages: pandoc-citeproc and pacdoc-crossref
|
|
|
|
+
|
|
|
|
+* Tue Apr 12 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-5
|
|
- correct SPEC file
|
|
- correct SPEC file
|
|
|
|
|
|
-* Mon Mar 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-4
|
|
|
|
|
|
+* Mon Mar 07 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-4
|
|
- correct pandoc-citeproc error
|
|
- correct pandoc-citeproc error
|
|
|
|
|
|
-* Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.3-2
|
|
|
|
|
|
+* Tue Mar 01 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-2
|
|
- rebuild under dependent rpm packages
|
|
- rebuild under dependent rpm packages
|
|
|
|
|
|
* Sun Feb 21 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-2
|
|
* Sun Feb 21 2016 Toshiaki Ara <ara_t@384.jp> 1.16.0.2-2
|