[project @ 2000-04-23 13:27:04 by chak]
[ghc-hetmet.git] / ghc / ghc.spec.in
1 # RPM spec file for GHC
2 #
3 # Copyright [1998..2000] Manuel M. T. Chakravarty <chak@acm.org>
4 # Thanks to Zoltan Vorosbaranyi <vbzoli@vbzo.li> for suggestions in 
5 # earlier versions and Pixel <pixel@mandrakesoft.com> for coding tips.
6 #
7 # This file is subject to the same free software license as GHC.
8
9 # Values for @version@ and @patchlevel@ are set by the `configure' script.  
10 # SNAP releases are CVS snapshots.  Official releases should replace SNAP by
11 # an appropriate release numbers (they are usually numbered starting from 1).
12
13 %define version    @version@
14 %define patchlevel @patchlevel@
15 %define release    SNAP
16 %define prefix     /usr
17
18 Summary: Glasgow Haskell Compilation system
19 Name: ghc
20 Version: %{version}
21 Release: %{release}
22 Copyright: BSD style w/o adv. clause
23 Group: Development/Languages
24 Source: http://haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.gz
25 URL: http://haskell.org/ghc/
26 BuildRoot: /var/tmp/ghc-%{version}-%{release}-root
27 Requires: gmp-devel
28 Provides: haskell
29 BuildRequires: happy >= 1.6, ghc, stylesheets
30
31 %description
32 The Glorious Glasgow Haskell Compilation System (GHC) is a robust,
33 fully-featured, optimising compiler for the functional programming
34 language Haskell 98.  GHC compiles Haskell to either native code or
35 C. It implements numerous experimental language extensions to Haskell,
36 including concurrency, a foreign language interface, several
37 type-system extensions, exceptions, and so on. GHC comes with a
38 generational garbage collector, a space and time profiler, and a
39 comprehensive set of libraries.  This package includes HTML and PS
40 versions of the SGML-based documentation for GHC.  They are also available 
41 online at http://www.haskell.org/ghc/.
42
43 Haskell 98 is "the" standard lazy functional programming language.
44 More info plus the language definition is at http://www.haskell.org/.
45
46 %package prof
47 Summary: Profiling libraries for GHC
48 Group: Development/Libraries
49 Requires: ghc = %{PACKAGE_VERSION}
50
51 %description prof
52 Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
53 They should be installed when GHC's profiling subsystem is needed.
54
55 %changelog
56
57 * Sun Apr 23 2000 Manuel Chakravarty
58 - revised for ghc 4.07; added suggestions from Pixel <pixel@mandrakesoft.com>
59 - added profiling package
60
61 * Tue Dec 7 1999 Manuel Chakravarty
62 - version for use from CVS
63
64 * Thu Sep 16 1999 Manuel Chakravarty
65 - modified for GHC 4.04, patchlevel 1 (no more 62 tuple stuff); minimises use
66   of patch files - instead emits a build.mk on-the-fly
67
68 * Sat Jul 31 1999 Manuel Chakravarty
69 - modified for GHC 4.04
70
71 * Wed Jun 30 1999 Manuel Chakravarty
72 - some more improvements from vbzoli
73
74 * Fri Feb 26 1999 Manuel Chakravarty
75 - modified for GHC 4.02
76
77 * Thu Dec 24 1998 Zoltan Vorosbaranyi 
78 - added BuildRoot
79 - files located in /usr/local/bin, /usr/local/lib moved to /usr/bin, /usr/lib
80
81 * Tue Jul 28 1998 Manuel Chakravarty
82 - original version
83
84 %prep
85 %setup -n fptools
86
87 # generate our own `build.mk'
88 #
89 # * this is a kludge
90 #
91 cat >mk/build.mk <<END
92 GhcLibWays = p
93 SRC_HAPPY_OPTS += -agc
94 END
95
96
97 %build
98 ./configure --prefix=%{prefix} --libdir=%{prefix}/lib/ghc-%{version}
99 make boot
100 make -C glafp-utils sgmlverb
101 make all
102 make -C docs ps html
103 make -C ghc/docs ps html
104 make -C hslibs/doc ps html
105
106 %install
107 # compress the non-html docs
108 #
109 for j in docs ghc/docs hslibs/doc; do
110   dir=`pwd`
111   cd $j
112   for i in ps dvi sgml vsgml verb idx; do
113     find . -name '*.'$i -exec gzip -9 '{}' ';' -print
114   done
115   cd $dir
116 done
117 rm -rf $RPM_BUILD_ROOT
118 make prefix=$RPM_BUILD_ROOT%{prefix}\
119      libdir=$RPM_BUILD_ROOT%{prefix}/lib/ghc-%{version} install
120
121 # generate the file list for lib/ _excluding_ all files needed for profiling
122 # only
123 #
124 ls -R %{prefix}/lib/* | grep -v -e ":$" -e "^$" -e ".p_hi" -e "_p.a"\
125   >rpm-noprof-lib-files
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %files -f rpm-noprof-lib-files
131 %doc docs/ CONTRIB/
132 %doc ghc/ANNOUNCE ghc/PATCHLEVEL ghc/README ghc/docs/
133 %doc hslibs/doc/
134 %{prefix}/bin/*
135
136 %files prof
137 %{prefix}/lib/ghc-%{version}/imports/*/*.p_hi
138 %{prefix}/lib/ghc-%{version}/libHS*_p.a