3 %bcond_without prof # profiling library
5 %define pkgname setlocale
6 Summary: Haskell bindings to setlocale
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/setlocale
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 348690842f5233f0e42e16bd615f777e
15 URL: http://hackage.haskell.org/package/setlocale
16 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-prof
20 BuildRequires: rpmbuild(macros) >= 1.608
22 Requires(post,postun): /usr/bin/ghc-pkg
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 # debuginfo is not useful for ghc
26 %define _enable_debug_packages 0
28 # don't compress haddock files
29 %define _noautocompressdoc *.haddock
32 Haskell bindings to setlocale.
35 Summary: Profiling %{pkgname} library for GHC
36 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
37 Group: Development/Libraries
38 Requires: %{name} = %{version}-%{release}
39 #Requires: ghc-OTHERMODULE-prof
42 Profiling %{pkgname} library for GHC. Should be installed when
43 GHC's profiling subsystem is needed.
45 %description prof -l pl.UTF-8
46 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
47 kiedy potrzebujemy systemu profilującego z GHC.
50 %setup -q -n %{pkgname}-%{version}
53 runhaskell Setup.hs configure -v2 \
54 %{?with_prof:--enable-library-profiling} \
57 --libexecdir=%{_libexecdir} \
58 --docdir=%{_docdir}/%{name}-%{version}
60 runhaskell Setup.hs build
61 runhaskell Setup.hs haddock --executables
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
67 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
69 # work around automatic haddock docs installation
70 %{__rm} -rf %{name}-%{version}-doc
71 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
72 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
74 runhaskell Setup.hs register \
75 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
78 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
88 %doc %{name}-%{version}-doc/*
89 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
90 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
91 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
92 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
93 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
95 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
96 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Locale
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Locale/*.hi
101 %defattr(644,root,root,755)
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Locale/*.p_hi