diff --git a/dhall-json.spec b/dhall-json.spec index c09ce6a..9214647 100644 --- a/dhall-json.spec +++ b/dhall-json.spec @@ -1,14 +1,14 @@ -# generated by cabal-rpm-2.0.6 +# generated by cabal-rpm-2.0.7 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ %global pkg_name dhall-json %global pkgver %{pkg_name}-%{version} -# testsuite missing deps: dhall +%bcond_without tests Name: %{pkg_name} Version: 1.6.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Convert between Dhall and JSON or YAML License: BSD @@ -38,6 +38,10 @@ BuildRequires: ghc-scientific-prof BuildRequires: ghc-text-prof BuildRequires: ghc-unordered-containers-prof BuildRequires: ghc-vector-prof +%if %{with tests} +BuildRequires: ghc-tasty-devel +BuildRequires: ghc-tasty-hunit-devel +%endif # End cabal-rpm deps %description @@ -111,9 +115,17 @@ cp -bp %{SOURCE1} %{name}.cabal %install # Begin cabal-rpm install %ghc_lib_install +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/ +%{buildroot}%{_bindir}/dhall-to-json --bash-completion-script dhall-to-json > %{buildroot}%{_datadir}/bash-completion/completions/dhall-to-json +%{buildroot}%{_bindir}/dhall-to-yaml --bash-completion-script dhall-to-yaml > %{buildroot}%{_datadir}/bash-completion/completions/dhall-to-yaml +%{buildroot}%{_bindir}/json-to-dhall --bash-completion-script json-to-dhall > %{buildroot}%{_datadir}/bash-completion/completions/json-to-dhall # End cabal-rpm install +%check +%cabal_test + + %files # Begin cabal-rpm files: %license LICENSE @@ -121,6 +133,9 @@ cp -bp %{SOURCE1} %{name}.cabal %{_bindir}/dhall-to-json %{_bindir}/dhall-to-yaml %{_bindir}/json-to-dhall +%{_datadir}/bash-completion/completions/dhall-to-json +%{_datadir}/bash-completion/completions/dhall-to-yaml +%{_datadir}/bash-completion/completions/json-to-dhall # End cabal-rpm files @@ -146,5 +161,8 @@ cp -bp %{SOURCE1} %{name}.cabal %changelog +* Sun Oct 4 2020 Jens Petersen - 1.6.4-2 +- enable bash completions and testsuite + * Tue Sep 1 2020 Jens Petersen - 1.6.4-1 - spec file generated by cabal-rpm-2.0.6