%define ghc_ver %(ghc --version | sed "s|.*version ||") %define pkgname %(echo %name | sed "s|^ghc-||") Name: ghc-pandoc Version: 1.11.1 Release: 1mamba Summary: A library and command-line tool for converting from one markup format to another Group: Applications/Publishing Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://code.google.com/p/pandoc/ Source: https://pandoc.googlecode.com/files/pandoc-%{version}.tar.gz License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgcc BuildRequires: libgmp-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: ghc BuildRequires: haskell-platform BuildRequires: ghc-blaze-html BuildRequires: ghc-citeproc-hs BuildRequires: ghc-extensible-exceptions BuildRequires: ghc-pandoc-types < 1.11 BuildRequires: ghc-data-default BuildRequires: ghc-json BuildRequires: ghc-xml BuildRequires: ghc-temporary BuildRequires: ghc-tagsoup < 0.13 BuildRequires: ghc-highlighting-kate BuildRequires: ghc-texmath BuildRequires: ghc-base64-bytestring BuildRequires: ghc-zip-archive BuildRequires: hscolour BuildRequires: haskell-platform Requires: ghc-blaze-html Requires: ghc-citeproc-hs Requires: ghc-extensible-exceptions Requires: ghc-pandoc-types < 1.11 Requires: ghc-data-default Requires: ghc-json Requires: ghc-xml Requires: ghc-temporary Requires: ghc-tagsoup < 0.13 Requires: ghc-highlighting-kate Requires: ghc-texmath Requires: ghc-base64-bytestring Requires: ghc-zip-archive Requires: ghc = %{ghc_ver} BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read markdown and (subsets of) reStructuredText, HTML, Textile, DocBook, and LaTeX, and it can write markdown, reStructuredText, Textile, HTML, LaTeX, ConTeXt, Docbook XML, OpenDocument XML, GNU Texinfo, Emacs Org-mode, RTF, ODT, MediaWiki markup, groff man pages, EPUB, and S5 and Slidy HTML slide shows. Pandoc extends standard markdown syntax with footnotes, embedded LaTeX, definition lists, tables, and many other features. A compatibility mode is provided for those who need a drop-in replacement for Markdown.pl. In contrast to existing tools for converting markdown to HTML, which use regex substitutions, pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document, and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. %package -n %{pkgname} Group: Applications/Development Summary: A command-line tool for converting from one markup format to another %description -n %{pkgname} A command-line tool for converting from one markup format to another. %prep %setup -q -n %{pkgname}-%{version} %build runghc Setup.hs configure \ --prefix=%{_prefix} --libdir=%{_libdir} runghc Setup.hs build runghc Setup.hs haddock --html-location=URL --hyperlink-source %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" runghc Setup.hs copy --destdir=%{buildroot} runghc Setup.hs register \ --gen-pkg-config="%{buildroot}%{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf" %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post ghc-pkg register %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/%{pkgname}-%{version}.conf &>/dev/null || true : %preun ghc-pkg unregister %{pkgname}-%{version} || true : %files %defattr(-,root,root) %dir %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version} %{_libdir}/ghc-%{ghc_ver}/%{pkgname}-%{version}/* %dir %{_docdir}/%{pkgname}-%{version} %{_docdir}/%{pkgname}-%{version}/COPYING %dir %{_docdir}/%{pkgname}-%{version}/html %{_docdir}/%{pkgname}-%{version}/html/* %{_mandir}/man1/%{pkgname}.1* %{_mandir}/man5/%{pkgname}*.5* %files -n %{pkgname} %defattr(-,root,root) %{_bindir}/pandoc %dir %{_datadir}/%{pkgname}-%{version} %{_datadir}/%{pkgname}-%{version}/* %changelog * Tue Apr 30 2013 Silvan Calarco 1.11.1-1mamba - package created by silvan using the webbuild interface