summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-10-29 02:25:09 +0000
committerCoprDistGit <infra@openeuler.org>2023-10-29 02:25:09 +0000
commit682609907aad3b4c9b4ff239e28af1ce289938d3 (patch)
tree8d748cdec104e328cd78634d61c442abb471efd3
parent9018702ae1fe2777e3f10454e72302d936582a4a (diff)
automatic import of ghc-unix-compatopeneuler23.09
-rw-r--r--.gitignore1
-rw-r--r--ghc-unix-compat.spec97
-rw-r--r--sources1
-rwxr-xr-xunix-compat.cabal149
4 files changed, 248 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..84387ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/unix-compat-0.6.tar.gz
diff --git a/ghc-unix-compat.spec b/ghc-unix-compat.spec
new file mode 100644
index 0000000..f1b693c
--- /dev/null
+++ b/ghc-unix-compat.spec
@@ -0,0 +1,97 @@
+%global pkg_name unix-compat
+%global pkgver %{pkg_name}-%{version}
+%bcond_with tests
+
+Name: ghc-%{pkg_name}
+Version: 0.6
+Release: 1
+Summary: Portable POSIX-compatibility layer
+License: BSD-3-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/1.cabal#/%{pkg_name}.cabal
+BuildRequires: ghc-Cabal-devel
+BuildRequires: ghc-base-devel
+BuildRequires: ghc-base-prof
+BuildRequires: ghc-rpm-macros
+BuildRequires: ghc-unix-devel
+BuildRequires: ghc-unix-prof
+ExcludeArch: %{ix86}
+%if %{with tests}
+BuildRequires: ghc-HUnit-devel
+BuildRequires: ghc-HUnit-prof
+BuildRequires: ghc-directory-devel
+BuildRequires: ghc-directory-prof
+BuildRequires: ghc-extra-devel
+BuildRequires: ghc-extra-prof
+BuildRequires: ghc-hspec-devel
+BuildRequires: ghc-hspec-prof
+BuildRequires: ghc-monad-parallel-devel
+BuildRequires: ghc-monad-parallel-prof
+BuildRequires: ghc-temporary-devel
+BuildRequires: ghc-temporary-prof
+%endif
+
+%description
+This package provides portable implementations of parts of the unix package.
+This package re-exports the unix package when available. When it isn't
+available, portable implementations are used.
+
+%package devel
+Summary: Haskell %{pkg_name} library development files
+Requires: %{name} = %{version}-%{release}
+Requires: ghc-compiler = %{ghc_version}
+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 CHANGELOG.md
+
+%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-1
+- Initial packaging (Version 0.6)
diff --git a/sources b/sources
new file mode 100644
index 0000000..2a08e37
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+54712d1b89bfed762e38dfddc5d5edf4 unix-compat-0.6.tar.gz
diff --git a/unix-compat.cabal b/unix-compat.cabal
new file mode 100755
index 0000000..c496f9c
--- /dev/null
+++ b/unix-compat.cabal
@@ -0,0 +1,149 @@
+name: unix-compat
+version: 0.6
+x-revision: 1
+synopsis: Portable POSIX-compatibility layer.
+description: This package provides portable implementations of parts
+ of the unix package. This package re-exports the unix
+ package when available. When it isn't available,
+ portable implementations are used.
+
+homepage: http://github.com/jacobstanley/unix-compat
+license: BSD3
+license-file: LICENSE
+author: Björn Bringert, Duncan Coutts, Jacob Stanley, Bryan O'Sullivan
+maintainer: Jacob Stanley <jacob@stanley.io>
+category: System
+build-type: Simple
+cabal-version: >= 1.10
+
+extra-source-files:
+ CHANGELOG.md
+
+source-repository head
+ type: git
+ location: git@github.com:jacobstanley/unix-compat.git
+
+flag old-time
+ description: build against old-time package
+ default: False
+
+Library
+ default-language: Haskell2010
+ hs-source-dirs: src
+ ghc-options: -Wall
+ build-depends: base == 4.*
+
+ exposed-modules:
+ System.PosixCompat
+ System.PosixCompat.Extensions
+ System.PosixCompat.Files
+ System.PosixCompat.Temp
+ System.PosixCompat.Time
+ System.PosixCompat.Types
+ System.PosixCompat.Unistd
+ System.PosixCompat.User
+
+ if os(windows)
+ c-sources:
+ cbits/HsUname.c
+ cbits/mktemp.c
+
+ extra-libraries: msvcrt
+ build-depends: Win32 >= 2.5.0.0
+ build-depends: filepath >= 1.0 && < 1.5
+
+ if flag(old-time)
+ build-depends: old-time >= 1.0.0.0 && < 1.2.0.0
+ cpp-options: -DOLD_TIME
+
+ if impl(ghc < 7)
+ build-depends: directory == 1.0.*
+ cpp-options: -DDIRECTORY_1_0
+ else
+ build-depends: directory == 1.1.*
+ else
+ build-depends: time >= 1.0 && < 1.13
+ build-depends: directory >= 1.3.1 && < 1.4
+
+ other-modules:
+ System.PosixCompat.Internal.Time
+
+ else
+ build-depends: unix >= 2.6 && < 2.8
+ include-dirs: include
+ includes: HsUnixCompat.h
+ install-includes: HsUnixCompat.h
+ c-sources: cbits/HsUnixCompat.c
+ if os(solaris)
+ cc-options: -DSOLARIS
+
+Test-Suite unix-compat-testsuite
+ default-language: Haskell2010
+ type: exitcode-stdio-1.0
+ hs-source-dirs: tests
+ ghc-options: -Wall
+ main-is: main.hs
+
+ other-modules:
+ MkstempSpec
+ LinksSpec
+
+ -- ghc-options:
+ -- -Wall
+ -- -fwarn-tabs
+ -- -funbox-strict-fields
+ -- -threaded
+ -- -fno-warn-unused-do-bind
+ -- -fno-warn-type-defaults
+
+ -- extensions:
+ -- OverloadedStrings
+ -- ExtendedDefaultRules
+
+ -- if flag(lifted)
+ -- cpp-options: -DLIFTED
+
+ build-depends:
+ unix-compat
+ , base == 4.*
+ , monad-parallel
+ , hspec
+ , HUnit
+ , directory
+ , extra
+ , temporary
+
+ if os(windows)
+ -- c-sources:
+ -- cbits/HsUname.c
+ -- cbits/mktemp.c
+
+ -- extra-libraries: msvcrt
+ -- build-depends: Win32 >= 2.5.0.0
+
+ if flag(old-time)
+ build-depends: old-time >= 1.0.0.0 && < 1.2.0.0
+ cpp-options: -DOLD_TIME
+
+ if impl(ghc < 7)
+ build-depends: directory == 1.0.*
+ cpp-options: -DDIRECTORY_1_0
+ else
+ build-depends: directory == 1.1.*
+ else
+ build-depends: time >= 1.0 && < 1.13
+ build-depends: directory >= 1.3.1 && < 1.4
+
+ -- other-modules:
+ -- System.PosixCompat.Internal.Time
+
+ else
+ -- build-depends: unix >= 2.4 && < 2.9
+ -- include-dirs: include
+ -- includes: HsUnixCompat.h
+ -- install-includes: HsUnixCompat.h
+ -- c-sources: cbits/HsUnixCompat.c
+ if os(solaris)
+ cc-options: -DSOLARIS
+
+ build-depends: directory >= 1.3.1 && < 1.4