1 # RPM spec file for GHC -*-rpm-spec-*-
3 # Copyright [1998..2004] The GHC Team
5 # Thanks to Zoltan Vorosbaranyi <vbzoli@vbzo.li> for suggestions in
6 # earlier versions and Pixel <pixel@mandrakesoft.com> for coding tips.
8 # This file is subject to the same free software license as GHC.
10 # Values for @version@ is set by the `configure' script. SNAP releases are
11 # CVS snapshots. Official releases should replace SNAP by an appropriate
12 # release numbers (they are usually numbered starting from 1).
15 %define version @version@
22 Group: Development/Languages/Haskell
23 URL: http://haskell.org/ghc/
24 Source: http://haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
25 BuildRoot: %{_tmppath}/%{name}-%{version}-build
29 BuildRequires: alex >= 2.0, happy >= 1.14, ghc >= 5, haddock, docbk31, jade, jadetex, dvips
30 Summary: Glasgow Haskell Compilation system
33 Haskell is the standard purely functional programming language; the
34 current language version is Haskell 98, agreed in December 1998.
36 GHC is a state-of-the-art programming suite for Haskell. Included is
37 an optimising compiler generating good code for a variety of
38 platforms, together with an interactive system for convenient, quick
39 development. The distribution includes space and time profiling
40 facilities, a large collection of libraries, and support for various
41 language extensions, including concurrency, exceptions, and foreign
42 language interfaces (C, C++, whatever).
44 A wide variety of Haskell related resources (tutorials, libraries,
45 specifications, documentation, compilers, interpreters, references,
46 contact information, links to research groups) are available from the
47 Haskell home page at http://haskell.org/.
50 Summary: Profiling libraries for GHC
51 Group: Development/Libraries
52 Requires: ghc = %{PACKAGE_VERSION}-%{release}
55 Profiling libraries for Glorious Glasgow Haskell Compilation System
56 (GHC). They should be installed when GHC's profiling subsystem is
60 Summary: Documentation for GHC
64 Preformatted documentation for the Glorious Glasgow Haskell
65 Compilation System (GHC) and its libraries. It should be installed if
66 you like to have local access to the documentation in PostScript and
67 HTML format. Alternatively, the documentation is available online at
69 http://haskell.org/ghc/documentation.html
75 test -f configure || autoreconf
76 ./configure --prefix=%{prefix}
81 make prefix=${RPM_BUILD_ROOT}%{prefix} install
83 mkdir -p ${RPM_BUILD_ROOT}%{prefix}/share/doc/ghc-%{version}
84 cp ghc/ANNOUNCE ghc/README ${RPM_BUILD_ROOT}%{prefix}/share/doc/ghc-%{version}
86 make prefix=${RPM_BUILD_ROOT}%{prefix} datadir=${RPM_BUILD_ROOT}%{prefix}/share/doc/ghc-%{version} SGMLDocWays="html ps" install-docs
88 # generate the file list for lib/ _excluding_ all files needed for profiling
91 # * generating file lists in a BUILD_ROOT spec is a bit tricky: the file list
92 # has to contain complete paths, _but_ without the BUILD_ROOT, we also do
93 # _not_ want have directory names in the list; furthermore, we have to make
94 # sure that any leading / is removed from %{prefix}/lib, as find has to
95 # interpret the argument as a relative path; however, we have to include the
96 # leading / again in the final file list (otherwise, rpm complains)
97 # * isn't there an easier way to do all this?
101 libdir=`echo %{prefix}/lib | sed 's|^/||'`
102 find $libdir ! -type d ! -name '*.p_hi' ! -name '*_p.a' -print | sed 's|^|/|' > $dir/rpm-noprof-lib-files
103 find $libdir ! -type d \( -name '*.p_hi' -or -name '*_p.a' \) -print | sed 's|^|/|' > $dir/rpm-prof-lib-files
107 rm -rf ${RPM_BUILD_ROOT}
109 %files -f rpm-noprof-lib-files
110 %defattr(-,root,root)
111 %doc %{prefix}/share/doc/ghc-%{version}/ANNOUNCE
112 %doc %{prefix}/share/doc/ghc-%{version}/README
115 %files prof -f rpm-prof-lib-files
116 %defattr(-,root,root)
119 %defattr(-,root,root)
120 %doc %{prefix}/share/doc/ghc-%{version}/*.ps
121 %doc %{prefix}/share/doc/ghc-%{version}/html