# https://fedoraproject.org/wiki/Packaging:Haskell %global pkg_name cmark %ifarch armv7hl # https://github.com/jgm/cmark-hs/issues/6 %bcond_with tests %else %bcond_without tests %endif Name: ghc-%{pkg_name} Version: 0.5.1 Release: 1%{?dist} Summary: Fast, accurate CommonMark (Markdown) parser and renderer License: BSD Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz Patch0: cmark-nobundle.patch BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros # Begin cabal-rpm deps: BuildRequires: ghc-bytestring-devel BuildRequires: ghc-text-devel BuildRequires: pkgconfig(libcmark) %if %{with tests} BuildRequires: ghc-HUnit-devel %endif # End cabal-rpm deps %description This package provides Haskell bindings for , the reference parser for , a fully specified variant of Markdown. %package devel Summary: Haskell %{pkg_name} library development files Provides: %{name}-static = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} Requires(postun): ghc-compiler = %{ghc_version} Requires: %{name}%{?_isa} = %{version}-%{release} # Begin cabal-rpm deps: Requires: pkgconfig(libcmark) # End cabal-rpm deps %description devel This package provides the Haskell %{pkg_name} library development files. %prep %setup -q -n %{pkg_name}-%{version} %patch0 -p1 -b .orig rm -rf cbits cabal-tweak-flag pkgconfig True %build %ghc_lib_build %install %ghc_lib_install rm %{buildroot}%{ghc_pkgdocdir}/LICENSE %check %if %{with tests} %cabal test %endif %post devel %ghc_pkg_recache %postun devel %ghc_pkg_recache %files -f %{name}.files %license LICENSE %files devel -f %{name}-devel.files %doc README.md %changelog * Fri Feb 5 2016 Jens Petersen - 0.5.1-1 - patch to build with system cmark - disable tests on armv7 * Wed Feb 3 2016 Fedora Haskell SIG - spec file generated by cabal-rpm-0.9.9