[project @ 1999-12-07 14:38:58 by chak]
[ghc-hetmet.git] / ghc / ghc.spec.in
1 # RPM spec file for GHC
2 #
3 # Copyright [1998..1999] Manuel M. T. Chakravarty <chak@acm.org>
4 # Thanks to Zoltan Vorosbaranyi <vbzoli@vbzo.li> for help with earlier 
5 # versions. 
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 Packager: Manuel M. T. Chakravarty <chak@is.tsukuba.ac.jp>
28 Requires: gmp-devel
29 Provides: haskell
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 ** This package does not include libraries for profiling **
47
48 %changelog
49
50 * Tue Dec 7 1999 Manuel Chakravarty
51 - version for use from CVS
52
53 * Thu Sep 16 1999 Manuel Chakravarty
54 - modified for GHC 4.04, patchlevel 1 (no more 62 tuple stuff); minimises use
55   of patch files - instead emits a build.mk on-the-fly
56
57 * Sat Jul 31 1999 Manuel Chakravarty
58 - modified for GHC 4.04
59
60 * Wed Jun 30 1999 Manuel Chakravarty
61 - some more improvements from vbzoli
62
63 * Fri Feb 26 1999 Manuel Chakravarty
64 - modified for GHC 4.02
65
66 * Thu Dec 24 1998 Zoltan Vorosbaranyi 
67 - added BuildRoot
68 - files located in /usr/local/bin, /usr/local/lib moved to /usr/bin, /usr/lib
69
70 * Tue Jul 28 1998 Manuel Chakravarty
71 - original version
72
73 %prep
74 %setup -n fptools
75
76 # generate our own `build.mk'
77 #
78 # * this is a kludge, to be used until the `configure' script is improved
79 #
80 cat >mk/build.mk <<END
81 GhcHcOpts = -O -dcore-lint -H24m
82 GhcCompilerWays =
83 GhcLibWays = 
84 GhcLibHcOpts = -O -H24m -split-objs -odir \$* 
85 GhcLibsWithReadline = YES
86 StripLibraries = YES
87 SRC_HAPPY_OPTS += -c
88 END
89
90
91 %build
92 ./configure --prefix=%{prefix} --libdir=%{prefix}/lib/ghc-%{version}
93 make boot
94 make -C glafp-utils sgmlverb
95 make all
96 make -C docs ps html
97 make -C ghc/docs/users_guide ps html
98 make -C ghc/docs/libraries ps html
99
100 %install
101 # compress the non-html docs
102 #
103 for j in docs ghc/docs; do
104   dir=`pwd`
105   cd $j
106   for i in ps dvi sgml vsgml verb idx; do
107     find . -name '*.'$i -exec gzip -9 '{}' ';' -print
108   done
109   cd $dir
110 done
111 rm -rf $RPM_BUILD_ROOT
112 make prefix=$RPM_BUILD_ROOT%{prefix}\
113      libdir=$RPM_BUILD_ROOT%{prefix}/lib/ghc-%{version} install
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %files
119 %doc ghc/ANNOUNCE ghc/PATCHLEVEL ghc/README docs/ ghc/docs/ CONTRIB/
120 %{prefix}/bin/ghc
121 %{prefix}/bin/ghc-%{version}
122 %{prefix}/bin/hp2ps
123 %{prefix}/bin/hstags
124 %{prefix}/bin/stat2resid
125 %{prefix}/lib/ghc-%{version}/