# generated by cabal-rpm-2.1.0 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/ %global pkg_name zip-archive %global pkgver %{pkg_name}-%{version} %ifnarch armv7hl %bcond_without tests %endif Name: ghc-%{pkg_name} Version: 0.4.2.2 Release: %autorelease -e rvre0 Summary: Library for creating and modifying zip archives License: BSD-3-Clause Url: https://hackage.haskell.org/package/%{pkg_name} # Begin cabal-rpm sources: Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz Source1: https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal # End cabal-rpm sources # Begin cabal-rpm deps: BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-array-devel BuildRequires: ghc-base-devel BuildRequires: ghc-binary-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-digest-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-filepath-devel BuildRequires: ghc-mtl-devel BuildRequires: ghc-pretty-devel BuildRequires: ghc-text-devel BuildRequires: ghc-time-devel BuildRequires: ghc-unix-devel BuildRequires: ghc-zlib-devel %if %{with ghc_prof} BuildRequires: ghc-array-prof BuildRequires: ghc-base-prof BuildRequires: ghc-binary-prof BuildRequires: ghc-bytestring-prof BuildRequires: ghc-containers-prof BuildRequires: ghc-digest-prof BuildRequires: ghc-directory-prof BuildRequires: ghc-filepath-prof BuildRequires: ghc-mtl-prof BuildRequires: ghc-pretty-prof BuildRequires: ghc-text-prof BuildRequires: ghc-time-prof BuildRequires: ghc-unix-prof BuildRequires: ghc-zlib-prof %endif %if %{with tests} BuildRequires: ghc-HUnit-devel BuildRequires: ghc-process-devel BuildRequires: ghc-temporary-devel BuildRequires: unzip %endif # End cabal-rpm deps %description The zip-archive library provides functions for creating, modifying, and extracting files from zip archives. The zip archive format is documented in . Certain simplifying assumptions are made about the zip archives: in particular, there is no support for strong encryption, zip files that span multiple disks, ZIP64, OS-specific file attributes, or compression methods other than Deflate. However, the library should be able to read the most common zip archives, and the archives it produces should be readable by all standard unzip programs. Archives are built and extracted in memory, so manipulating large zip files will consume a lot of memory. If you work with large zip files or need features not supported by this library, a better choice may be , which uses a memory-efficient streaming approach. However, zip can only read and write archives inside instances of MonadIO, so zip-archive is a better choice if you want to manipulate zip archives in "pure" contexts. As an example of the use of the library, a standalone zip archiver and extracter is provided in the source distribution. %package devel Summary: Haskell %{pkg_name} library development files Provides: %{name}-static = %{version}-%{release} Provides: %{name}-static%{?_isa} = %{version}-%{release} %if %{defined ghc_version} Requires: ghc-compiler = %{ghc_version} %endif Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package provides the Haskell %{pkg_name} library development files. %if %{with haddock} %package doc Summary: Haskell %{pkg_name} library documentation BuildArch: noarch 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} Supplements: (%{name}-devel and ghc-prof) %description prof This package provides the Haskell %{pkg_name} profiling library. %endif %prep # Begin cabal-rpm setup: %setup -q -n %{pkgver} cp -bp %{SOURCE1} %{pkg_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 # End cabal-rpm install %check %if %{with tests} %cabal_test %endif %files -f %{name}.files # Begin cabal-rpm files: %license LICENSE # End cabal-rpm files %files devel -f %{name}-devel.files %doc README.markdown changelog %if %{with haddock} %files doc -f %{name}-doc.files %license LICENSE %endif %if %{with ghc_prof} %files prof -f %{name}-prof.files %endif %changelog %autochangelog