3 %bcond_without prof # profiling library
6 Summary: Haskell 98 natural numbers
7 Summary(pl.UTF-8): Liczby naturalne dla Haskella 98
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/nats
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 86b609392a5272aa0eb4c66d3bbd4172
16 URL: http://hackage.haskell.org/package/nats
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 2
19 BuildRequires: ghc-base < 10
21 BuildRequires: ghc-prof >= 6.12.3
22 BuildRequires: ghc-base-prof >= 2
23 BuildRequires: ghc-base-prof < 10
25 BuildRequires: rpmbuild(macros) >= 1.608
26 Requires(post,postun): /usr/bin/ghc-pkg
28 Requires: ghc-base >= 2
29 Requires: ghc-base < 10
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 # debuginfo is not useful for ghc
33 %define _enable_debug_packages 0
35 # don't compress haddock files
36 %define _noautocompressdoc *.haddock
39 Haskell 98 natural numbers.
41 %description -l pl.UTF-8
42 Liczby naturalne dla Haskella 98.
45 Summary: Profiling %{pkgname} library for GHC
46 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
49 Requires: ghc-base-prof >= 2
50 Requires: ghc-base-prof < 10
53 Profiling %{pkgname} library for GHC. Should be installed when
54 GHC's profiling subsystem is needed.
56 %description prof -l pl.UTF-8
57 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
58 kiedy potrzebujemy systemu profilującego z GHC.
61 Summary: HTML documentation for ghc %{pkgname} package
62 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
66 HTML documentation for ghc %{pkgname} package.
68 %description doc -l pl.UTF-8
69 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
72 %setup -q -n %{pkgname}-%{version}
75 runhaskell Setup.lhs configure -v2 \
76 %{?with_prof:--enable-library-profiling} \
79 --libexecdir=%{_libexecdir} \
80 --docdir=%{_docdir}/%{name}-%{version}
82 runhaskell Setup.lhs build
83 runhaskell Setup.lhs haddock --executables
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
89 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
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}
96 runhaskell Setup.lhs register \
97 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
100 rm -rf $RPM_BUILD_ROOT
109 %defattr(644,root,root,755)
110 %doc CHANGELOG.markdown LICENSE README.markdown
111 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSnats-%{version}.o
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSnats-%{version}.a
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural.hi
117 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural/*.hi
122 %defattr(644,root,root,755)
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSnats-%{version}_p.a
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural.p_hi
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/Natural/*.p_hi
129 %defattr(644,root,root,755)
130 %doc %{name}-%{version}-doc/*