[project @ 2001-11-26 08:31:05 by chak]
[ghc-hetmet.git] / ghc / ghc.spec.in
index dfe6d8f..5973b0b 100644 (file)
@@ -26,7 +26,7 @@ URL: http://haskell.org/ghc/
 BuildRoot: /var/tmp/ghc-%{version}-%{release}-root
 Requires: gmp-devel
 Provides: haskell
-BuildRequires: autoconf, happy >= 1.9, ghc, stylesheets
+BuildRequires: happy >= 1.9, ghc >= 4.08, docbook-utils
 
 %description
 Haskell is a standard lazy functional programming language; the
@@ -54,8 +54,24 @@ Requires: ghc = %{PACKAGE_VERSION}
 Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
 They should be installed when GHC's profiling subsystem is needed.
 
+%package doc
+Summary: Documentation for GHC
+Group: Documentation
+
+%description doc
+Preformatted documentation for the Glorious Glasgow Haskell Compilation System 
+(GHC) and its libraries.  It should be installed if you like to have local
+access to the documentation in PostScript and HTML format.  Alternatively,
+the documentation is available online at
+
+  http://haskell.org/ghc/documentation.html
+
 %changelog
 
+* Wed Sep 26 2001 Manuel Chakravarty
+- split documentation off into a separate package
+- adapt to new docbook setup in RH7.1
+
 * Mon Apr 16 2001 Manuel Chakravarty
 - revised for 5.00
 - also runs autoconf automagically if no ./configure found
@@ -100,7 +116,7 @@ They should be installed when GHC's profiling subsystem is needed.
 cat >mk/build.mk <<END
 GhcLibWays = p
 SRC_HAPPY_OPTS += -agc
-#GhcWithInterpreter=No
+#GhcWithInterpreter=NO
 GhcWithInterpreter=YES
 END
 
@@ -109,7 +125,7 @@ END
 [ ! -x configure ] && autoconf && cd ghc && autoconf
 
 %build
-./configure --prefix=%{prefix} --libdir=%{prefix}/lib/ghc-%{version}
+./configure --prefix=%{prefix}
 make boot
 make -C glafp-utils sgmlverb
 make all
@@ -128,8 +144,11 @@ for j in docs ghc/docs; do
   cd $dir
 done
 rm -rf $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT%{prefix}\
-     libdir=$RPM_BUILD_ROOT%{prefix}/lib/ghc-%{version} install
+
+# FIXME: this is necessary due to brokenness in ghc-5.00/mk/target.mk
+make prefix=$RPM_BUILD_ROOT%{prefix} install-dirs
+
+make prefix=$RPM_BUILD_ROOT%{prefix} install
 
 # generate the file list for lib/ _excluding_ all files needed for profiling
 # only
@@ -153,10 +172,13 @@ cd $dir
 rm -rf $RPM_BUILD_ROOT
 
 %files -f rpm-noprof-lib-files
-%doc docs/
-%doc ghc/ANNOUNCE ghc/README ghc/docs/
+%doc ghc/ANNOUNCE ghc/README
 %{prefix}/bin/*
 
 %files prof
 %{prefix}/lib/ghc-%{version}/imports/*/*.p_hi
 %{prefix}/lib/ghc-%{version}/libHS*_p.a
+
+%files doc
+%doc docs/
+%doc ghc/docs/