# generated by cabal-rpm-2.0.6 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ %global pkg_name ormolu %global pkgver %{pkg_name}-%{version} %bcond_without tests Name: %{pkg_name} Version: 0.1.2.0 Release: 1%{?dist} Summary: A formatter for Haskell source code License: BSD Url: https://hackage.haskell.org/package/%{name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz Source1: https://hackage.haskell.org/package/%{pkgver}/%{name}.cabal#/%{pkgver}.cabal # End cabal-rpm sources # ghc-lib-parser cannot build s390x # https://bugzilla.redhat.com/show_bug.cgi?id=1806109 ExcludeArch: s390x # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-base-prof BuildRequires: ghc-bytestring-prof BuildRequires: ghc-containers-prof BuildRequires: ghc-dlist-prof BuildRequires: ghc-exceptions-prof BuildRequires: ghc-ghc-lib-parser-prof BuildRequires: ghc-gitrev-prof BuildRequires: ghc-mtl-prof BuildRequires: ghc-optparse-applicative-prof BuildRequires: ghc-syb-prof BuildRequires: ghc-text-prof %if %{with tests} BuildRequires: ghc-filepath-devel BuildRequires: ghc-hspec-devel BuildRequires: ghc-hspec-discover-devel BuildRequires: ghc-path-devel BuildRequires: ghc-path-io-devel %endif Requires: %{name}-common = %{version}-%{release} # End cabal-rpm deps %description Ormolu is a formatter for Haskell source code. The project was created with the following goals in mind: - Using GHC's own parser to avoid parsing problems caused by haskell-src-exts. - Let some whitespace be programmable. The layout of the input influences the layout choices in the output. This means that the choices between single-line/multi-line layouts in each particular situation are made by the user, not by an algorithm. This makes the implementation simpler and leaves some control to the user while still guaranteeing that the formatted code is stylistically consistent. - Writing code in such a way so it's easy to modify and maintain. - Implementing one “true” formatting style which admits no configuration. - That formatting style aims to result in minimal diffs while still remaining very close to “conventional” Haskell formatting people use. - Choose a style compatible with modern dialects of Haskell. As new Haskell extensions enter broad use, we may change the style to accomodate them. - Idempotence: formatting already formatted code doesn't change it. - Be well-tested and robust to the point that it can be used in large projects without exposing unfortunate, disappointing bugs here and there. %package common Summary: %{name} common files BuildArch: noarch %description common This package provides the %{name} common data files. %package -n ghc-%{name} Summary: Haskell %{name} library Requires: %{name}-common = %{version}-%{release} %description -n ghc-%{name} This package provides the Haskell %{name} shared library. %package -n ghc-%{name}-devel Summary: Haskell %{name} library development files Provides: ghc-%{name}-static = %{version}-%{release} Provides: ghc-%{name}-static%{?_isa} = %{version}-%{release} %if %{defined ghc_version} Requires: ghc-compiler = %{ghc_version} %endif Requires: ghc-%{name}%{?_isa} = %{version}-%{release} %description -n ghc-%{name}-devel This package provides the Haskell %{name} library development files. %if %{with haddock} %package -n ghc-%{name}-doc Summary: Haskell %{name} library documentation BuildArch: noarch %description -n ghc-%{name}-doc This package provides the Haskell %{name} library documentation. %endif %if %{with ghc_prof} %package -n ghc-%{name}-prof Summary: Haskell %{name} profiling library Requires: ghc-%{name}-devel%{?_isa} = %{version}-%{release} Supplements: (ghc-%{name}-devel and ghc-prof) %description -n ghc-%{name}-prof This package provides the Haskell %{name} profiling library. %endif %prep # Begin cabal-rpm setup: %setup -q cp -bp %{SOURCE1} %{name}.cabal # End cabal-rpm setup %build # Begin cabal-rpm build: %ghc_lib_build # End cabal-rpm build %install # Begin cabal-rpm install %ghc_lib_install mv %{buildroot}%{_ghcdocdir}{,-common} # End cabal-rpm install %check %cabal_test %files # Begin cabal-rpm files: %{_bindir}/%{name} # End cabal-rpm files %files common # Begin cabal-rpm files: %license LICENSE.md %doc CHANGELOG.md CONTRIBUTING.md README.md %{_datadir}/%{pkgver} # End cabal-rpm files %files -n ghc-%{name} -f ghc-%{name}.files %files -n ghc-%{name}-devel -f ghc-%{name}-devel.files %if %{with haddock} %files -n ghc-%{name}-doc -f ghc-%{name}-doc.files %license LICENSE.md %endif %if %{with ghc_prof} %files -n ghc-%{name}-prof -f ghc-%{name}-prof.files %endif %changelog * Thu Sep 3 2020 Jens Petersen - 0.1.2.0-1 - spec file generated by cabal-rpm-2.0.6 - exclude s390x because ghc-lib-parser not available