1 # RPM spec file for GHC
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.
7 # This file is subject to the same free software license as GHC.
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).
13 %define version @version@
14 %define patchlevel @patchlevel@
18 Summary: Glasgow Haskell Compilation system
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
29 BuildRequires: happy >= 1.6, ghc, stylesheets
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/.
43 Haskell 98 is "the" standard lazy functional programming language.
44 More info plus the language definition is at http://www.haskell.org/.
47 Summary: Profiling libraries for GHC
48 Group: Development/Libraries
49 Requires: ghc = %{PACKAGE_VERSION}
52 Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
53 They should be installed when GHC's profiling subsystem is needed.
57 * Thu Jun 22 2000 Sven Panne
58 - removed explicit usage of hslibs/docs, it belongs to ghc/docs/set
60 * Sun Apr 23 2000 Manuel Chakravarty
61 - revised for ghc 4.07; added suggestions from Pixel <pixel@mandrakesoft.com>
62 - added profiling package
64 * Tue Dec 7 1999 Manuel Chakravarty
65 - version for use from CVS
67 * Thu Sep 16 1999 Manuel Chakravarty
68 - modified for GHC 4.04, patchlevel 1 (no more 62 tuple stuff); minimises use
69 of patch files - instead emits a build.mk on-the-fly
71 * Sat Jul 31 1999 Manuel Chakravarty
72 - modified for GHC 4.04
74 * Wed Jun 30 1999 Manuel Chakravarty
75 - some more improvements from vbzoli
77 * Fri Feb 26 1999 Manuel Chakravarty
78 - modified for GHC 4.02
80 * Thu Dec 24 1998 Zoltan Vorosbaranyi
82 - files located in /usr/local/bin, /usr/local/lib moved to /usr/bin, /usr/lib
84 * Tue Jul 28 1998 Manuel Chakravarty
90 # generate our own `build.mk'
94 cat >mk/build.mk <<END
96 #SRC_HAPPY_OPTS += -agc # useful from Happy 1.7 onwards
102 ./configure --prefix=%{prefix} --libdir=%{prefix}/lib/ghc-%{version}
104 make -C glafp-utils sgmlverb
107 make -C ghc/docs ps html
110 # compress the non-html docs
112 for j in docs ghc/docs; do
115 for i in ps dvi sgml verb idx; do
116 find . -name '*.'$i -exec gzip -9 '{}' ';' -print
120 rm -rf $RPM_BUILD_ROOT
121 make prefix=$RPM_BUILD_ROOT%{prefix}\
122 libdir=$RPM_BUILD_ROOT%{prefix}/lib/ghc-%{version} install
124 # generate the file list for lib/ _excluding_ all files needed for profiling
127 # * generating file lists in a BUILD_ROOT spec is a bit tricky: the file list
128 # has to contain complete paths, _but_ without the BUILD_ROOT, we also do
129 # _not_ want have directory names in the list; furthermore, we have to make
130 # sure that any leading / is removed from %{prefix}/lib, as find has to
131 # interpret the argument as a relative path; however, we have to include the
132 # leading / again in the final file list (otherwise, rpm complains)
133 # * isn't there an easier way to do all this?
137 libdir=`echo %{prefix}/lib | sed 's|^/||'`
138 find $libdir ! -type d ! -name '*.p_hi' ! -name '*_p.a' -print | sed 's|^|/|'\
139 >$dir/rpm-noprof-lib-files
143 rm -rf $RPM_BUILD_ROOT
145 %files -f rpm-noprof-lib-files
147 %doc ghc/ANNOUNCE ghc/README ghc/docs/
151 %{prefix}/lib/ghc-%{version}/imports/*/*.p_hi
152 %{prefix}/lib/ghc-%{version}/libHS*_p.a