3 %bcond_without prof # profiling library
5 %define pkgname base-orphans
6 Summary: Backwards-compatible orphan instances for base
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/base-orphans
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 3de80a9b42b3b2662e8f1e08c861ddaa
15 URL: http://hackage.haskell.org/package/base-orphans
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 base-orphans defines orphan instances that mimic instances available
33 in later versions of base to a wider (older) range of compilers.
34 base-orphans does not export anything except the orphan instances
35 themselves and complements base-compat. See the README for what
36 instances are covered:
37 https://github.com/haskell-compat/base-orphans#readme.
38 See also the what is not covered section.
41 Summary: Profiling %{pkgname} library for GHC
42 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
43 Group: Development/Libraries
44 Requires: %{name} = %{version}-%{release}
47 Profiling %{pkgname} library for GHC. Should be installed when
48 GHC's profiling subsystem is needed.
50 %description prof -l pl.UTF-8
51 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
52 kiedy potrzebujemy systemu profilującego z GHC.
55 %setup -q -n %{pkgname}-%{version}
58 runhaskell Setup.hs configure -v2 \
59 %{?with_prof:--enable-library-profiling} \
62 --libexecdir=%{_libexecdir} \
63 --docdir=%{_docdir}/%{name}-%{version}
65 runhaskell Setup.hs build
66 runhaskell Setup.hs haddock --executables
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
72 runhaskell Setup.hs 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} %{name}-%{version}-doc
77 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
79 runhaskell Setup.hs 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 %doc CHANGES.markdown README.markdown %{name}-%{version}-doc/*
94 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
95 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
98 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
100 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
103 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Orphans
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Orphans/*.hi
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Orphans/*.dyn_hi
109 %defattr(644,root,root,755)
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Orphans/*.p_hi