3 %bcond_without prof # profiling library
6 Summary: Support for serialising Haskell to and from JSON
7 Summary(pl.UTF-8): Obsługa serializacji Haskella do i z formatu JSON
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/json
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: a30006f2e673b29852be7c001cfc2bfa
16 URL: http://hackage.haskell.org/package/json
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-array
19 BuildRequires: ghc-base >= 3
20 BuildRequires: ghc-bytestring
21 BuildRequires: ghc-containers
22 BuildRequires: ghc-mtl
23 BuildRequires: ghc-text
25 BuildRequires: ghc-prof >= 6.12.3
26 BuildRequires: ghc-array-prof
27 BuildRequires: ghc-base-prof >= 3
28 BuildRequires: ghc-bytestring-prof
29 BuildRequires: ghc-containers-prof
30 BuildRequires: ghc-mtl-prof
31 BuildRequires: ghc-text-prof
33 BuildRequires: rpmbuild(macros) >= 1.608
34 Requires(post,postun): /usr/bin/ghc-pkg
37 Requires: ghc-base >= 3
38 Requires: ghc-bytestring
39 Requires: ghc-containers
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 # debuginfo is not useful for ghc
45 %define _enable_debug_packages 0
47 # don't compress haddock files
48 %define _noautocompressdoc *.haddock
51 This library provides a parser and pretty printer for converting
52 between Haskell values and JSON.
54 %description -l pl.UTF-8
55 Ta biblioteka udostępnia parser oraz funkcję wypisującą (pretty
56 printer) do konwersji między wartościami Haskella a formatem JSON.
59 Summary: Profiling %{pkgname} library for GHC
60 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
63 Requires: ghc-array-prof
64 Requires: ghc-base-prof >= 3
65 Requires: ghc-bytestring-prof
66 Requires: ghc-containers-prof
67 Requires: ghc-mtl-prof
68 Requires: ghc-text-prof
71 Profiling %{pkgname} library for GHC. Should be installed when GHC's
72 profiling subsystem is needed.
74 %description prof -l pl.UTF-8
75 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
76 kiedy potrzebujemy systemu profilującego z GHC.
79 %setup -q -n %{pkgname}-%{version}
82 runhaskell Setup.hs configure -v2 \
83 %{?with_prof:--enable-library-profiling} \
86 --libexecdir=%{_libexecdir} \
87 --docdir=%{_docdir}/%{name}-%{version}
89 runhaskell Setup.hs build
90 runhaskell Setup.hs haddock --executables
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
96 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
98 # work around automatic haddock docs installation
99 %{__rm} -rf %{name}-%{version}-doc
100 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
101 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
103 runhaskell Setup.hs register \
104 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
107 rm -rf $RPM_BUILD_ROOT
116 %defattr(644,root,root,755)
117 %doc CHANGES %{name}-%{version}-doc/*
118 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
119 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSjson-%{version}-*.so
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSjson-%{version}-*.a
122 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSjson-%{version}-*_p.a
123 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.hi
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.dyn_hi
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/JSON
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/JSON/*.hi
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/JSON/*.dyn_hi
131 %defattr(644,root,root,755)
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSjson-%{version}-*_p.a
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.p_hi
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/JSON/*.p_hi