]> git.pld-linux.org Git - packages/ghc-pretty-show.git/blob - ghc-pretty-show.spec
4fde9ffc4c5c2dd045b8e8f975af4cbee29e2194
[packages/ghc-pretty-show.git] / ghc-pretty-show.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
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
8 Name:           ghc-%{pkgname}
9 Version:        1.10
10 Release:        2
11 License:        MIT
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
20 %if %{with prof}
21 BuildRequires:  ghc-prof
22 BuildRequires:  ghc-haskell-lexer-prof >= 1.1
23 BuildRequires:  ghc-pretty-prof >= 1
24 %endif
25 BuildRequires:  rpmbuild(macros) >= 1.608
26 %requires_eq    ghc
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)
31
32 # debuginfo is not useful for ghc
33 %define         _enable_debug_packages  0
34
35 # don't compress haddock files
36 %define         _noautocompressdoc      *.haddock
37
38 %description
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.
45
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.
54
55 %package prof
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
62
63 %description prof
64 Profiling %{pkgname} library for GHC.  Should be installed when
65 GHC's profiling subsystem is needed.
66
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.
70
71 %prep
72 %setup -q -n %{pkgname}-%{version}
73
74 %build
75 runhaskell Setup.hs configure -v2 \
76         %{?with_prof:--enable-library-profiling} \
77         --prefix=%{_prefix} \
78         --libdir=%{_libdir} \
79         --libexecdir=%{_libexecdir} \
80         --docdir=%{_docdir}/%{name}-%{version}
81
82 runhaskell Setup.hs build
83 runhaskell Setup.hs haddock
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
88
89 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
90
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}
95
96 runhaskell Setup.hs register \
97         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %post
103 %ghc_pkg_recache
104
105 %postun
106 %ghc_pkg_recache
107
108 %files
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
117
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
124
125 %{_datadir}/%{pkgname}-%{version}
126
127 %if %{with prof}
128 %files prof
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
133 %endif
This page took 0.055192 seconds and 2 git commands to generate.