%define ghc_ver %(ghc --version | sed "s|.*version ||") %define pkg_name %(echo %name | sed "s|^ghc-||") Name: ghc-json Version: 0.11 Release: 1mamba Summary: A parser and pretty printer for converting between Haskell values and JSON Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://hackage.haskell.org/package/%{pkg_name} Source: http://hackage.haskell.org/packages/archive/json/%{version}/json-%{version}.tar.gz # From Fedora: Source: json-0.10.cabal License: BSD ## AUTOBUILDREQ-BEGIN BuildRequires: ghc-libs BuildRequires: ghc-syb-devel BuildRequires: glibc-devel BuildRequires: libgmp-devel ## AUTOBUILDREQ-END BuildRequires: ghc Requires: ghc = %{ghc_ver} %description JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. This library provides a parser and pretty printer for converting between Haskell values and JSON. %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 = %{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 Requires: ghc-filesystem %description doc This package provides the Haskell %{pkg_name} library documentation. %endif %prep %setup -q -n json-%{version} #cp -bp %{SOURCE1} %{pkg_name}.cabal %build export cabal_configure_extra_options="-fgeneric -fsplit-base" %ghc_lib_build %install %ghc_lib_install rm -f %{buildroot}%{_ghclicensedir}/%{name}/LICENSE %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files -f %{name}.files %defattr(-,root,root) %license LICENSE %files devel -f %{name}-devel.files %doc CHANGES %if %{with haddock} %files doc -f %{name}-doc.files %license LICENSE %endif %changelog * Sat Dec 02 2023 Automatic Build System 0.11-1mamba - automatic version update by autodist * Sun Sep 08 2013 Silvan Calarco 0.7-1mamba - package created by silvan using the webbuild interface