]>
Commit | Line | Data |
---|---|---|
81442b1c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname data-default-instances-dlist | |
6 | Summary: Default instances for the type 'DList' | |
7 | Summary(pl.UTF-8): Domyślne instancje dla typu 'DList' | |
8 | Name: ghc-%{pkgname} | |
9 | Version: 0.0.1 | |
10 | Release: 1 | |
11 | License: BSD | |
12 | Group: Development/Languages | |
13 | #Source0Download: http://hackage.haskell.org/package/data-default-instances-dlist | |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
15 | # Source0-md5: 6683d943ab70b7077ff6837fce75b4de | |
16 | URL: http://hackage.haskell.org/package/data-default-instances-dlist | |
17 | BuildRequires: ghc >= 6.12.3 | |
18 | %{?with_prof:BuildRequires: ghc-prof >= 6.12.3} | |
19 | BuildRequires: ghc-data-default-class | |
20 | %{?with_prof:BuildRequires: ghc-data-default-class-prof} | |
21 | BuildRequires: ghc-dlist | |
ac495cf9 | 22 | %{?with_prof:BuildRequires: ghc-dlist-prof} |
81442b1c JB |
23 | BuildRequires: rpmbuild(macros) >= 1.608 |
24 | %requires_eq ghc | |
ac495cf9 JB |
25 | Requires: ghc-data-default-class |
26 | Requires: ghc-dlist | |
81442b1c JB |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | # debuginfo is not useful for ghc | |
30 | %define _enable_debug_packages 0 | |
31 | ||
32 | %description | |
33 | This module defines 'Default' instances for the type 'DList'. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Ten moduł definiuje domyślne instancje ('Default') dla typu 'DList'. | |
37 | ||
38 | %package prof | |
39 | Summary: Profiling %{pkgname} library for GHC | |
40 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
41 | Group: Development/Libraries | |
42 | Requires: %{name} = %{version}-%{release} | |
ac495cf9 JB |
43 | Requires: ghc-data-default-class-prof |
44 | Requires: ghc-dlist-prof | |
81442b1c JB |
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 | %package doc | |
55 | Summary: HTML documentation for ghc %{pkgname} package | |
56 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
57 | Group: Documentation | |
58 | ||
59 | %description doc | |
60 | HTML documentation for ghc %{pkgname} package. | |
61 | ||
62 | %description doc -l pl.UTF-8 | |
63 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
64 | ||
65 | %prep | |
66 | %setup -q -n %{pkgname}-%{version} | |
67 | ||
68 | %build | |
69 | runhaskell Setup.lhs configure -v2 \ | |
70 | %{?with_prof:--enable-library-profiling} \ | |
71 | --prefix=%{_prefix} \ | |
72 | --libdir=%{_libdir} \ | |
73 | --libexecdir=%{_libexecdir} \ | |
74 | --docdir=%{_docdir}/%{name}-%{version} | |
75 | ||
76 | runhaskell Setup.lhs build | |
77 | runhaskell Setup.lhs haddock --executables | |
78 | ||
79 | %install | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
82 | ||
83 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
84 | ||
85 | # work around automatic haddock docs installation | |
86 | %{__rm} -rf %{name}-%{version}-doc | |
87 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
88 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
89 | ||
90 | runhaskell Setup.lhs register \ | |
91 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post | |
97 | %ghc_pkg_recache | |
98 | ||
99 | %postun | |
100 | %ghc_pkg_recache | |
101 | ||
102 | %files | |
103 | %defattr(644,root,root,755) | |
104 | %doc LICENSE | |
105 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
106 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
107 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSdata-default-instances-dlist-%{version}.o | |
108 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}.a | |
109 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
110 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default | |
111 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances | |
112 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/DList.hi | |
113 | ||
114 | %if %{with prof} | |
115 | %files prof | |
116 | %defattr(644,root,root,755) | |
117 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}_p.a | |
118 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/DList.p_hi | |
119 | %endif | |
120 | ||
121 | %files doc | |
122 | %defattr(644,root,root,755) | |
123 | %doc %{name}-%{version}-doc/* |