prepare for change to haskell packaging conventions

OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=63
This commit is contained in:
Herbert Graeber 2009-02-24 22:20:27 +00:00 committed by Git OBS Bridge
parent 58eef8741c
commit c326b5191a

View File

@ -16,6 +16,7 @@ License: BSD3
Group: Development/Languages/Haskell
Source0: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
Source1: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src-extralibs.tar.bz2
Source3: macros.ghc
URL: http://haskell.org/ghc/
Provides: haddock = 2.3.0
Provides: array-%{f_version} = 0.2.0.0
@ -109,7 +110,7 @@ Haskell home page at <http://www.haskell.org/>.
%package prof
Summary: Profiling libraries for GHC
Group: Development/Libraries/Haskell
Requires: %{name} = %{version}-%{release}
Requires: ghc = %{version}-%{release}
Provides: ghc-prof = %{version}
Provides: array-%{f_version}-prof = 0.2.0.0
Provides: base-%{f_version}-prof = 3.0.3.0
@ -157,6 +158,7 @@ They should be installed when GHC's profiling subsystem is needed.
%package doc
Summary: Documentation for GHC
Group: Development/Languages/Haskell
Requires: ghc = %{version}-%{release}
%description doc
Preformatted documentation for the Glorious Glasgow Haskell Compilation System
@ -195,25 +197,23 @@ echo "NO_INSTALL_RUNHASKELL=YES" >>mk/build.mk
#echo "NO_INSTALL_HSC2HS=YES" >>mk/build.mk
cat <<"EOF" >>mk/build.mk
docdir := %{_docdir}/%{name}-doc
docdir := %{_datadir}/doc/%{name}
htmldir := $(docdir)
dvidir := $(docdir)
pdfdir := $(docdir)
psdir := $(docdir)
EOF
make %{?jobs:-j%jobs} all datadir="${_docdir}/%{name}-doc"
make %{?jobs:-j%jobs} all datadir="${_datadir}/doc/%{name}"
make html
make -C libraries HADDOCK_DOCS=YES
( cd libraries/Cabal && docbook2html doc/Cabal.xml --output doc/Cabal )
make -C docs/storage-mgt ps
%install
mkdir html-docs
make DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-doc HADDOCK_DOCS=YES install install-docs
cp -a %{buildroot}%{_docdir}/%{name}-doc/index.html html-docs
cp -a %{buildroot}%{_docdir}/%{name}-doc/libraries html-docs
make DESTDIR=%{buildroot} docdir=%{_datadir}/doc/%{name} HADDOCK_DOCS=YES install install-docs
mv %{buildroot}%{_prefix}/bin/hsc2hs %{buildroot}%{_prefix}/bin/hsc2hs-ghc
install -D -m 644 -o root -g root %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.ghc
dir=`pwd`
pushd %{buildroot}
@ -248,6 +248,7 @@ fi
%doc HACKING
%doc LICENSE
%doc README
%{_sysconfdir}/rpm/macros.ghc
%{_bindir}/ghc
%{_bindir}/ghc-%{version}
%{_bindir}/ghc-pkg
@ -270,7 +271,7 @@ fi
%files doc
%defattr(-,root,root)
%doc html-docs/*
%{_datadir}/doc/%{name}
%doc docs/comm
%doc docs/docbook-cheat-sheet/docbook-cheat-sheet
%doc docs/users_guide/users_guide
@ -280,6 +281,10 @@ fi
%doc docs/storage-mgt/sm.ps
%changelog
* Tue Feb 24 2009 herbert Graeber <herber@graeber-clan.de> 6.10.1
- prepare for use of haskell packaging conventions
- move library doc files to /usr/share/doc/ghc/libraries
* Mon Nov 25 2008 Herbert Graeber <herbert@links2linux.de> 6.10.1
- add some directories to files list