summaryrefslogtreecommitdiffstats
path: root/pandoc.spec
diff options
context:
space:
mode:
Diffstat (limited to 'pandoc.spec')
-rw-r--r--pandoc.spec86
1 files changed, 69 insertions, 17 deletions
diff --git a/pandoc.spec b/pandoc.spec
index 832d055..0b84c35 100644
--- a/pandoc.spec
+++ b/pandoc.spec
@@ -1,20 +1,28 @@
-Name: pandoc
-Version: 1.12.3.1
-Release: 1%{?dist}
-Summary: Conversion between markup formats
+%global pandoc_ver 1.12.3.1
+%global pandoc_citeproc_ver 0.3.0.1
-License: GPLv2+
-Group: Text/Processing
-URL: http://hackage.haskell.org/package/%{name}
-Source0: http://hackage.haskell.org/packages/archive/%{name}/%{version}/%{name}-%{version}.tar.gz
+# nothing to see here
+%global debug_package %{nil}
+
+Name: pandoc
+Version: %{pandoc_ver}
+Release: 3%{?dist}
+Summary: Conversion between markup formats
+
+License: GPLv2+
+Group: Text/Processing
+URL: http://hackage.haskell.org/package/%{name}
+Source0: http://hackage.haskell.org/package/%{name}/%{version}/%{name}-%{version}.tar.gz
+Source1: http://hackage.haskell.org/package/%{name}-citeproc/%{pandoc_citeproc_ver}/%{name}-citeproc-%{pandoc_citeproc_ver}.tar.gz
BuildRequires: ghc-Cabal-devel
-BuildRequires: ghc-rpm-macros
+#BuildRequires: ghc-rpm-macros
# Begin cabal-rpm deps:
BuildRequires: alex
#BuildRequires: chrpath
BuildRequires: ghc-HTTP-devel
#BuildRequires: ghc-aeson-devel
+#BuildRequires: ghc-aeson-pretty-devel
BuildRequires: ghc-array-devel
#BuildRequires: ghc-attoparsec-devel
#BuildRequires: ghc-base64-bytestring-devel
@@ -27,7 +35,9 @@ BuildRequires: ghc-containers-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-extensible-exceptions-devel
BuildRequires: ghc-filepath-devel
+#BuildRequires: ghc-hexpat-devel
#BuildRequires: ghc-highlighting-kate-devel
+#BuildRequires: ghc-hs-bibutils-devel
#BuildRequires: ghc-hslua-devel
#BuildRequires: ghc-http-conduit-devel
#BuildRequires: ghc-http-types-devel
@@ -39,6 +49,8 @@ BuildRequires: ghc-old-time-devel
BuildRequires: ghc-parsec-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-random-devel
+#BuildRequires: ghc-rfc5051-devel
+BuildRequires: ghc-split-devel
BuildRequires: ghc-syb-devel
#BuildRequires: ghc-tagsoup-devel
#BuildRequires: ghc-temporary-devel
@@ -80,27 +92,53 @@ target format. Thus, adding an input or output format requires only adding a
reader or writer.
+%package citeproc
+Summary: Supports using pandoc with citeproc
+Version: %{pandoc_citeproc_ver}
+Group: Text/Processing
+License: BSD and GPLv2+
+
+%description citeproc
+This package contains an executable: pandoc-citeproc, which works as a
+pandoc filter, and also has a mode for converting bibliographic databases
+a YAML format suitable for inclusion in pandoc YAML metadata.
+
+
%global cabal cabal-dev
%prep
-%setup -q
-
-cabal-tweak-flag embed_data_files True
+%setup -q -a1
%build
-%cabal install-deps
-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir}
+%global cabal cabal-dev
+%define cabal_configure %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} -f "embed_data_files" --ghc-options="-optl-static -optl-pthread"
+
+# sandbox pandoc-citeproc deps first since it includes pandoc
+cd pandoc-citeproc-%{pandoc_citeproc_ver}
+%cabal -s ../cabal-dev install-deps
+cd ..
+# build pandoc
+%cabal_configure
%cabal build
+# build pandoc-citeproc
+cd pandoc-citeproc-%{pandoc_citeproc_ver}
+%cabal_configure -s ../cabal-dev
+%cabal -s ../cabal-dev build
%install
rm -rf %{buildroot}
%cabal copy --destdir=%{buildroot} -v
+cd pandoc-citeproc-%{pandoc_citeproc_ver}
+%cabal -s ../cabal-dev copy --destdir=%{buildroot} -v
-rm -rf %{buildroot}%{_libdir}/%{name}-%{version}
-rm -rf %{buildroot}%{_datadir}/%{name}-%{version}
+# don't need the libs and the data files are embedded
+rm -r %{buildroot}%{_libdir}/%{name}-%{pandoc_ver}
+rm -r %{buildroot}%{_datadir}/%{name}-%{pandoc_ver}
+rm -r %{buildroot}%{_libdir}/pandoc-citeproc-%{pandoc_citeproc_ver}
+rm -r %{buildroot}%{_datadir}/pandoc-citeproc-%{pandoc_citeproc_ver}
%clean
@@ -110,11 +148,25 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING README
+%doc cabal-dev/share/doc/*
%{_bindir}/%{name}
%{_mandir}/man1/pandoc.1*
%{_mandir}/man5/pandoc_markdown.5*
+%files citeproc
+%defattr(-,root,root,-)
+%doc pandoc-citeproc-%{pandoc_citeproc_ver}/LICENSE pandoc-citeproc-%{pandoc_citeproc_ver}/README.md
+%doc cabal-dev/share/doc/*
+%{_bindir}/%{name}-citeproc
+%{_mandir}/man1/pandoc-citeproc.1*
+
+
%changelog
+* Sun Feb 2 2014 Jens Petersen <petersen@redhat.com> - 1.12.3.1-3
+- include pandoc-citeproc-0.3.0.1
+- link programs statically
+- include licenses of bundled libraries
+
* Sat Jan 25 2014 Jens Petersen <petersen@redhat.com> - 1.12.3.1-1
-- haskell statically linked pandoc built with cabal-install
+- build with cabal-dev and embed_data_files