3 %bcond_without prof # profiling library
6 Summary: A Haskell binding to the cereal graphics library
11 Group: Development/Languages
12 Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
13 # Source0-md5: 4f5e41ee3371272daa12a2d073d2fd4f
14 URL: http://hackage.haskell.org/package/cereal/
15 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-prof
19 BuildRequires: rpmbuild(macros) >= 1.608
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 # debuginfo is not useful for ghc
24 %define _enable_debug_packages 0
27 A Haskell binding to the cereal graphics library.
30 Summary: Profiling %{pkgname} library for GHC
31 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
32 Group: Development/Libraries
33 Requires: %{name} = %{version}-%{release}
36 Profiling %{pkgname} library for GHC. Should be installed when
37 GHC's profiling subsystem is needed.
39 %description prof -l pl.UTF-8
40 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
41 kiedy potrzebujemy systemu profilującego z GHC.
44 Summary: HTML documentation for %{pkgname}
45 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
49 HTML documentation for %{pkgname}.
51 %description doc -l pl.UTF-8
52 Dokumentacja w formacie HTML dla %{pkgname}.
55 %setup -q -n %{pkgname}-%{version}
58 runhaskell Setup.lhs configure -v2 \
59 %{?with_prof:--enable-library-profiling} \
62 --libexecdir=%{_libexecdir} \
63 --docdir=%{_docdir}/%{name}-%{version}
65 runhaskell Setup.lhs build
66 runhaskell Setup.lhs haddock --executables
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
72 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
74 # work around automatic haddock docs installation
75 rm -rf %{name}-%{version}-doc
76 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
77 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
79 runhaskell Setup.lhs register \
80 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
83 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
93 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
94 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
97 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
99 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
102 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize/*.hi
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize/*.dyn_hi
108 %defattr(644,root,root,755)
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize/*.p_hi
115 %defattr(644,root,root,755)
116 %doc %{name}-%{version}-doc/*