summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-29 01:53:36 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-29 01:53:36 +0000
commitdf5debb34f80e66189a4e7b1a0d2aa018aa43966 (patch)
treeb731814363006f46020d36ab9f6c773e68a880f0
parent1e7b8acf9c8f09ab6bfcc2cf653b07ad6b3b7ae3 (diff)
automatic import of ghc-zlibopeneuler23.09
-rw-r--r--.gitignore1
-rw-r--r--ghc-zlib.spec98
-rw-r--r--sources1
-rwxr-xr-xzlib.cabal137
4 files changed, 237 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..091630c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/zlib-0.6.3.0.tar.gz
diff --git a/ghc-zlib.spec b/ghc-zlib.spec
new file mode 100644
index 0000000..48508d8
--- /dev/null
+++ b/ghc-zlib.spec
@@ -0,0 +1,98 @@
+%global pkg_name zlib
+%global pkgver %{pkg_name}-%{version}
+%bcond_with tests
+
+Name: ghc-%{pkg_name}
+Version: 0.6.3.0
+Release: 1
+Summary: Compression and decompression in the gzip and zlib formats
+License: BSD-2-Clause
+URL: https://hackage.haskell.org/package/%{pkg_name}
+Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
+Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal
+BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-base-devel
+BuildRequires: ghc-base-prof
+BuildRequires: ghc-bytestring-devel
+BuildRequires: ghc-bytestring-prof
+BuildRequires: ghc-rpm-macros
+BuildRequires: zlib-devel
+ExcludeArch: %{ix86}
+%if %{with tests}
+BuildRequires: ghc-QuickCheck-devel
+BuildRequires: ghc-QuickCheck-prof
+BuildRequires: ghc-tasty-devel
+BuildRequires: ghc-tasty-prof
+BuildRequires: ghc-tasty-quickcheck-devel
+BuildRequires: ghc-tasty-quickcheck-prof
+%endif
+
+%description
+This package provides a pure interface for compressing and decompressing
+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
+Requires: %{name} = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+Requires: zlib-devel
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
+
+%description devel
+This package provides the Haskell %{pkg_name} library development files.
+
+%package -n ghc-%{pkg_name}-help
+Summary: Haskell %{pkg_name} library documentation
+BuildArch: noarch
+
+%description -n ghc-%{pkg_name}-help
+This package provides the Haskell %{pkg_name} library documentation.
+
+%package -n ghc-%{pkg_name}-prof
+Summary: Haskell %{pkg_name} profiling library
+Requires: ghc-%{pkg_name}-devel = %{version}-%{release}
+Supplements: (ghc-%{pkg_name}-devel and ghc-prof)
+
+%description -n ghc-%{pkg_name}-prof
+This package provides the Haskell %{pkg_name} profiling library.
+
+%prep
+%autosetup -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
+
+%build
+%ghc_lib_build
+
+%install
+%ghc_lib_install
+
+%check
+%cabal_test
+
+%post devel
+%ghc_pkg_recache
+
+%postun devel
+%ghc_pkg_recache
+
+%files -f %{name}.files
+%license LICENSE
+
+%files devel -f %{name}-devel.files
+%doc README.md changelog examples
+
+%files -n ghc-%{pkg_name}-help -f ghc-%{pkg_name}-help.files
+%license LICENSE
+
+%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+
+%changelog
+* Thu Sep 28 2023 Lin Runze <lrzlin@163.com> 0.6.3.0-1
+- Initial packaging (Version 0.6.3.0)
diff --git a/sources b/sources
new file mode 100644
index 0000000..608d576
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+de5a05f8b26b7d7ba62b981a5bd7fc9c zlib-0.6.3.0.tar.gz
diff --git a/zlib.cabal b/zlib.cabal
new file mode 100755
index 0000000..da4c5d0
--- /dev/null
+++ b/zlib.cabal
@@ -0,0 +1,137 @@
+cabal-version: >= 1.10
+name: zlib
+version: 0.6.3.0
+x-revision: 3
+
+copyright: (c) 2006-2016 Duncan Coutts
+license: BSD3
+license-file: LICENSE
+author: Duncan Coutts <duncan@community.haskell.org>
+maintainer: Duncan Coutts <duncan@community.haskell.org>, Andrew Lelechenko <andrew.lelechenko@gmail.com>, Emily Pillmore <emilypi@cohomolo.gy>, Herbert Valerio Riedel <hvr@gnu.org>
+bug-reports: https://github.com/haskell/zlib/issues
+category: Codec
+synopsis: Compression and decompression in the gzip and zlib formats
+description: This package provides a pure interface for compressing and
+ decompressing 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.
+build-type: Simple
+
+tested-with: GHC == 7.0.4
+ , GHC == 7.2.2
+ , GHC == 7.4.2
+ , GHC == 7.6.3
+ , GHC == 7.8.4
+ , GHC == 7.10.3
+ , GHC == 8.0.2
+ , GHC == 8.2.2
+ , GHC == 8.4.4
+ , GHC == 8.6.5
+ , GHC == 8.8.4
+ , GHC == 8.10.7
+ , GHC == 9.0.2
+ , GHC == 9.2.2
+
+extra-source-files: changelog
+ README.md
+ -- zlib C sources (for Windows)
+ cbits/crc32.h cbits/inffast.h cbits/inflate.h
+ cbits/trees.h cbits/deflate.h cbits/inffixed.h
+ cbits/inftrees.h cbits/zutil.h cbits/gzguts.h
+ -- test data files
+ test/data/bad-crc.gz test/data/custom-dict.zlib
+ test/data/custom-dict.zlib-dict test/data/hello.gz
+ test/data/not-gzip test/data/two-files.gz
+ -- demo programs:
+ examples/gzip.hs examples/gunzip.hs
+
+source-repository head
+ type: git
+ location: https://github.com/haskell/zlib.git
+
+flag non-blocking-ffi
+ default: False
+ manual: True
+ description: The (de)compression calls can sometimes take a long time, which
+ prevents other Haskell threads running. Enabling this flag
+ avoids this unfairness, but with greater overall cost.
+
+flag pkg-config
+ default: False
+ manual: True
+ description: Use @pkg-config(1)@ to locate foreign @zlib@ library.
+
+flag bundled-c-zlib
+ default: False
+ manual: True
+ description: Use the bundled zlib C sources. Requires pkg-config to be False.
+ For windows, this is the default.
+
+
+library
+ exposed-modules: Codec.Compression.GZip,
+ Codec.Compression.Zlib,
+ Codec.Compression.Zlib.Raw,
+ Codec.Compression.Zlib.Internal
+ other-modules: Codec.Compression.Zlib.Stream,
+ Codec.Compression.Zlib.ByteStringCompat
+
+ if impl(ghc < 7)
+ default-language: Haskell98
+ default-extensions: PatternGuards
+ else
+ default-language: Haskell2010
+
+ other-extensions: CPP, ForeignFunctionInterface, RankNTypes, BangPatterns,
+ DeriveDataTypeable
+ if impl(ghc >= 7.2)
+ other-extensions: DeriveGeneric
+ if impl(ghc >= 7.6)
+ other-extensions: CApiFFI
+
+ build-depends: base >= 4 && < 4.20,
+ bytestring >= 0.9 && < 0.13
+ if impl(ghc >= 7.0 && < 8.0.3)
+ build-depends: ghc-prim
+
+ includes: zlib.h
+ ghc-options: -Wall -fwarn-tabs
+ if flag(non-blocking-ffi)
+ cpp-options: -DNON_BLOCKING_FFI
+ if flag(pkg-config) && !impl(ghcjs) && !os(ghcjs)
+ -- NB: pkg-config is available on windows as well when using msys2
+ pkgconfig-depends: zlib
+ else
+ -- don't use pkg-config
+ if !os(windows) && !flag(bundled-c-zlib) && !impl(ghcjs) && !os(ghcjs)
+ -- Normally we use the the standard system zlib.
+ extra-libraries: z
+ else
+ -- However for the benefit of users of Windows (which does not have zlib
+ -- by default) we bundle a complete copy of the C sources of zlib-1.2.11
+ c-sources: cbits/adler32.c cbits/compress.c cbits/crc32.c
+ cbits/deflate.c cbits/infback.c
+ cbits/inffast.c cbits/inflate.c cbits/inftrees.c
+ cbits/trees.c cbits/uncompr.c cbits/zutil.c
+ include-dirs: cbits
+ install-includes: zlib.h zconf.h
+
+test-suite tests
+ type: exitcode-stdio-1.0
+ main-is: Test.hs
+ other-modules: Utils,
+ Test.Codec.Compression.Zlib.Internal,
+ Test.Codec.Compression.Zlib.Stream
+ hs-source-dirs: test
+ default-language: Haskell2010
+ build-depends: base, bytestring, zlib,
+ QuickCheck == 2.*,
+ tasty >= 0.8 && < 1.5,
+ tasty-quickcheck >= 0.8 && < 0.11
+ ghc-options: -Wall