ghc-zlib/ghc-zlib.spec

140 lines
3.3 KiB
RPMSpec
Raw Normal View History

2022-06-07 10:03:25 +00:00
# generated by cabal-rpm-2.0.12
2020-06-04 11:29:18 +00:00
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%global pkg_name zlib
2017-02-22 01:06:54 +00:00
%global pkgver %{pkg_name}-%{version}
2021-08-03 09:01:44 +00:00
%bcond_without tests
2019-02-17 14:48:03 +00:00
Name: ghc-%{pkg_name}
2021-08-03 09:03:05 +00:00
Version: 0.6.2.3
2021-08-08 05:28:07 +00:00
Release: %autorelease
Summary: Compression and decompression in the gzip and zlib formats
License: BSD
Url: https://hackage.haskell.org/package/%{pkg_name}
2019-02-17 14:48:03 +00:00
# Begin cabal-rpm sources:
2017-02-22 01:06:54 +00:00
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
2022-06-07 10:03:25 +00:00
Source1: https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal
2019-02-17 14:48:03 +00:00
# End cabal-rpm sources
# https://github.com/haskell/zlib/issues/46
Patch0: zlib-0.6.2.3-test-rawformat-s390x-z15.patch
2019-02-17 14:48:03 +00:00
# Begin cabal-rpm deps:
2022-06-07 10:03:25 +00:00
BuildRequires: dos2unix
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-base-prof
BuildRequires: ghc-bytestring-prof
BuildRequires: zlib-devel
2016-06-26 11:28:33 +00:00
%if %{with tests}
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-tasty-devel
BuildRequires: ghc-tasty-hunit-devel
BuildRequires: ghc-tasty-quickcheck-devel
%endif
# End cabal-rpm deps
%description
This package provides a pure interface for compressing and decompressing
2017-02-22 01:06:54 +00:00
streams of data represented as lazy 'ByteString's. It uses the
<https://en.wikipedia.org/wiki/Zlib zlib C library> so it has high performance.
It supports the "zlib", "gzip" and "raw" compression formats.
It provides a convenient high level API suitable for most tasks and for the few
cases where more control is needed it provides access to the full zlib feature
set.
%package devel
Summary: Haskell %{pkg_name} library development files
Provides: %{name}-static = %{version}-%{release}
Provides: %{name}-static%{?_isa} = %{version}-%{release}
2018-01-24 13:12:27 +00:00
%if %{defined ghc_version}
Requires: ghc-compiler = %{ghc_version}
2018-01-24 13:12:27 +00:00
%endif
Requires: %{name}%{?_isa} = %{version}-%{release}
# Begin cabal-rpm deps:
Requires: zlib-devel%{?_isa}
# End cabal-rpm deps
%description devel
This package provides the Haskell %{pkg_name} library development files.
%if %{with haddock}
%package doc
Summary: Haskell %{pkg_name} library documentation
2020-02-08 14:53:07 +00:00
BuildArch: noarch
2021-07-07 16:30:14 +00:00
Requires: ghc-filesystem
%description doc
This package provides the Haskell %{pkg_name} library documentation.
%endif
%if %{with ghc_prof}
%package prof
Summary: Haskell %{pkg_name} profiling library
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
2020-02-08 14:53:07 +00:00
Supplements: (%{name}-devel and ghc-prof)
%description prof
This package provides the Haskell %{pkg_name} profiling library.
%endif
%prep
2019-02-17 14:48:03 +00:00
# Begin cabal-rpm setup:
2017-02-22 01:06:54 +00:00
%setup -q -n %{pkgver}
2022-06-07 10:03:25 +00:00
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
# End cabal-rpm setup
%ifarch s390x
%patch0 -p1 -b.orig
%endif
2015-02-17 02:05:25 +00:00
#remove the copy library
rm -r cbits
%build
2019-02-17 14:48:03 +00:00
# Begin cabal-rpm build:
%ghc_lib_build
2019-02-17 14:48:03 +00:00
# End cabal-rpm build
%install
2019-02-17 14:48:03 +00:00
# Begin cabal-rpm install
%ghc_lib_install
2019-02-17 14:48:03 +00:00
# End cabal-rpm install
2016-06-26 11:28:33 +00:00
%check
2021-07-07 16:30:14 +00:00
%if %{with tests}
%cabal_test
2021-07-07 16:30:14 +00:00
%endif
2016-06-26 11:28:33 +00:00
%files -f %{name}.files
2019-02-17 14:48:03 +00:00
# Begin cabal-rpm files:
%license LICENSE
2019-02-17 14:48:03 +00:00
# End cabal-rpm files
%files devel -f %{name}-devel.files
2016-06-26 11:28:33 +00:00
%doc changelog examples
%if %{with haddock}
%files doc -f %{name}-doc.files
2020-02-08 14:53:07 +00:00
%license LICENSE
%endif
%if %{with ghc_prof}
%files prof -f %{name}-prof.files
%endif
%changelog
2021-08-08 05:28:07 +00:00
%autochangelog