ghc-HsYAML/ghc-HsYAML.spec

157 lines
4.2 KiB
RPMSpec
Raw Permalink Normal View History

# generated by cabal-rpm-2.1.0
2020-07-01 07:15:07 +00:00
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%global pkg_name HsYAML
%global pkgver %{pkg_name}-%{version}
2020-07-16 11:13:13 +00:00
%bcond_without tests
2020-07-01 07:15:07 +00:00
Name: ghc-%{pkg_name}
2023-01-22 14:13:45 +00:00
Version: 0.2.1.1
Release: %autorelease
2020-07-16 11:13:13 +00:00
Summary: Pure Haskell YAML 1.2 processor
2020-07-01 07:15:07 +00:00
License: GPL-2.0-or-later
2020-07-01 07:15:07 +00:00
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:
2023-01-22 14:13:45 +00:00
BuildRequires: dos2unix
2020-07-01 07:15:07 +00:00
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-base-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-mtl-devel
BuildRequires: ghc-parsec-devel
BuildRequires: ghc-text-devel
2023-01-22 14:13:45 +00:00
BuildRequires: ghc-transformers-devel
%if %{with ghc_prof}
2020-07-01 07:15:07 +00:00
BuildRequires: ghc-base-prof
BuildRequires: ghc-bytestring-prof
BuildRequires: ghc-containers-prof
2020-07-16 11:13:13 +00:00
BuildRequires: ghc-deepseq-prof
2020-07-01 07:15:07 +00:00
BuildRequires: ghc-mtl-prof
BuildRequires: ghc-parsec-prof
BuildRequires: ghc-text-prof
2023-01-22 14:13:45 +00:00
BuildRequires: ghc-transformers-prof
%endif
2020-07-16 11:13:13 +00:00
%if %{with tests}
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-tasty-devel
BuildRequires: ghc-tasty-quickcheck-devel
%endif
2020-07-01 07:15:07 +00:00
# End cabal-rpm deps
%description
2020-07-16 11:13:13 +00:00
'HsYAML' is a [YAML 1.2](http://yaml.org/spec/1.2/spec.html) processor, i.e.
a library for parsing and serializing YAML documents.
2020-07-01 07:15:07 +00:00
Features of 'HsYAML' include:
* Pure Haskell implementation with small dependency footprint and emphasis on
2020-07-16 11:13:13 +00:00
strict compliance with the <http://yaml.org/spec/1.2/spec.html>.
2020-07-01 07:15:07 +00:00
* Direct decoding to native Haskell types via ('aeson'-inspired) typeclass-based
API (see "Data.YAML").
2020-07-16 11:13:13 +00:00
* Allows round-tripping while preserving ordering, anchors, and comments at
Event-level.
2020-07-01 07:15:07 +00:00
* Support for constructing custom YAML node graph representation (including
support for cyclic YAML data structures).
* Support for the standard (untyped) /Failsafe/, (strict) /JSON/, and
(flexible) /Core/ "schemas" providing implicit typing rules as defined in
the YAML 1.2 specification (including support for user-defined custom schemas).
2020-07-16 11:13:13 +00:00
* Support for emitting YAML using /Failsafe/, (strict) /JSON/, and (flexible)
/Core/ "schemas" (including support for user-defined custom encoding schemas
2020-07-01 07:15:07 +00:00
* Event-based API resembling LibYAML's Event-based API (see "Data.YAML.Event").
* Low-level API access to lexical token-based scanner (see "Data.YAML.Token").
%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
2021-07-07 15:21:47 +00:00
Requires: ghc-filesystem
2020-07-01 07:15:07 +00:00
%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}
2023-01-22 14:13:45 +00:00
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
2020-07-01 07:15:07 +00:00
# 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
2020-07-16 11:13:13 +00:00
%check
2021-07-07 15:21:47 +00:00
%if %{with tests}
2020-07-16 11:13:13 +00:00
%cabal_test
2021-07-07 15:21:47 +00:00
%endif
2020-07-16 11:13:13 +00:00
2020-07-01 07:15:07 +00:00
%files -f %{name}.files
# Begin cabal-rpm files:
%license LICENSE.GPLv2
%license LICENSE.GPLv3
# End cabal-rpm files
%files devel -f %{name}-devel.files
%doc ChangeLog.md
%if %{with haddock}
%files doc -f %{name}-doc.files
%license LICENSE.GPLv2
%license LICENSE.GPLv3
%endif
%if %{with ghc_prof}
%files prof -f %{name}-prof.files
%endif
%changelog
%autochangelog