[project @ 2000-04-27 13:54:11 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 # useful from Happy 1.7 onwards
94 SRC_HAPPY_OPTS += -c
95 END
96
97
98 %build
99 ./configure --prefix=%{prefix} --libdir=%{prefix}/lib/ghc-%{version}
100 make boot
101 make -C glafp-utils sgmlverb
102 make all
103 make -C docs ps html
104 make -C ghc/docs ps html
105 make -C hslibs/doc ps html
106
107 %install
108 # compress the non-html docs
109 #
110 for j in docs ghc/docs hslibs/doc; do
111   dir=`pwd`
112   cd $j
113   for i in ps dvi sgml vsgml verb idx; do
114     find . -name '*.'$i -exec gzip -9 '{}' ';' -print
115   done
116   cd $dir
117 done
118 rm -rf $RPM_BUILD_ROOT
119 make prefix=$RPM_BUILD_ROOT%{prefix}\
120      libdir=$RPM_BUILD_ROOT%{prefix}/lib/ghc-%{version} install
121
122 # generate the file list for lib/ _excluding_ all files needed for profiling
123 # only
124 #
125 find $RPM_BUILD_ROOT%{prefix}/lib\
126   ! -type d ! -name '*.p_hi' ! -name '*_p.a' -print >rpm-noprof-lib-files
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %files -f rpm-noprof-lib-files
132 %doc docs/ CONTRIB/
133 %doc ghc/ANNOUNCE ghc/PATCHLEVEL ghc/README ghc/docs/
134 %doc hslibs/doc/
135 %{prefix}/bin/*
136
137 %files prof
138 %{prefix}/lib/ghc-%{version}/imports/*/*.p_hi
139 %{prefix}/lib/ghc-%{version}/libHS*_p.a