File ghc-diagrams.spec of Package ghc-diagrams
#
# spec file for package ghc-diagrams
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global pkg_name diagrams
Name: ghc-%{pkg_name}
Version: 1.4
Release: 0
Summary: Embedded domain-specific language for declarative vector graphics
License: BSD-3-Clause
Group: Development/Libraries/Haskell
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-diagrams-contrib-devel
BuildRequires: ghc-diagrams-core-devel
BuildRequires: ghc-diagrams-lib-devel
BuildRequires: ghc-diagrams-svg-devel
BuildRequires: ghc-rpm-macros
%description
Diagrams is a full-featured framework and embedded domain-specific langauge for
creating declarative vector graphics and animations.
This package is just a convenient wrapper around the 'diagrams-core',
'diagrams-lib' and 'diagrams-contrib' packages, so they can be installed with a
single 'cabal install diagrams' command.
The package also comes with flags to enable six different backends. A
Haskell-native SVG backend (the 'diagrams-svg' package) can be selected with
'-fsvg'. This flag is enabled by default, so if you do /not/ want the SVG
backend, you must explicitly disable it with '-f-svg'. The SVG backend does not
yet quite support all the features of the cairo backend: text alignment and
embedded images are the two main missing features at this point, and of course
it can only produce SVG images. It is, however, much easier to install, so it
is the out-of-the-box default.
There is also a cairo backend (the 'diagrams-cairo' package) which can be
selected with the '-fcairo' flag. It is fully-featured and can produce PNG, PS,
PDF, SVG, or animated GIF output; however, due to its dependencies it can be
difficult to install on some platforms (notably OS X).
In addition, there is a GTK backend based on the cairo backend, for rendering
diagrams directly to GTK windows. You can enable it with the '-fgtk' flag.
The Haskell-native postscript backend (the 'diagrams-postscript' package) can
be selected with the '-fpostscript' flag. The only feature it does not support
is transparency.
There is a Rasterific backend which is also Haskell-native (the
'diagrams-rasterific' package) which can be selected with the '-frasterific'
flag. This is a fully featured backend with the ability to produce PNG, JPG,
TIFF, BMP and animated GIF output.
Finally there is a Canvas backend, also haskell native, which can be selected
with the '-fcanvas' flag. This backend allows users to write interactive images
onto their web browsers.
For more information, including a gallery of examples, tutorial, and user
manual, see the diagrams website: <http://projects.haskell.org/diagrams>.
For help, join the '#diagrams' IRC channel on Freenode or the mailing list:
<http://groups.google.com/group/diagrams-discuss>.
%package devel
Summary: Haskell %{pkg_name} library development files
Group: Development/Libraries/Haskell
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.
%prep
%setup -q -n %{pkg_name}-%{version}
%build
%ghc_lib_build_without_haddock
%install
%ghc_lib_install
%post devel
%ghc_pkg_recache
%postun devel
%ghc_pkg_recache
%files -f %{name}.files
%doc LICENSE
%files devel -f %{name}-devel.files
%doc README.markdown
%changelog