3 %bcond_without prof # profiling library
5 %define pkgname pretty-show
6 Summary: Tools for working with derived Show instances and generic inspection of values
7 Summary(pl.UTF-8): Narzędzie do pracy z instancjami wywodzącymi się z Show i ogólnym badaniem wartości
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/pretty-show
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 1d4c4c9c02c5865eb5ac30c29d9ffc4d
16 URL: http://hackage.haskell.org/package/pretty-show
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-haskell-lexer >= 1.1
19 BuildRequires: ghc-pretty >= 1
21 BuildRequires: ghc-prof
22 BuildRequires: ghc-haskell-lexer-prof >= 1.1
23 BuildRequires: ghc-pretty-prof >= 1
25 BuildRequires: rpmbuild(macros) >= 1.608
27 Requires(post,postun): /usr/bin/ghc-pkg
28 Requires: ghc-haskell-lexer >= 1.1
29 Requires: ghc-pretty >= 1
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 # debuginfo is not useful for ghc
33 %define _enable_debug_packages 0
35 # don't compress haddock files
36 %define _noautocompressdoc *.haddock
39 A library and an executable for working with derived Show instances.
40 By using the library, we can parse derived Show instances into a
41 generic data structure. The ppsh tool uses the library to produce
42 human-readable versions of Show instances, which can be quite handy
43 for debugging Haskell programs. We can also render complex generic
44 values into an interactive HTML page, for easier examination.
46 %description -l pl.UTF-8
47 Biblioteka i program do pracy z instancjami wywodzącymi się z Show.
48 Przy użyciu tej biblioteki można przetwarzać instancje wywodzące się z
49 Show do ogólnych struktur danych. Narzędzie ppsh wykorzystuje
50 bibiotekę do tworzenia czytelnych dla człowieka instancji Show, co
51 może być przydatne do diagnostyki programów w Haskellu. Możliwe jest
52 także renderowanie złożonych ogólnych wartości do interaktywnej strony
53 HTML w celu łatwiejszego zbadania.
56 Summary: Profiling %{pkgname} library for GHC
57 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: ghc-haskell-lexer-prof >= 1.1
61 Requires: ghc-pretty-prof >= 1
64 Profiling %{pkgname} library for GHC. Should be installed when
65 GHC's profiling subsystem is needed.
67 %description prof -l pl.UTF-8
68 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
69 kiedy potrzebujemy systemu profilującego z GHC.
72 %setup -q -n %{pkgname}-%{version}
75 runhaskell Setup.hs configure -v2 \
76 %{?with_prof:--enable-library-profiling} \
79 --libexecdir=%{_libexecdir} \
80 --docdir=%{_docdir}/%{name}-%{version}
82 runhaskell Setup.hs build
83 runhaskell Setup.hs haddock
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
89 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
91 # work around automatic haddock docs installation
92 %{__rm} -rf %{name}-%{version}-doc
93 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
94 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
96 runhaskell Setup.hs register \
97 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
100 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
110 %doc CHANGELOG %{name}-%{version}-doc/*
111 %attr(755,root,root) %{_bindir}/ppsh
112 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
114 %attr(755,root,root) %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
116 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
121 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Show
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Show/*.hi
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Show/*.dyn_hi
125 %{_datadir}/%{pkgname}-%{version}
129 %defattr(644,root,root,755)
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Show/*.p_hi