This commit is contained in:
Jens Petersen 2022-03-29 15:45:48 +08:00
parent 08b8f8dcb7
commit 0f10b0d312
4 changed files with 234 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/formatting-7.1.3.tar.gz

99
formatting-7.1.3.cabal Normal file
View File

@ -0,0 +1,99 @@
cabal-version: 2.4
name: formatting
version: 7.1.3
x-revision: 2
synopsis: Combinator-based type-safe formatting (like printf() or FORMAT)
description: Combinator-based type-safe formatting (like printf() or FORMAT), modelled from the HoleyMonoids package.
.
See the README at <https://github.com/AJChapman/formatting#readme> for more info.
homepage: https://github.com/AJChapman/formatting#readme
bug-reports: https://github.com/AJChapman/formatting/issues
license: BSD-3-Clause
license-file: LICENSE
author: Chris Done, Shachaf Ben-Kiki, Martijn van Steenbergen, Mike Meyer, Bryan O'Sullivan, Alex Chapman
maintainer: alex@farfromthere.net
copyright: 2020 Alex Chapman, 2013 Chris Done, Shachaf Ben-Kiki, Martijn van Steenbergen, Mike Meyer, 2011 MailRank, Inc.
category: Text
build-type: Simple
extra-source-files: CHANGELOG.md
README.md
tested-with: GHC == 8.4.4
, GHC == 8.6.5
, GHC == 8.8.3
, GHC == 8.10.1
, GHC == 9.0.1
common deps
build-depends:
base >= 4.11 && < 5,
text >= 0.11.0.8,
ghc-prim,
-- Warnings list list taken from
-- https://medium.com/mercury-bank/enable-all-the-warnings-a0517bc081c3
-- Enable all warnings with -Weverything, then disable the ones we
-- dont care about
default-language: Haskell2010
ghc-options: -Weverything
-Wno-all-missed-specialisations
-Wno-implicit-prelude
-Wno-missed-specialisations
-Wno-missing-exported-signatures
-Wno-missing-import-lists
-Wno-missing-local-signatures
-Wno-monomorphism-restriction
-Wno-missing-deriving-strategies
-Wno-safe
-Wno-unsafe
-fprint-potential-instances
if impl(ghc >= 8.10)
ghc-options: -Wno-prepositive-qualified-module
-Wno-missing-safe-haskell-mode
library
import: deps
hs-source-dirs: src
build-depends:
clock >= 0.4,
old-locale,
scientific >= 0.3.0.0,
time >= 1.5,
transformers,
if !impl(ghcjs)
build-depends:
double-conversion ^>= 2.0.2.0,
exposed-modules:
Formatting
Formatting.Formatters
Formatting.ShortFormatters
Formatting.Combinators
Formatting.Examples
Formatting.Time
Formatting.Clock
Formatting.Internal
Formatting.Internal.Raw
Formatting.Buildable
other-modules:
Data.Text.Format.Functions
Data.Text.Format.Types
Data.Text.Format
test-suite formatting-test
import: deps
build-depends: formatting, hspec, scientific
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
benchmark bench
import: deps
type: exitcode-stdio-1.0
hs-source-dirs: bench
main-is: bench.hs
build-depends: formatting, criterion, QuickCheck
ghc-options: -O2
source-repository head
type: git
location: http://github.com/AJChapman/formatting

133
ghc-formatting.spec Normal file
View File

@ -0,0 +1,133 @@
# generated by cabal-rpm-2.0.11
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%global pkg_name formatting
%global pkgver %{pkg_name}-%{version}
# i686: tests assume Int is Int64
# s390x: unknown RTS option: -N
%ifnarch i686 s390x armv7hl
%bcond_without tests
%endif
Name: ghc-%{pkg_name}
Version: 7.1.3
Release: 1%{?dist}
Summary: Combinator-based type-safe formatting (like printf() or FORMAT)
License: BSD
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: dos2unix
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-base-prof
BuildRequires: ghc-clock-prof
BuildRequires: ghc-double-conversion-prof
BuildRequires: ghc-old-locale-prof
BuildRequires: ghc-scientific-prof
BuildRequires: ghc-text-prof
BuildRequires: ghc-time-prof
BuildRequires: ghc-transformers-prof
%if %{with tests}
BuildRequires: ghc-hspec-devel
%endif
# End cabal-rpm deps
%description
Combinator-based type-safe formatting (like printf() or FORMAT), modelled from
the HoleyMonoids package.
See the README at <https://github.com/AJChapman/formatting#readme> for more
info.
%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}
dos2unix -k -n %{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 CHANGELOG.md README.md
%if %{with haddock}
%files doc -f %{name}-doc.files
%license LICENSE
%endif
%if %{with ghc_prof}
%files prof -f %{name}-prof.files
%endif
%changelog
* Sat Mar 26 2022 Jens Petersen <petersen@redhat.com> - 7.1.3-1
- spec file generated by cabal-rpm-2.0.11

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (formatting-7.1.3.tar.gz) = 425b9b5d4ec4b24a1b0b8b61f7ad27b49e340f1e1714ab82948da3ab4b5bf167953bc7f08769e4b21876b77d08905e3d9324fab0d8111d4b92dda1f57a814c84