]>
Commit | Line | Data |
---|---|---|
6120815d JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
aff3f8c6 JP |
5 | %define pkgname data-default |
6 | Summary: A class for types with a default value | |
6120815d | 7 | Summary(pl.UTF-8): Klasa dla typów z wartością domyślną |
aff3f8c6 | 8 | Name: ghc-%{pkgname} |
8a345a5e | 9 | Version: 0.7.1.1 |
19f98644 | 10 | Release: 2 |
aff3f8c6 JP |
11 | License: BSD |
12 | Group: Development/Languages | |
6120815d JB |
13 | #Source0Download: http://hackage.haskell.org/package/data-default |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
8a345a5e JR |
15 | # Source0-md5: 13ddcc28e24cd58937c7d130e885749a |
16 | Patch0: no-old-locale.patch | |
6120815d | 17 | URL: http://hackage.haskell.org/package/data-default |
aff3f8c6 | 18 | BuildRequires: ghc >= 6.12.3 |
6120815d | 19 | BuildRequires: ghc-data-default-class |
6120815d JB |
20 | BuildRequires: ghc-data-default-instances-containers |
21 | BuildRequires: ghc-data-default-instances-dlist | |
6120815d JB |
22 | %if %{with prof} |
23 | BuildRequires: ghc-prof >= 6.12.3 | |
24 | BuildRequires: ghc-data-default-class-prof | |
6120815d JB |
25 | BuildRequires: ghc-data-default-instances-containers-prof |
26 | BuildRequires: ghc-data-default-instances-dlist-prof | |
6120815d | 27 | %endif |
aff3f8c6 JP |
28 | BuildRequires: rpmbuild(macros) >= 1.608 |
29 | %requires_eq ghc | |
6120815d | 30 | Requires: ghc-data-default-class |
6120815d JB |
31 | Requires: ghc-data-default-instances-containers |
32 | Requires: ghc-data-default-instances-dlist | |
aff3f8c6 JP |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | # debuginfo is not useful for ghc | |
36 | %define _enable_debug_packages 0 | |
37 | ||
38 | %description | |
39 | A class for types with a default value. | |
40 | ||
6120815d JB |
41 | %description -l pl.UTF-8 |
42 | Klasa dla typów z wartością domyślną. | |
43 | ||
44 | %package prof | |
45 | Summary: Profiling %{pkgname} library for GHC | |
46 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
47 | Group: Development/Libraries | |
48 | Requires: %{name} = %{version}-%{release} | |
49 | Requires: ghc-data-default-class-prof | |
6120815d JB |
50 | Requires: ghc-data-default-instances-containers-prof |
51 | Requires: ghc-data-default-instances-dlist-prof | |
6120815d JB |
52 | |
53 | %description prof | |
54 | Profiling %{pkgname} library for GHC. Should be installed when | |
55 | GHC's profiling subsystem is needed. | |
56 | ||
57 | %description prof -l pl.UTF-8 | |
58 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
59 | kiedy potrzebujemy systemu profilującego z GHC. | |
60 | ||
aff3f8c6 | 61 | %package doc |
6120815d JB |
62 | Summary: HTML documentation for ghc %{pkgname} package |
63 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
aff3f8c6 JP |
64 | Group: Documentation |
65 | ||
66 | %description doc | |
6120815d | 67 | HTML documentation for ghc %{pkgname} package. |
aff3f8c6 JP |
68 | |
69 | %description doc -l pl.UTF-8 | |
6120815d | 70 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. |
aff3f8c6 JP |
71 | |
72 | %prep | |
73 | %setup -q -n %{pkgname}-%{version} | |
8a345a5e | 74 | %patch0 -p1 |
aff3f8c6 JP |
75 | |
76 | %build | |
77 | runhaskell Setup.lhs configure -v2 \ | |
6120815d | 78 | %{?with_prof:--enable-library-profiling} \ |
aff3f8c6 JP |
79 | --prefix=%{_prefix} \ |
80 | --libdir=%{_libdir} \ | |
81 | --libexecdir=%{_libexecdir} \ | |
82 | --docdir=%{_docdir}/%{name}-%{version} | |
83 | ||
84 | runhaskell Setup.lhs build | |
85 | runhaskell Setup.lhs haddock --executables | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
90 | ||
91 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
92 | ||
93 | # work around automatic haddock docs installation | |
94 | rm -rf %{name}-%{version}-doc | |
95 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
96 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
97 | ||
98 | runhaskell Setup.lhs register \ | |
6120815d | 99 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
aff3f8c6 JP |
100 | |
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post | |
105 | %ghc_pkg_recache | |
106 | ||
107 | %postun | |
108 | %ghc_pkg_recache | |
109 | ||
110 | %files | |
111 | %defattr(644,root,root,755) | |
6120815d | 112 | %doc LICENSE |
aff3f8c6 | 113 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
6120815d | 114 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
8a345a5e JR |
115 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-%{version}-*.so |
116 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-%{version}-*.a | |
117 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-%{version}-*_p.a | |
6120815d JB |
118 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data |
119 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default.hi | |
8a345a5e | 120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default.dyn_hi |
6120815d JB |
121 | |
122 | %if %{with prof} | |
123 | %files prof | |
124 | %defattr(644,root,root,755) | |
8a345a5e | 125 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-%{version}-*_p.a |
6120815d JB |
126 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default.p_hi |
127 | %endif | |
aff3f8c6 JP |
128 | |
129 | %files doc | |
130 | %defattr(644,root,root,755) | |
131 | %doc %{name}-%{version}-doc/* |