stack/stack.spec
Jens Petersen a70c27faa3 Bump release
2025-08-12 01:18:38 +08:00

503 lines
17 KiB
RPMSpec

# generated by cabal-rpm-2.3.1 --subpackage
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%global pkg_name stack
%global pkgver %{pkg_name}-%{version}
%{?haskell_setup}
%global aesonwarningparser aeson-warning-parser-0.1.1
%global casaclient casa-client-0.0.2
%global casatypes casa-types-0.0.2
%global companion companion-0.1.0
%global cryptonconduit crypton-conduit-0.2.3
%global filelock filelock-0.1.1.7
%global hifileparser hi-file-parser-0.1.7.0
%global hpack hpack-0.37.0
%global httpdownload http-download-0.2.1.0
%global mintty mintty-0.1.4
%global mustache mustache-2.4.3.1
%global neatinterpolation neat-interpolation-0.5.1.4
%global openbrowser open-browser-0.3.0.1
%global pantry pantry-0.10.1
%global projecttemplate project-template-0.2.1.0
%global rioorphans rio-orphans-0.1.2.0
%global staticbytes static-bytes-0.1.1
%global subpkgs %{aesonwarningparser} %{casatypes} %{casaclient} %{companion} %{cryptonconduit} %{filelock} %{hifileparser} %{hpack} %{httpdownload} %{mintty} %{mustache} %{neatinterpolation} %{openbrowser} %{projecttemplate} %{rioorphans} %{staticbytes} %{pantry}
# crypton-conduit requires crypton-combinators
%bcond tests 0
Name: %{pkg_name}
Version: 3.7.1
# can only be reset when all subpkgs bumped
Release: 39%{?dist}
Summary: Haskell stable package build tool
License: BSD-3-Clause
URL: https://haskellstack.org
# Begin cabal-rpm sources:
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
Source1: https://hackage.haskell.org/package/%{aesonwarningparser}/%{aesonwarningparser}.tar.gz
Source2: https://hackage.haskell.org/package/%{casaclient}/%{casaclient}.tar.gz
Source3: https://hackage.haskell.org/package/%{casatypes}/%{casatypes}.tar.gz
Source4: https://hackage.haskell.org/package/%{companion}/%{companion}.tar.gz
Source5: https://hackage.haskell.org/package/%{cryptonconduit}/%{cryptonconduit}.tar.gz
Source6: https://hackage.haskell.org/package/%{filelock}/%{filelock}.tar.gz
Source7: https://hackage.haskell.org/package/%{hifileparser}/%{hifileparser}.tar.gz
Source8: https://hackage.haskell.org/package/%{hpack}/%{hpack}.tar.gz
Source9: https://hackage.haskell.org/package/%{httpdownload}/%{httpdownload}.tar.gz
Source10: https://hackage.haskell.org/package/%{mintty}/%{mintty}.tar.gz
Source11: https://hackage.haskell.org/package/%{mustache}/%{mustache}.tar.gz
Source12: https://hackage.haskell.org/package/%{neatinterpolation}/%{neatinterpolation}.tar.gz
Source13: https://hackage.haskell.org/package/%{openbrowser}/%{openbrowser}.tar.gz
Source14: https://hackage.haskell.org/package/%{pantry}/%{pantry}.tar.gz
Source15: https://hackage.haskell.org/package/%{projecttemplate}/%{projecttemplate}.tar.gz
Source16: https://hackage.haskell.org/package/%{rioorphans}/%{rioorphans}.tar.gz
Source17: https://hackage.haskell.org/package/%{staticbytes}/%{staticbytes}.tar.gz
# End cabal-rpm sources
Source20: stack-symlink-distro-ghc
# disable warning about ghc/Cabal version and nix in path
Patch0: stack-disabled-global-warnings.patch
# https://github.com/commercialhaskell/stack/issues/6379
Patch1: stack-Setup-Platforms.patch
# Begin cabal-rpm deps:
BuildRequires: ghc-rpm-macros-extra
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-aeson-devel
#BuildRequires: ghc-aeson-warning-parser-devel
BuildRequires: ghc-ansi-terminal-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-async-devel
BuildRequires: ghc-attoparsec-devel
BuildRequires: ghc-base-devel
BuildRequires: ghc-base64-bytestring-devel
BuildRequires: ghc-bytestring-devel
#BuildRequires: ghc-casa-client-devel
#BuildRequires: ghc-companion-devel
BuildRequires: ghc-conduit-devel
BuildRequires: ghc-conduit-extra-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-crypton-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-echo-devel
BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-extra-devel
BuildRequires: ghc-file-embed-devel
#BuildRequires: ghc-filelock-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-fsnotify-devel
BuildRequires: ghc-generic-deriving-devel
BuildRequires: ghc-ghc-boot-devel
BuildRequires: ghc-githash-devel
BuildRequires: ghc-hashable-devel
#BuildRequires: ghc-hi-file-parser-devel
#BuildRequires: ghc-hpack-devel
BuildRequires: ghc-hpc-devel
BuildRequires: ghc-http-client-devel
BuildRequires: ghc-http-client-tls-devel
BuildRequires: ghc-http-conduit-devel
#BuildRequires: ghc-http-download-devel
BuildRequires: ghc-http-types-devel
BuildRequires: ghc-memory-devel
BuildRequires: ghc-microlens-devel
BuildRequires: ghc-mtl-devel
#BuildRequires: ghc-mustache-devel
#BuildRequires: ghc-neat-interpolation-devel
#BuildRequires: ghc-open-browser-devel
BuildRequires: ghc-optparse-applicative-devel
BuildRequires: ghc-optparse-simple-devel
#BuildRequires: ghc-pantry-devel
BuildRequires: ghc-path-devel
BuildRequires: ghc-path-io-devel
BuildRequires: ghc-persistent-devel
BuildRequires: ghc-persistent-sqlite-devel
BuildRequires: ghc-pretty-devel
BuildRequires: ghc-process-devel
#BuildRequires: ghc-project-template-devel
BuildRequires: ghc-random-devel
BuildRequires: ghc-rio-devel
BuildRequires: ghc-rio-prettyprint-devel
BuildRequires: ghc-split-devel
BuildRequires: ghc-stm-devel
BuildRequires: ghc-tar-devel
BuildRequires: ghc-template-haskell-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-transformers-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-unix-compat-devel
BuildRequires: ghc-unordered-containers-devel
BuildRequires: ghc-vector-devel
BuildRequires: ghc-yaml-devel
BuildRequires: ghc-zlib-devel
%if %{with ghc_prof}
BuildRequires: ghc-Cabal-prof
BuildRequires: ghc-aeson-prof
#BuildRequires: ghc-aeson-warning-parser-prof
BuildRequires: ghc-ansi-terminal-prof
BuildRequires: ghc-array-prof
BuildRequires: ghc-async-prof
BuildRequires: ghc-attoparsec-prof
BuildRequires: ghc-base-prof
BuildRequires: ghc-base64-bytestring-prof
BuildRequires: ghc-bytestring-prof
#BuildRequires: ghc-casa-client-prof
#BuildRequires: ghc-companion-prof
BuildRequires: ghc-conduit-prof
BuildRequires: ghc-conduit-extra-prof
BuildRequires: ghc-containers-prof
BuildRequires: ghc-crypton-prof
BuildRequires: ghc-directory-prof
BuildRequires: ghc-echo-prof
BuildRequires: ghc-exceptions-prof
BuildRequires: ghc-extra-prof
BuildRequires: ghc-file-embed-prof
#BuildRequires: ghc-filelock-prof
BuildRequires: ghc-filepath-prof
BuildRequires: ghc-fsnotify-prof
BuildRequires: ghc-generic-deriving-prof
BuildRequires: ghc-ghc-boot-prof
BuildRequires: ghc-githash-prof
BuildRequires: ghc-hashable-prof
#BuildRequires: ghc-hi-file-parser-prof
#BuildRequires: ghc-hpack-prof
BuildRequires: ghc-hpc-prof
BuildRequires: ghc-http-client-prof
BuildRequires: ghc-http-client-tls-prof
BuildRequires: ghc-http-conduit-prof
#BuildRequires: ghc-http-download-prof
BuildRequires: ghc-http-types-prof
BuildRequires: ghc-memory-prof
BuildRequires: ghc-microlens-prof
BuildRequires: ghc-mtl-prof
#BuildRequires: ghc-mustache-prof
#BuildRequires: ghc-neat-interpolation-prof
#BuildRequires: ghc-open-browser-prof
BuildRequires: ghc-optparse-applicative-prof
BuildRequires: ghc-optparse-simple-prof
#BuildRequires: ghc-pantry-prof
BuildRequires: ghc-path-prof
BuildRequires: ghc-path-io-prof
BuildRequires: ghc-persistent-prof
BuildRequires: ghc-persistent-sqlite-prof
BuildRequires: ghc-pretty-prof
BuildRequires: ghc-process-prof
#BuildRequires: ghc-project-template-prof
BuildRequires: ghc-random-prof
BuildRequires: ghc-rio-prof
BuildRequires: ghc-rio-prettyprint-prof
BuildRequires: ghc-split-prof
BuildRequires: ghc-stm-prof
BuildRequires: ghc-tar-prof
BuildRequires: ghc-template-haskell-prof
BuildRequires: ghc-text-prof
BuildRequires: ghc-time-prof
BuildRequires: ghc-transformers-prof
BuildRequires: ghc-unix-prof
BuildRequires: ghc-unix-compat-prof
BuildRequires: ghc-unordered-containers-prof
BuildRequires: ghc-vector-prof
BuildRequires: ghc-yaml-prof
BuildRequires: ghc-zlib-prof
%endif
%if %{with tests}
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-hspec-devel
BuildRequires: ghc-hspec-discover-devel
BuildRequires: ghc-raw-strings-qq-devel
%endif
BuildRequires: help2man
# for missing dep 'casa-client':
BuildRequires: ghc-base16-bytestring-devel
BuildRequires: ghc-network-uri-devel
BuildRequires: ghc-resourcet-devel
BuildRequires: ghc-th-lift-devel
BuildRequires: ghc-unliftio-core-devel
%if %{with ghc_prof}
BuildRequires: ghc-base16-bytestring-prof
BuildRequires: ghc-network-uri-prof
BuildRequires: ghc-resourcet-prof
BuildRequires: ghc-th-lift-prof
BuildRequires: ghc-unliftio-core-prof
%endif
# for missing dep 'casa-types':
BuildRequires: ghc-base16-bytestring-devel
BuildRequires: ghc-path-pieces-devel
%if %{with ghc_prof}
BuildRequires: ghc-base16-bytestring-prof
BuildRequires: ghc-path-pieces-prof
%endif
# for missing dep 'crypton-conduit':
BuildRequires: ghc-resourcet-devel
%if %{with ghc_prof}
BuildRequires: ghc-resourcet-prof
%endif
# for missing dep 'hi-file-parser':
BuildRequires: ghc-binary-devel
%if %{with ghc_prof}
BuildRequires: ghc-binary-prof
%endif
# for missing dep 'hpack':
BuildRequires: ghc-Glob-devel
BuildRequires: ghc-bifunctors-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-infer-license-devel
BuildRequires: ghc-scientific-devel
%if %{with ghc_prof}
BuildRequires: ghc-Glob-prof
BuildRequires: ghc-bifunctors-prof
BuildRequires: ghc-deepseq-prof
BuildRequires: ghc-infer-license-prof
BuildRequires: ghc-scientific-prof
%endif
# for missing dep 'http-download':
BuildRequires: ghc-retry-devel
%if %{with ghc_prof}
BuildRequires: ghc-retry-prof
%endif
# for missing dep 'mustache':
BuildRequires: ghc-cmdargs-devel
BuildRequires: ghc-parsec-devel
BuildRequires: ghc-scientific-devel
BuildRequires: ghc-th-lift-devel
%if %{with ghc_prof}
BuildRequires: ghc-cmdargs-prof
BuildRequires: ghc-parsec-prof
BuildRequires: ghc-scientific-prof
BuildRequires: ghc-th-lift-prof
%endif
# for missing dep 'neat-interpolation':
BuildRequires: ghc-megaparsec-devel
%if %{with ghc_prof}
BuildRequires: ghc-megaparsec-prof
%endif
# for missing dep 'pantry':
BuildRequires: ghc-digest-devel
BuildRequires: ghc-hackage-security-devel
BuildRequires: ghc-network-uri-devel
BuildRequires: ghc-primitive-devel
BuildRequires: ghc-resourcet-devel
BuildRequires: ghc-tar-conduit-devel
BuildRequires: ghc-text-metrics-devel
BuildRequires: ghc-unliftio-devel
BuildRequires: ghc-zip-archive-devel
%if %{with ghc_prof}
BuildRequires: ghc-digest-prof
BuildRequires: ghc-hackage-security-prof
BuildRequires: ghc-network-uri-prof
BuildRequires: ghc-primitive-prof
BuildRequires: ghc-resourcet-prof
BuildRequires: ghc-tar-conduit-prof
BuildRequires: ghc-text-metrics-prof
BuildRequires: ghc-unliftio-prof
BuildRequires: ghc-zip-archive-prof
%endif
# for missing dep 'project-template':
BuildRequires: ghc-resourcet-devel
%if %{with ghc_prof}
BuildRequires: ghc-resourcet-prof
%endif
# for missing dep 'rio-orphans':
BuildRequires: ghc-fast-logger-devel
BuildRequires: ghc-monad-control-devel
BuildRequires: ghc-monad-logger-devel
BuildRequires: ghc-resourcet-devel
BuildRequires: ghc-transformers-base-devel
BuildRequires: ghc-unliftio-core-devel
%if %{with ghc_prof}
BuildRequires: ghc-fast-logger-prof
BuildRequires: ghc-monad-control-prof
BuildRequires: ghc-monad-logger-prof
BuildRequires: ghc-resourcet-prof
BuildRequires: ghc-transformers-base-prof
BuildRequires: ghc-unliftio-core-prof
%endif
# for missing dep 'static-bytes':
BuildRequires: ghc-primitive-devel
%if %{with ghc_prof}
BuildRequires: ghc-primitive-prof
%endif
# End cabal-rpm deps
Requires: gcc
Requires: gmp-devel
Recommends: zlib-devel
%description
Stack is a cross-platform program for developing Haskell projects.
It is intended for Haskellers both new and experienced.
%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
%global main_version %{version}
%if %{defined ghclibdir}
%ghc_lib_subpackage -l BSD-3-Clause %{aesonwarningparser}
%ghc_lib_subpackage -l BSD-3-Clause %{casaclient}
%ghc_lib_subpackage -l BSD-3-Clause %{casatypes}
%ghc_lib_subpackage -l BSD-3-Clause %{companion}
%ghc_lib_subpackage -l BSD-3-Clause %{cryptonconduit}
%ghc_lib_subpackage -l CC0-1.0 %{filelock}
%ghc_lib_subpackage -l BSD-3-Clause %{hifileparser}
%ghc_lib_subpackage -l MIT %{hpack}
%ghc_lib_subpackage -l BSD-3-Clause %{httpdownload}
%ghc_lib_subpackage -l BSD-3-Clause %{mintty}
%ghc_lib_subpackage -l BSD-3-Clause %{mustache}
%ghc_lib_subpackage -l MIT %{neatinterpolation}
%ghc_lib_subpackage -l BSD-3-Clause %{openbrowser}
%ghc_lib_subpackage -l BSD-3-Clause %{pantry}
%ghc_lib_subpackage -l BSD-3-Clause %{projecttemplate}
%ghc_lib_subpackage -l MIT %{rioorphans}
%ghc_lib_subpackage -l BSD-3-Clause %{staticbytes}
%endif
%global version %{main_version}
%prep
# Begin cabal-rpm setup:
%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17
%autopatch -p1
# End cabal-rpm setup
( cd %{pantry}
cabal-tweak-drop-dep persistent-template
)
cabal-tweak-dep-ver unix-compat '>=0.7.4' '>=0.7.3'
%build
# Begin cabal-rpm build:
%ghc_libs_build %{subpkgs}
%ghc_lib_build
# End cabal-rpm build
%install
# Begin cabal-rpm install
%ghc_libs_install %{subpkgs}
%ghc_lib_install
set noclobber
mkdir -p %{buildroot}%{bash_completions_dir}
%{buildroot}%{_bindir}/%{name} --bash-completion-script %{name} | sed s/filenames/default/ > %{buildroot}%{bash_completions_dir}/%{name}
mkdir -p %{buildroot}%{_mandir}/man1/
help2man --no-info %{buildroot}%{_bindir}/%{name} > %{buildroot}%{_mandir}/man1/%{name}.1
# End cabal-rpm install
echo %{_bindir}/hpack >> %{hpack}/ghc-hpack.files
echo %{_bindir}/haskell-mustache >> %{mustache}/ghc-mustache.files
install -p %{SOURCE20} %{buildroot}%{_bindir}/stack-symlink-distro-ghc
%check
%if %{with tests}
PATH=%{buildroot}%{_bindir}:$PATH
%cabal_test
%endif
%files
# Begin cabal-rpm files:
%license LICENSE
%doc CONTRIBUTING.md ChangeLog.md README.md
%{_bindir}/%{name}
%{bash_completions_dir}/%{name}
%{_mandir}/man1/%{name}.1*
# End cabal-rpm files
%{_bindir}/stack-symlink-distro-ghc
%files -n ghc-%{name} -f ghc-%{name}.files
# Begin cabal-rpm files:
%license LICENSE
# End cabal-rpm files
%files -n ghc-%{name}-devel -f ghc-%{name}-devel.files
%doc CONTRIBUTING.md ChangeLog.md README.md
%if %{with haddock}
%files -n ghc-%{name}-doc -f ghc-%{name}-doc.files
%license LICENSE
%endif
%if %{with ghc_prof}
%files -n ghc-%{name}-prof -f ghc-%{name}-prof.files
%endif
%changelog
* Mon Aug 11 2025 Jens Petersen <petersen@redhat.com> - 3.7.1-39
- Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jul 22 2025 Jens Petersen <petersen@redhat.com> - 3.7.1-37
- https://hackage.haskell.org/package/stack-3.7.1/changelog
- pantry-0.10.1, open-browser-0.3.0.1, mustache-2.4.3.1, static-bytes-0.1.1
* Tue Mar 25 2025 Jens Petersen <petersen@redhat.com> - 3.1.1-36
- https://hackage.haskell.org/package/stack-3.1.1/changelog
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.15.7-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Dec 6 2024 Jens Petersen <petersen@redhat.com> - 2.15.7-34
- split out with deps from haskell-platform
* Tue Nov 26 2024 Jens Petersen <petersen@redhat.com> - 2.15.7-2
- disable tests since needs network access (#2271914)
* Wed Oct 30 2024 Jens Petersen <petersen@redhat.com> - 2.15.7-1
- update to 2.15.7
* Wed Mar 27 2024 Jens Petersen <petersen@redhat.com> - 2.9.3.1-1
- spec file generated by cabal-rpm-2.2.0