# generated by cabal-rpm-2.1.5 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ %ifarch ppc64le # pandoc --version crashes with +lua feature # https://bugzilla.redhat.com/show_bug.cgi?id=2177568 %bcond lua 0 %else %bcond lua 1 %endif %bcond server 0 Name: pandoc-cli Version: 0.1.1.1 Release: 1%{?dist} Summary: Conversion between documentation formats License: GPL-2.0-or-later Url: https://hackage.haskell.org/package/%{name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz # End cabal-rpm sources # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-base-devel %if %{with lua} BuildRequires: ghc-hslua-cli-devel %endif BuildRequires: ghc-pandoc-devel %if %{with lua} BuildRequires: ghc-pandoc-lua-engine-devel %endif %if %{with server} BuildRequires: ghc-pandoc-server-devel BuildRequires: ghc-safe-devel %endif %if %{with lua} BuildRequires: ghc-temporary-devel %endif BuildRequires: ghc-text-devel %if %{with server} BuildRequires: ghc-wai-extra-devel BuildRequires: ghc-warp-devel %endif # End cabal-rpm deps Obsoletes: pandoc < 3.1.3-28 # temporary nvr until version gets bumped Provides: pandoc = 3.1.3-28 # temporary for bash completion BuildRequires: pandoc %description Pandoc-cli provides a command-line executable that uses the pandoc library to convert between markup formats. %prep # Begin cabal-rpm setup: %setup -q # End cabal-rpm setup %build %if %{with lua} %define cabal_configure_options -f lua %else # for ppc64le, pandoc --version crashes with +lua feature # https://bugzilla.redhat.com/show_bug.cgi?id=2177568 %define cabal_configure_options -f -lua %endif # Begin cabal-rpm build: %ghc_bin_build # End cabal-rpm build %install # Begin cabal-rpm install %ghc_bin_install # End cabal-rpm install %if %{with lua} ln -s pandoc %{buildroot}%{_bindir}/pandoc-lua %endif %if %{with server} ln -s pandoc %{buildroot}%{_bindir}/pandoc-server %endif mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/ %{buildroot}%{_bindir}/pandoc --bash-completion > %{buildroot}%{_datadir}/bash-completion/completions/pandoc %check # crashing on ppc64le with +lua %{buildroot}%{_bindir}/pandoc -v %if %{with lua} # make sure lua enabled echo | %{buildroot}%{_bindir}/pandoc --data-dir=%{buildroot}%{_datadir}/%{pandoc}/data --lua-filter /dev/null %endif %files # Begin cabal-rpm files: %license COPYING.md %{_bindir}/pandoc # End cabal-rpm files %if %{with lua} %{_bindir}/pandoc-lua %endif %if %{with server} %{_bindir}/pandoc-server %endif %{_datadir}/bash-completion/completions/pandoc %changelog * Thu Feb 22 2024 Jens Petersen - 0.1.1.1-1 - spec file generated by cabal-rpm-2.1.5