# generated by cabal-rpm-2.1.0 # 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.5.0.1 Release: 1%{?dist} Summary: A formatter for Haskell source code License: BSD-3-Clause Url: https://hackage.haskell.org/package/%{name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz # 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-rpm-macros BuildRequires: ghc-Cabal-devel BuildRequires: ghc-Diff-devel BuildRequires: ghc-MemoTrie-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-ansi-terminal-devel BuildRequires: ghc-array-devel BuildRequires: ghc-base-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-dlist-devel BuildRequires: ghc-exceptions-devel BuildRequires: ghc-filepath-devel BuildRequires: ghc-ghc-lib-parser-devel BuildRequires: ghc-gitrev-devel BuildRequires: ghc-megaparsec-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-optparse-applicative-devel BuildRequires: ghc-syb-devel BuildRequires: ghc-template-haskell-devel BuildRequires: ghc-text-devel BuildRequires: ghc-th-lift-instances-devel %if %{with ghc_prof} BuildRequires: ghc-Cabal-prof BuildRequires: ghc-Diff-prof BuildRequires: ghc-MemoTrie-prof BuildRequires: ghc-aeson-prof BuildRequires: ghc-ansi-terminal-prof BuildRequires: ghc-array-prof BuildRequires: ghc-base-prof BuildRequires: ghc-bytestring-prof BuildRequires: ghc-containers-prof BuildRequires: ghc-directory-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-megaparsec-prof BuildRequires: ghc-mtl-prof BuildRequires: ghc-optparse-applicative-prof BuildRequires: ghc-syb-prof BuildRequires: ghc-template-haskell-prof BuildRequires: ghc-text-prof BuildRequires: ghc-th-lift-instances-prof %endif %if %{with tests} BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-hspec-devel BuildRequires: ghc-hspec-discover-devel BuildRequires: ghc-hspec-megaparsec-devel BuildRequires: ghc-path-devel BuildRequires: ghc-path-io-devel BuildRequires: ghc-temporary-devel %endif # 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 -n ghc-%{name} Summary: Haskell %{name} library %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 # End cabal-rpm setup %build # Begin cabal-rpm build: %ghc_lib_build # End cabal-rpm build %install # Begin cabal-rpm install %ghc_lib_install 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: %license LICENSE.md %doc CHANGELOG.md CONTRIBUTING.md README.md %{_bindir}/%{name} %{_datadir}/bash-completion/completions/%{name} # End cabal-rpm files %files -n ghc-%{name} -f ghc-%{name}.files # Begin cabal-rpm files: %license LICENSE.md # End cabal-rpm files %files -n ghc-%{name}-devel -f ghc-%{name}-devel.files %doc CHANGELOG.md CONTRIBUTING.md README.md %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 * Sun Jan 22 2023 Jens Petersen - 0.5.0.1-1 - https://hackage.haskell.org/package/ormolu-0.5.0.1/changelog - refresh to cabal-rpm-2.1.0 with SPDX migration * 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