]>
Commit | Line | Data |
---|---|---|
8e3e4cb5 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname extra | |
6 | Summary: Extra functions I use | |
7 | Name: ghc-%{pkgname} | |
8 | Version: 1.5 | |
9 | Release: 1 | |
10 | License: LGPL | |
11 | Group: Development/Languages | |
12 | #Source0Download: http://hackage.haskell.org/package/extra | |
13 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
14 | # Source0-md5: ed2e91d8bf4b295bfe3e053e14bf64ae | |
15 | URL: http://hackage.haskell.org/package/extra | |
16 | BuildRequires: ghc >= 6.12.3 | |
17 | BuildRequires: ghc-base >= 4.4 | |
18 | BuildRequires: ghc-base < 5 | |
19 | BuildRequires: ghc-clock >= 0.7 | |
20 | BuildRequires: ghc-directory | |
21 | BuildRequires: ghc-filepath | |
22 | BuildRequires: ghc-process | |
23 | BuildRequires: ghc-time | |
24 | BuildRequires: ghc-unix | |
25 | %if %{with prof} | |
26 | BuildRequires: ghc-prof >= 6.12.3 | |
27 | BuildRequires: ghc-base-prof >= 4.4 | |
28 | BuildRequires: ghc-base-prof < 5 | |
29 | BuildRequires: ghc-clock-prof >= 0.7 | |
30 | BuildRequires: ghc-directory-prof | |
31 | BuildRequires: ghc-filepath-prof | |
32 | BuildRequires: ghc-process-prof | |
33 | BuildRequires: ghc-time-prof | |
34 | BuildRequires: ghc-unix-prof | |
35 | %endif | |
36 | BuildRequires: rpmbuild(macros) >= 1.608 | |
37 | Requires(post,postun): /usr/bin/ghc-pkg | |
38 | %requires_eq ghc | |
39 | Requires: ghc-base >= 4.4 | |
40 | Requires: ghc-base < 5 | |
41 | Requires: ghc-clock >= 0.7 | |
42 | Requires: ghc-directory | |
43 | Requires: ghc-filepath | |
44 | Requires: ghc-process | |
45 | Requires: ghc-time | |
46 | Requires: ghc-unix | |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | # debuginfo is not useful for ghc | |
50 | %define _enable_debug_packages 0 | |
51 | ||
52 | # don't compress haddock files | |
53 | %define _noautocompressdoc *.haddock | |
54 | ||
55 | %description | |
56 | A library of extra functions for the standard Haskell libraries. Most | |
57 | functions are simple additions, filling out missing functionality. A | |
58 | few functions are available in later versions of GHC, but this package | |
59 | makes them available back to GHC 7.2. | |
60 | ||
61 | %package prof | |
62 | Summary: Profiling %{pkgname} library for GHC | |
63 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
64 | Group: Development/Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | Requires: ghc-base-prof < 6 | |
67 | Requires: ghc-bytestring-prof | |
68 | Requires: ghc-text-prof | |
69 | ||
70 | %description prof | |
71 | Profiling %{pkgname} library for GHC. Should be installed when | |
72 | GHC's profiling subsystem is needed. | |
73 | ||
74 | %description prof -l pl.UTF-8 | |
75 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
76 | kiedy potrzebujemy systemu profilującego z GHC. | |
77 | ||
78 | %prep | |
79 | %setup -q -n %{pkgname}-%{version} | |
80 | ||
81 | %build | |
82 | runhaskell Setup.hs configure -v2 \ | |
83 | %{?with_prof:--enable-library-profiling} \ | |
84 | --prefix=%{_prefix} \ | |
85 | --libdir=%{_libdir} \ | |
86 | --libexecdir=%{_libexecdir} \ | |
87 | --docdir=%{_docdir}/%{name}-%{version} | |
88 | ||
89 | runhaskell Setup.hs build | |
90 | runhaskell Setup.hs haddock --executables | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
95 | ||
96 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
97 | ||
98 | # work around automatic haddock docs installation | |
99 | %{__rm} -rf %{name}-%{version}-doc | |
100 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
101 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
102 | ||
103 | runhaskell Setup.hs register \ | |
104 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %post | |
110 | %ghc_pkg_recache | |
111 | ||
112 | %postun | |
113 | %ghc_pkg_recache | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc %{name}-%{version}-doc/* | |
118 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
119 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSextra-%{version}.o | |
121 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextra-%{version}.a | |
122 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi | |
123 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control | |
124 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Concurrent | |
125 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Concurrent/*.hi | |
126 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception | |
127 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.hi | |
128 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad | |
129 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/*.hi | |
130 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
131 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Either | |
132 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Either/*.hi | |
133 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/IORef | |
134 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/IORef/*.hi | |
135 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/List | |
136 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/List/*.hi | |
137 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Tuple | |
138 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Tuple/*.hi | |
139 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Typeable | |
140 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Typeable/*.hi | |
141 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Version | |
142 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Version/*.hi | |
143 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric | |
144 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/*.hi | |
145 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System | |
146 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Directory | |
147 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Directory/*.hi | |
148 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Environment | |
149 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Environment/*.hi | |
150 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO | |
151 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/*.hi | |
152 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Info | |
153 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Info/*.hi | |
154 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Process | |
155 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Process/*.hi | |
156 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Time | |
157 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Time/*.hi | |
158 | ||
159 | %if %{with prof} | |
160 | %files prof | |
161 | %defattr(644,root,root,755) | |
162 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSextra-%{version}_p.a | |
163 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi | |
164 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Concurrent/*.p_hi | |
165 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Exception/*.p_hi | |
166 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/*.p_hi | |
167 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Either/*.p_hi | |
168 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/IORef/*.p_hi | |
169 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/List/*.p_hi | |
170 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Tuple/*.p_hi | |
171 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Typeable/*.p_hi | |
172 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Version/*.p_hi | |
173 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Numeric/*.p_hi | |
174 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Directory/*.p_hi | |
175 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Environment/*.p_hi | |
176 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/IO/*.p_hi | |
177 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Info/*.p_hi | |
178 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Process/*.p_hi | |
179 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Time/*.p_hi | |
180 | %endif |