File haskell-platform.spec of Package haskell-platform
#
# spec file for package haskell-platform
#
# Copyright (c) 2013 Peter Trommler peter.trommler@ohm-hochschule.de
#
# 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 haskell-platform
%global common_summary Standard Haskell distribution
%global common_description Haskell Platform is a suite of stable and well used Haskell libraries\
and tools. It provides a good starting environment for Haskell development.
%define without_haddock 1
%define ghc_without_shared 1
# ghci (ghc library) is not officially part of hackage-platform
%define platform_progs()\
%{?1}Requires: ghc-compiler = 7.4.2\
%{?1}Requires: cabal-install = 0.14.0\
%{?1}Requires: alex = 3.0.2\
%{?1}Requires: happy = 1.18.10\
%{?1}Requires: hscolour = 1.19\
%{nil}
%global platform_progs_versions ghc-compiler = 7.4.2 cabal-install = 0.14.0 alex = 3.0.2 happy = 1.18.10 hscolour = 1.19
# order here follows http://hackage.haskell.org/platform/changelog.html
%define platform_libs()\
%{?1}Requires: ghc-libraries = 7.4.2\
%{?1}Requires: ghc-async-devel = 2.0.1.3\
%{?1}Requires: ghc-cgi-devel = 3001.1.7.4\
%{?1}Requires: ghc-fgl-devel = 5.4.2.4\
%{?1}Requires: ghc-GLUT-devel = 2.1.2.1\
%{?1}Requires: ghc-haskell-src-devel = 1.0.1.5\
%{?1}Requires: ghc-html-devel = 1.0.1.2\
%{?1}Requires: ghc-HTTP-devel = 4000.2.5\
%{?1}Requires: ghc-HUnit-devel = 1.2.5.1\
%{?1}Requires: ghc-mtl-devel = 2.1.2\
%{?1}Requires: ghc-network-devel = 2.3.1.0\
%{?1}Requires: ghc-OpenGL-devel = 2.2.3.1\
%{?1}Requires: ghc-parallel-devel = 3.2.0.3\
%{?1}Requires: ghc-parsec-devel = 3.1.3\
%{?1}Requires: ghc-primitive = 0.5.0.1\
%{?1}Requires: ghc-QuickCheck-devel = 2.5.1.1\
%{?1}Requires: ghc-random-devel = 1.0.1.1\
%{?1}Requires: ghc-regex-base-devel = 0.93.2\
%{?1}Requires: ghc-regex-compat-devel = 0.95.1\
%{?1}Requires: ghc-regex-posix-devel = 0.95.2\
%{?1}Requires: ghc-split-devel = 0.2.1.1\
%{?1}Requires: ghc-stm-devel = 2.4\
%{?1}Requires: ghc-syb-devel = 0.3.7\
%{?1}Requires: ghc-text-devel = 0.11.2.3\
%{?1}Requires: ghc-transformers-devel = 0.3.0.0\
%{?1}Requires: ghc-vector-devel = 0.10.0.1\
%{?1}Requires: ghc-xhtml-devel = 3000.2.1\
%{?1}Requires: ghc-zlib-devel = 0.5.4.0\
%{nil}
Name: haskell-platform
Version: 2012.4.0.0
Release: 1
Summary: Standard Haskell distribution
Group: Development/Tools/Other
License: BSD-3-Clause
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# BEGIN cabal2spec
URL: http://hackage.haskell.org/platform
Source0: http://lambda.haskell.org/platform/download/%{version}/%{name}-%{version}.tar.gz
ExclusiveArch: %{ix86} x86_64 %{ghc_arches}
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros %{!?without_hscolour:hscolour}
BuildRequires: %{platform_progs_versions}
BuildRequires: ghc-libraries = 7.4.2
BuildRequires: ghc-async-devel = 2.0.1.3
BuildRequires: ghc-cgi-devel = 3001.1.7.4
BuildRequires: ghc-fgl-devel = 5.4.2.4
BuildRequires: ghc-GLUT-devel = 2.1.2.1
BuildRequires: ghc-haskell-src-devel = 1.0.1.5
BuildRequires: ghc-html-devel = 1.0.1.2
BuildRequires: ghc-HTTP-devel = 4000.2.5
BuildRequires: ghc-HUnit-devel = 1.2.5.1
BuildRequires: ghc-mtl-devel = 2.1.2
BuildRequires: ghc-network-devel = 2.3.1.0
BuildRequires: ghc-OpenGL-devel = 2.2.3.1
BuildRequires: ghc-parallel-devel = 3.2.0.3
BuildRequires: ghc-parsec-devel = 3.1.3
BuildRequires: ghc-primitive = 0.5.0.1
BuildRequires: ghc-QuickCheck-devel = 2.5.1.1
BuildRequires: ghc-regex-base-devel = 0.93.2
BuildRequires: ghc-regex-compat-devel = 0.95.1
BuildRequires: ghc-regex-posix-devel = 0.95.2
BuildRequires: ghc-split-devel = 0.2.1.1
BuildRequires: ghc-stm-devel = 2.4
BuildRequires: ghc-syb-devel = 0.3.7
BuildRequires: ghc-text-devel = 0.11.2.3
BuildRequires: ghc-transformers-devel = 0.3.0.0
BuildRequires: ghc-vector-devel = 0.10.0.1
BuildRequires: ghc-xhtml-devel = 3000.2.1
BuildRequires: ghc-zlib-devel = 0.5.4.0
# END cabal2spec
%platform_progs
Requires: ghc-haskell-platform-devel = %{version}
%description
%{common_description}
%global top_prefix packages/%{name}-%{version}
%prep
%setup -q -n %{name}-%{version}
%build
cd %{top_prefix}
%ghc_lib_build
%install
TOPDIR=$(pwd)
cd %{top_prefix}
%ghc_lib_install
mv ghc-%{name}-devel.files $TOPDIR
if [ -e debugsources.list ]; then
mv debugsources.list $TOPDIR;
fi
# devel subpackage
%ghc_devel_package
%platform_libs
%ghc_devel_description
%ghc_devel_post_postun
%files
%defattr(-,root,root,-)
%doc %{top_prefix}/LICENSE
%ghc_files %{top_prefix}/LICENSE
%changelog