3 %bcond_without prof # profiling library
5 %define pkgname mime-types
6 Summary: Basic mime-type handling types and functions
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/mime-types
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: e936b48f8549c390e9fac883c99ff3fd
15 URL: http://hackage.haskell.org/package/mime-types
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 Basic mime-type handling types and functions.
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}
41 Profiling %{pkgname} library for GHC. Should be installed when
42 GHC's profiling subsystem is needed.
44 %description prof -l pl.UTF-8
45 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
46 kiedy potrzebujemy systemu profilującego z GHC.
49 %setup -q -n %{pkgname}-%{version}
52 runhaskell Setup.lhs configure -v2 \
53 %{?with_prof:--enable-library-profiling} \
56 --libexecdir=%{_libexecdir} \
57 --docdir=%{_docdir}/%{name}-%{version}
59 runhaskell Setup.lhs build
60 runhaskell Setup.lhs haddock --executables
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
66 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
68 # work around automatic haddock docs installation
69 %{__rm} -rf %{name}-%{version}-doc
70 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
71 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
73 runhaskell Setup.lhs register \
74 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
77 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
87 %doc ChangeLog.md README.md %{name}-%{version}-doc/*
88 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
89 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
90 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
91 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
92 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
94 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.hi
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.dyn_hi
100 %defattr(644,root,root,755)
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.p_hi