# generated by cabal-rpm-2.0.9 # 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.4.1 Release: 5%{?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-Diff-prof BuildRequires: ghc-ansi-terminal-prof BuildRequires: ghc-base-prof BuildRequires: ghc-bytestring-prof BuildRequires: ghc-containers-prof BuildRequires: ghc-dlist-prof BuildRequires: ghc-exceptions-prof BuildRequires: ghc-filepath-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-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 accommodate 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 Requires: ghc-filesystem %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} mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/ %{buildroot}%{_bindir}/%{name} --bash-completion-script %{name} | sed s/filenames/default/ > %{buildroot}%{_datadir}/bash-completion/completions/%{name} # End cabal-rpm install %check %if %{with tests} %cabal_test %endif %files # Begin cabal-rpm files: %{_bindir}/%{name} %{_datadir}/bash-completion/completions/%{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 * Fri Jul 22 2022 Fedora Release Engineering - 0.1.4.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jun 17 2022 Jens Petersen - 0.1.4.1-4 - rebuild * Thu Jan 20 2022 Fedora Release Engineering - 0.1.4.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sat Jan 08 2022 Miro Hrončok - 0.1.4.1-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34 * Thu Aug 5 2021 Jens Petersen - 0.1.4.1-1 - update to 0.1.4.1 * Thu Aug 5 2021 Jens Petersen - 0.1.3.0-4 - setup bash completion * Thu Jul 22 2021 Fedora Release Engineering - 0.1.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jan 26 2021 Fedora Release Engineering - 0.1.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Sep 24 22:13:31 +08 2020 Jens Petersen - 0.1.3.0-1 - update to 0.1.3.0 * 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