3 %bcond_without prof # profiling library
5 %define pkgname polyparse
6 Summary: A variety of alternative parser combinator libraries
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/polyparse
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 6656b800ff52a842ca0fd8083bad2e7d
15 Patch0: ghc-8.10.patch
16 URL: http://hackage.haskell.org/package/polyparse
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base
19 BuildRequires: ghc-bytestring
20 BuildRequires: ghc-text
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof
24 BuildRequires: ghc-bytestring-prof
25 BuildRequires: ghc-text-prof
27 BuildRequires: rpmbuild(macros) >= 1.608
28 Requires(post,postun): /usr/bin/ghc-pkg
31 Requires: ghc-bytestring
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 # debuginfo is not useful for ghc
36 %define _enable_debug_packages 0
38 # don't compress haddock files
39 %define _noautocompressdoc *.haddock
42 A variety of alternative parser combinator libraries, including the
43 original HuttonMeijer set. The Poly sets have features like good error
44 reporting, arbitrary token type, running state, lazy parsing, and so
45 on. Finally, Text.Parse is a proposed replacement for the standard
46 Read class, for better deserialisation of Haskell values from Strings.
49 Summary: Profiling %{pkgname} library for GHC
50 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
51 Group: Development/Libraries
52 Requires: %{name} = %{version}-%{release}
53 Requires: ghc-base-prof
54 Requires: ghc-bytestring-prof
55 Requires: ghc-text-prof
58 Profiling %{pkgname} library for GHC. Should be installed when
59 GHC's profiling subsystem is needed.
61 %description prof -l pl.UTF-8
62 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
63 kiedy potrzebujemy systemu profilującego z GHC.
66 %setup -q -n %{pkgname}-%{version}
70 runhaskell Setup.hs configure -v2 \
71 %{?with_prof:--enable-library-profiling} \
74 --libexecdir=%{_libexecdir} \
75 --docdir=%{_docdir}/%{name}-%{version}
77 runhaskell Setup.hs build
78 runhaskell Setup.hs haddock --executables
81 rm -rf $RPM_BUILD_ROOT
82 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
84 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
86 # work around automatic haddock docs installation
87 %{__rm} -rf %{name}-%{version}-doc
88 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
89 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
91 runhaskell Setup.hs register \
92 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
95 rm -rf $RPM_BUILD_ROOT
104 %defattr(644,root,root,755)
105 %doc %{name}-%{version}-doc/*
106 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpolyparse-%{version}-*.so
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpolyparse-%{version}-*.a
110 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpolyparse-%{version}-*_p.a
111 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.hi
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.dyn_hi
114 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Parse
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Parse/*.hi
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Parse/*.dyn_hi
117 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/*.hi
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/*.dyn_hi
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/Poly
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/Poly/*.hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/Poly/*.dyn_hi
126 %defattr(644,root,root,755)
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpolyparse-%{version}-*_p.a
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.p_hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Parse/*.p_hi
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/*.p_hi
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/ParserCombinators/Poly/*.p_hi