[project @ 2004-05-24 09:13:21 by simonmar]
[ghc-hetmet.git] / ghc / ghc.spec.in
index ba291f0..e3042e8 100644 (file)
@@ -1,4 +1,4 @@
-# RPM spec file for GHC
+# RPM spec file for GHC                                                 -*-rpm-spec-*-
 #
 # Copyright [1998..2002] The GHC Team
 #
@@ -26,7 +26,7 @@ URL: http://haskell.org/ghc/
 BuildRoot: /var/tmp/ghc-%{version}-%{release}-root
 Requires: gmp-devel
 Provides: haskell
-BuildRequires: happy >= 1.13, ghc >= 4.08, haddock, docbook-utils
+BuildRequires: happy >= 1.13, ghc >= 4.08, haddock, docbook-utils, jadetex, tetex-dvips
 
 %description
 Haskell is the standard purely functional programming language; the
@@ -68,6 +68,9 @@ the documentation is available online at
 
 %changelog
 
+* Tue Aug 19 2003 Sven Panne
+- use autoreconf
+
 * Wed Sep 26 2001 Manuel Chakravarty
 - small changes for 5.04
 
@@ -123,9 +126,9 @@ SRC_HAPPY_OPTS += -agc
 GhcWithInterpreter=YES
 END
 
-# run autoconf if necessary
+# run autoheader and autoconf if necessary
 #
-[ ! -x configure ] && autoconf && cd ghc && autoconf
+test -f configure || autoreconf
 
 %build
 ./configure --prefix=%{prefix}
@@ -140,7 +143,10 @@ make prefix=$RPM_BUILD_ROOT%{prefix} install-dirs
 
 make prefix=$RPM_BUILD_ROOT%{prefix} install
 
-make prefix=$RPM_BUILD_ROOT%{prefix} datadir=$RPM_BUILD_ROOT%{prefix}/share/doc/%{version} SGMLDocWays="html ps" install-docs
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/doc/ghc-%{version}
+cp ghc/ANNOUNCE ghc/README $RPM_BUILD_ROOT%{prefix}/share/doc/ghc-%{version}
+
+make prefix=$RPM_BUILD_ROOT%{prefix} datadir=$RPM_BUILD_ROOT%{prefix}/share/doc/ghc-%{version} SGMLDocWays="html ps" install-docs
 
 # generate the file list for lib/ _excluding_ all files needed for profiling
 # only
@@ -166,10 +172,15 @@ cd $dir
 rm -rf $RPM_BUILD_ROOT
 
 %files -f rpm-noprof-lib-files
-%doc ghc/ANNOUNCE ghc/README
+%defattr(-,root,root)
+%doc %{prefix}/share/doc/ghc-%{version}/ANNOUNCE
+%doc %{prefix}/share/doc/ghc-%{version}/README
 %{prefix}/bin/*
 
 %files prof -f rpm-prof-lib-files
+%defattr(-,root,root)
 
 %files doc
-%doc %{prefix}/share/doc/ghc-%{version}
+%defattr(-,root,root)
+%doc %{prefix}/share/doc/ghc-%{version}/*.ps
+%doc %{prefix}/share/doc/ghc-%{version}/html