# # Conditional build: %bcond_with bootstrap # use foreign (non-rpm) ghc # Summary: A documentation tool for annotated Haskell source code Summary(pl.UTF-8): Generator dokumentacji z oznaczonych źródeł w Haskellu Name: haddock Version: 0.8 Release: 5 License: BSD-like w/o adv. clause Group: Development/Tools Source0: http://haskell.org/haddock/%{name}-%{version}-src.tar.gz # Source0-md5: 0a1bb64e7642f64d2560dc258c570c1d URL: http://haskell.org/haddock/ BuildRequires: alex BuildRequires: autoconf BuildRequires: docbook-dtd42-xml BuildRequires: docbook-style-xsl %{!?with_bootstrap:BuildRequires: ghc >= 6.6} BuildRequires: gmp-devel BuildRequires: happy BuildRequires: libxslt-progs #For generating documentation in PDF: fop or xmltex BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Haddock is a tool for automatically generating documentation from annotated Haskell source code. It is primary intended for documenting libraries, but it should be useful for any kind of Haskell code. Haddock lets you write documentation annotations next to the definitions of functions and types in the source code, in a syntax that is easy on the eye when writing the source code (no heavyweight mark-up). The documentation generated by Haddock is fully hyperlinked -- click on a type name in a type signature to go straight to the definition, and documentation, for that type. Haddock can generate documentation in multiple formats; currently HTML is implemented, and there is partial support for generating DocBook. The generated HTML uses stylesheets, so you need a fairly up-to-date browser to view it properly (Mozilla, Konqueror, Opera, and IE 6 should all be ok). %description -l pl.UTF-8 Haddock to narzędzie do automatycznego generowania dokumentacji z odpowiednio oznaczonych źródeł w Haskellu. Jest przeznaczony przede wszystkim do dokumentowania bibliotek, ale można go użyć do dowolnego kodu w Haskellu. Haddock pozwala pisać adnotacje z dokumentacją obok definicji funkcji i typów w kodzie źródłowym, w składni przyjemnej dla oka (bez ciężkich znaczników). Dokumentacja wygenerowana przez Haddock jest w pełni hipertekstowa -- można kliknąć na nazwę typu w sygnaturze typu, żeby przejść prosto do definicji i dokumentacji tego typu. Haddock może generować dokumentację w wielu formatach; na razie zaimplementowany jest HTML i jest częściowe wsparcie generowania DocBooka. Wygenerowany HTML używa arkuszy stylów, więc będzie potrzebna dość nowa przeglądarka, żeby go poprawnie oglądać (np. Mozilla, Konqueror, Opera albo IE 6). %prep %setup -q %build %{?with_bootstrap:PATH=$PATH:/usr/local/bin} runhaskell Setup.lhs configure --prefix=%{_prefix} runhaskell Setup.lhs build cd doc test -f configure || autoreconf ./configure %{__make} html cd .. %install rm -rf $RPM_BUILD_ROOT %{?with_bootstrap:PATH=$PATH:/usr/local/bin} runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_examplesdir} cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc CHANGES README TODO doc/haddock haskell.vim %attr(755,root,root) %{_bindir}/haddock %{_datadir}/%{name}-%{version} %{_examplesdir}/%{name}-%{version}