1c83f7218bad779d1f442b9c68d6a98185b6ca87
[ghc.git] / ghc.spec.in
1 # RPM spec file for GHC -*-rpm-spec-*-
2 #
3 # Copyright [1998..2004] The GHC Team
4 #
5 # Thanks to Zoltan Vorosbaranyi <vbzoli@vbzo.li> for suggestions in
6 # earlier versions and Pixel <pixel@mandrakesoft.com> for coding tips.
7 #
8 # This file is subject to the same free software license as GHC.
9
10 %define name ghc
11 %define version @ProjectVersion@
12 %define release @release@
13
14 Name: %{name}
15 Version: %{version}
16 Release: %{release}
17 License: BSD-like
18 Group: Development/Languages/Haskell
19 URL: http://haskell.org/ghc/
20 Source0: http://haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
21 Source1: http://haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2
22 Packager: Sven Panne <sven.panne@aedion.de>
23 BuildRoot: %{_tmppath}/%{name}-%{version}-build
24 Requires: gmp, readline
25 BuildRequires: alex >= 2.0, happy >= 1.15, ghc >= 5, haddock, docbook-dtd, docbook-xsl-stylesheets, libxslt, libxml2, fop, xmltex, dvips, gmp, readline-devel, mesaglut-devel
26 Provides: haskell
27 Summary: The Glasgow Haskell Compiler
28
29 %description
30 Haskell is the standard lazy purely functional programming language.
31 The current language version is Haskell 98, agreed in December 1998,
32 with a revised version published in January 2003.
33
34 GHC is a state-of-the-art programming suite for Haskell. Included is
35 an optimising compiler generating good code for a variety of
36 platforms, together with an interactive system for convenient, quick
37 development. The distribution includes space and time profiling
38 facilities, a large collection of libraries, and support for various
39 language extensions, including concurrency, exceptions, and foreign
40 language interfaces (C, C++, whatever).
41
42 A wide variety of Haskell related resources (tutorials, libraries,
43 specifications, documentation, compilers, interpreters, references,
44 contact information, links to research groups) are available from the
45 Haskell home page at http://haskell.org/.
46
47 Authors:
48 --------
49 Krasimir Angelov <ka2_mail@yahoo.com>
50 Manuel Chakravarty <chak@cse.unsw.edu.au>
51 Koen Claessen <koen@cs.chalmers.se>
52 Robert Ennals <Robert.Ennals@cl.cam.ac.uk>
53 Sigbjorn Finne <sof@galconn.com>
54 Gabrielle Keller <keller@cvs.haskell.org>
55 Marcin Kowalczyk <qrczak@knm.org.pl>
56 Jeff Lewis <jeff@galconn.com>
57 Ian Lynagh <igloo@earth.li>
58 Simon Marlow <simonmar@microsoft.com>
59 Sven Panne <sven.panne@aedion.de>
60 Ross Paterson <ross@soi.city.ac.uk>
61 Simon Peyton Jones <simonpj@microsoft.com>
62 Don Stewart <dons@cse.unsw.edu.au>
63 Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
64 Wolfgang Thaller <wolfgang.thaller@gmx.net>
65 Andrew Tolmach <apt@cs.pdx.edu>
66 Keith Wansbrough <Keith.Wansbrough@cl.cam.ac.uk>
67 Michael Weber <michael.weber@post.rwth-aachen.de>
68 plus a dozen helping hands...
69
70 %package prof
71 Requires: ghc = %{version}-%{release}
72 Summary: Profiling libraries for GHC
73 Group: Development/Libraries
74
75 %description prof
76 Profiling libraries for Glorious Glasgow Haskell Compilation System
77 (GHC). They should be installed when GHC's profiling subsystem is
78 needed.
79
80 %prep
81 %setup -b1
82
83 %build
84 test -f configure || autoreconf
85 ./configure --prefix=%{_prefix}
86 make
87 make html
88 make -C docs/ext-core ps
89 make -C docs/storage-mgt ps
90
91 %install
92 make prefix=${RPM_BUILD_ROOT}%{_prefix} install
93 make datadir=`pwd` install-docs
94
95 # generate the file list for lib/ _excluding_ all files needed for profiling
96 # only
97 #
98 # * generating file lists in a BUILD_ROOT spec is a bit tricky: the file list
99 # has to contain complete paths, _but_ without the BUILD_ROOT, we also do
100 # _not_ want have directory names in the list; furthermore, we have to make
101 # sure that any leading / is removed from %{_prefix}/lib, as find has to
102 # interpret the argument as a relative path; however, we have to include the
103 # leading / again in the final file list (otherwise, rpm complains)
104 # * isn't there an easier way to do all this?
105 #
106 dir=`pwd`
107 cd ${RPM_BUILD_ROOT}
108 libdir=`echo %{_prefix}/lib | sed 's|^/||'`
109 find $libdir ! -type d ! -name '*.p_hi' ! -name '*_p.a' -print | sed 's|^|/|' > $dir/rpm-noprof-lib-files
110 find $libdir ! -type d \( -name '*.p_hi' -or -name '*_p.a' \) -print | sed 's|^|/|' > $dir/rpm-prof-lib-files
111 cd $dir
112
113 %clean
114 rm -rf ${RPM_BUILD_ROOT}
115
116 %files -f rpm-noprof-lib-files
117 %defattr(-,root,root)
118 %doc docs/docbook-cheat-sheet/docbook-cheat-sheet
119 %doc ANNOUNCE
120 %doc LICENSE
121 %doc README
122 %doc docs/building/building
123 %doc docs/ext-core/core.ps
124 %doc docs/storage-mgt/ldv.ps
125 %doc docs/storage-mgt/rp.ps
126 %doc docs/storage-mgt/sm.ps
127 %doc docs/users_guide/users_guide
128 %doc html/*
129 %doc libraries/Cabal/doc/Cabal
130 %{_prefix}/bin/ghc
131 %{_prefix}/bin/ghc-%{version}
132 %{_prefix}/bin/ghc-pkg
133 %{_prefix}/bin/ghc-pkg-%{version}
134 %{_prefix}/bin/ghci
135 %{_prefix}/bin/ghci-%{version}
136 %{_prefix}/bin/ghcprof
137 %{_prefix}/bin/hasktags
138 %{_prefix}/bin/hp2ps
139 %{_prefix}/bin/hsc2hs
140 %{_prefix}/bin/runghc
141 %{_prefix}/bin/runhaskell
142
143 %files prof -f rpm-prof-lib-files
144 %defattr(-,root,root)