[project @ 1999-12-07 13:04:31 by panne]
[ghc-hetmet.git] / ghc / ghc.spec
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 Provides: haskell
29
30 %description
31 The Glorious Glasgow Haskell Compilation System (GHC) is a robust,
32 fully-featured, optimising compiler for the functional programming
33 language Haskell 98.  GHC compiles Haskell to either native code or
34 C. It implements numerous experimental language extensions to Haskell,
35 including concurrency, a foreign language interface, several
36 type-system extensions, exceptions, and so on. GHC comes with a
37 generational garbage collector, a space and time profiler, and a
38 comprehensive set of libraries.  This package includes HTML and PS
39 versions of the SGML-based documentation for GHC.  They are also available 
40 online at http://www.haskell.org/ghc/.
41
42 Haskell 98 is "the" standard lazy functional programming language.
43 More info plus the language definition is at http://www.haskell.org/.
44
45 ** This package does not include libraries for profiling **
46
47 %changelog
48
49 * Tue Dec 7 1999 Manuel Chakravarty
50 - version for use from CVS
51
52 * Thu Sep 16 1999 Manuel Chakravarty
53 - modified for GHC 4.04, patchlevel 1 (no more 62 tuple stuff); minimises use
54   of patch files - instead emits a build.mk on-the-fly
55
56 * Sat Jul 31 1999 Manuel Chakravarty
57 - modified for GHC 4.04
58
59 * Wed Jun 30 1999 Manuel Chakravarty
60 - some more improvements from vbzoli
61
62 * Fri Feb 26 1999 Manuel Chakravarty
63 - modified for GHC 4.02
64
65 * Thu Dec 24 1998 Zoltan Vorosbaranyi 
66 - added BuildRoot
67 - files located in /usr/local/bin, /usr/local/lib moved to /usr/bin, /usr/lib
68
69 * Tue Jul 28 1998 Manuel Chakravarty
70 - original version
71
72 %prep
73 %setup -n fptools
74
75 # generate our own `build.mk'
76 #
77 # * this is a kludge, to be used until the `configure' script is improved
78 #
79 cat >mk/build.mk <<END
80 GhcHcOpts = -O -dcore-lint -H24m
81 GhcCompilerWays =
82 GhcLibWays = 
83 GhcLibHcOpts = -O -H24m -split-objs -odir \$* 
84 GhcLibsWithReadline = YES
85 StripLibraries = YES
86 SRC_HAPPY_OPTS += -c
87 END
88
89
90 %build
91 ./configure --prefix=%{prefix} --libdir=%{prefix}/lib/ghc-%{version}
92 make boot
93 make -C glafp-utils sgmlverb
94 make all
95 make -C docs ps html
96 make -C ghc/docs/users_guide ps html
97 make -C ghc/docs/libraries ps html
98
99 %install
100 # compress the non-html docs
101 #
102 for j in docs ghc/docs; do
103   dir=`pwd`
104   cd $j
105   for i in ps dvi sgml vsgml verb idx; do
106     find . -name '*.'$i -exec gzip -9 '{}' ';' -print
107   done
108   cd $dir
109 done
110 rm -rf $RPM_BUILD_ROOT
111 make prefix=$RPM_BUILD_ROOT%{prefix}\
112      libdir=$RPM_BUILD_ROOT%{prefix}/lib/ghc-%{version} install
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %files
118 %doc ghc/ANNOUNCE ghc/PATCHLEVEL ghc/README docs/ ghc/docs/ CONTRIB/
119 %{prefix}/bin/ghc
120 %{prefix}/bin/ghc-%{version}
121 %{prefix}/bin/hp2ps
122 %{prefix}/bin/hstags
123 %{prefix}/bin/stat2resid
124 %{prefix}/lib/ghc-%{version}/