]>
Commit | Line | Data |
---|---|---|
d0cba52a JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname transformers-compat | |
6 | Summary: A small compatibility shim for the transformers library | |
7 | Name: ghc-%{pkgname} | |
8 | Version: 0.6.5 | |
af956fc9 | 9 | Release: 2 |
d0cba52a JR |
10 | License: BSD |
11 | Group: Development/Languages | |
12 | Source0: http://hackage.haskell.org/package/transformers-compat-%{version}/%{pkgname}-%{version}.tar.gz | |
13 | # Source0-md5: 4da06165ca543de01f5419c47f53442a | |
14 | URL: http://hackage.haskell.org/package/transformers-compat | |
15 | BuildRequires: ghc >= 6.12.3 | |
16 | BuildRequires: ghc-base >= 3 | |
2df56b70 | 17 | BuildRequires: ghc-generic-deriving >= 1.10 |
d0cba52a JR |
18 | BuildRequires: ghc-ghc-prim |
19 | BuildRequires: ghc-mtl | |
20 | BuildRequires: ghc-transformers >= 0.2 | |
21 | %if %{with prof} | |
22 | BuildRequires: ghc-base-prof >= 3 | |
2df56b70 | 23 | BuildRequires: ghc-generic-deriving-prof >= 1.10 |
d0cba52a JR |
24 | BuildRequires: ghc-ghc-prim-prof |
25 | BuildRequires: ghc-mtl-prof | |
26 | BuildRequires: ghc-transformers-prof >= 0.2 | |
27 | %endif | |
28 | BuildRequires: rpmbuild(macros) >= 1.608 | |
29 | Requires(post,postun): /usr/bin/ghc-pkg | |
30 | %requires_eq ghc | |
31 | Requires: ghc-base >= 3 | |
2df56b70 | 32 | Requires: ghc-generic-deriving >= 1.10 |
d0cba52a JR |
33 | Requires: ghc-ghc-prim |
34 | Requires: ghc-mtl | |
35 | Requires: ghc-transformers >= 0.2 | |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
37 | ||
38 | # debuginfo is not useful for ghc | |
39 | %define _enable_debug_packages 0 | |
40 | ||
41 | # don't compress haddock files | |
42 | %define _noautocompressdoc *.haddock | |
43 | ||
44 | %description | |
45 | This package includes backported versions of types that were added to | |
46 | transformers in transformers 0.3, 0.4, and 0.5 for users who need | |
47 | strict transformers 0.2 or 0.3 compatibility to run on old versions of | |
48 | the platform, but also need those types. | |
49 | ||
50 | %package prof | |
51 | Summary: Profiling %{pkgname} library for GHC | |
52 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | Requires: ghc-base-prof >= 3 | |
2df56b70 | 56 | Requires: ghc-generic-deriving-prof >= 1.10 |
d0cba52a JR |
57 | Requires: ghc-ghc-prim-prof |
58 | Requires: ghc-mtl-prof | |
59 | Requires: ghc-transformers-prof >= 0.2 | |
60 | ||
61 | %description prof | |
62 | Profiling %{pkgname} library for GHC. Should be installed when | |
63 | GHC's profiling subsystem is needed. | |
64 | ||
65 | %description prof -l pl.UTF-8 | |
66 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
67 | kiedy potrzebujemy systemu profilującego z GHC. | |
68 | ||
69 | %package doc | |
70 | Summary: HTML documentation for %{pkgname} | |
71 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu %{pkgname} | |
72 | Group: Documentation | |
73 | ||
74 | %description doc | |
75 | HTML documentation for %{pkgname}. | |
76 | ||
77 | %description doc -l pl.UTF-8 | |
78 | Dokumentacja w formacie HTML dla pakietu %{pkgname}. | |
79 | ||
80 | %prep | |
81 | %setup -q -n %{pkgname}-%{version} | |
82 | ||
83 | %build | |
84 | runhaskell Setup.lhs configure -v2 \ | |
85 | %{?with_prof:--enable-library-profiling} \ | |
86 | --prefix=%{_prefix} \ | |
87 | --libdir=%{_libdir} \ | |
88 | --libexecdir=%{_libexecdir} \ | |
89 | --docdir=%{_docdir}/%{name}-%{version} | |
90 | ||
91 | runhaskell Setup.lhs build | |
92 | runhaskell Setup.lhs haddock --executables | |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
97 | ||
98 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
99 | ||
100 | # work around automatic haddock docs installation | |
101 | %{__rm} -rf %{name}-%{version}-doc | |
102 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
103 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
104 | ||
105 | runhaskell Setup.lhs register \ | |
106 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %post | |
112 | %ghc_pkg_recache | |
113 | ||
114 | %postun | |
115 | %ghc_pkg_recache | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
119 | %doc LICENSE | |
120 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
121 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
122 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-compat-%{version}-*.so | |
123 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-compat-%{version}-*.a | |
124 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-compat-%{version}-*_p.a | |
125 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi | |
126 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi | |
127 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control | |
128 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad | |
129 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans | |
130 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/*.hi | |
131 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/*.dyn_hi | |
132 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
133 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor | |
134 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes | |
135 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes/*.hi | |
136 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes/*.dyn_hi | |
137 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes/Generic | |
138 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes/Generic/*.hi | |
139 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes/Generic/*.dyn_hi | |
140 | ||
141 | %if %{with prof} | |
142 | %files prof | |
143 | %defattr(644,root,root,755) | |
144 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-compat-%{version}-*_p.a | |
145 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi | |
146 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Trans/*.p_hi | |
147 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes/*.p_hi | |
148 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Functor/Classes/Generic/*.p_hi | |
149 | %endif | |
150 | ||
151 | %files doc | |
152 | %defattr(644,root,root,755) | |
153 | %doc %{name}-%{version}-doc/* |