]> git.pld-linux.org Git - packages/ghc-base-orphans.git/blob - ghc-base-orphans.spec
7a2ebc4527e47657104e4a53a90a10707a63b11c
[packages/ghc-base-orphans.git] / ghc-base-orphans.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname base-orphans
6 Summary:        Backwards-compatible orphan instances for base
7 Name:           ghc-%{pkgname}
8 Version:        0.8.2
9 Release:        1
10 License:        MIT
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
17 %if %{with prof}
18 BuildRequires:  ghc-prof
19 %endif
20 BuildRequires:  rpmbuild(macros) >= 1.608
21 %requires_eq    ghc
22 Requires(post,postun):  /usr/bin/ghc-pkg
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 # debuginfo is not useful for ghc
26 %define         _enable_debug_packages  0
27
28 # don't compress haddock files
29 %define         _noautocompressdoc      *.haddock
30
31 %description
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.
39
40 %package prof
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}
45
46 %description prof
47 Profiling %{pkgname} library for GHC.  Should be installed when
48 GHC's profiling subsystem is needed.
49
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.
53
54 %prep
55 %setup -q -n %{pkgname}-%{version}
56
57 %build
58 runhaskell Setup.hs configure -v2 \
59         %{?with_prof:--enable-library-profiling} \
60         --prefix=%{_prefix} \
61         --libdir=%{_libdir} \
62         --libexecdir=%{_libexecdir} \
63         --docdir=%{_docdir}/%{name}-%{version}
64
65 runhaskell Setup.hs build
66 runhaskell Setup.hs haddock --executables
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
71
72 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
73
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}
78
79 runhaskell Setup.hs register \
80         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %post
86 %ghc_pkg_recache
87
88 %postun
89 %ghc_pkg_recache
90
91 %files
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
99
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
106
107 %if %{with prof}
108 %files prof
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
113 %endif
This page took 0.037196 seconds and 2 git commands to generate.