]>
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 | |
22d8c5ab | 10 | Release: 3 |
81442b1c JB |
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 | |
9e0ec71a JB |
18 | BuildRequires: ghc-base >= 2 |
19 | BuildRequires: ghc-base < 5 | |
81442b1c | 20 | BuildRequires: ghc-data-default-class |
81442b1c | 21 | BuildRequires: ghc-dlist |
9e0ec71a JB |
22 | %if %{with prof} |
23 | BuildRequires: ghc-prof >= 6.12.3 | |
24 | BuildRequires: ghc-base-prof >= 2 | |
25 | BuildRequires: ghc-base-prof < 5 | |
26 | BuildRequires: ghc-data-default-class-prof | |
27 | BuildRequires: ghc-dlist-prof | |
28 | %endif | |
81442b1c JB |
29 | BuildRequires: rpmbuild(macros) >= 1.608 |
30 | %requires_eq ghc | |
9e0ec71a JB |
31 | Requires: ghc-base >= 2 |
32 | Requires: ghc-base < 5 | |
ac495cf9 JB |
33 | Requires: ghc-data-default-class |
34 | Requires: ghc-dlist | |
81442b1c JB |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | # debuginfo is not useful for ghc | |
38 | %define _enable_debug_packages 0 | |
39 | ||
9e0ec71a JB |
40 | # don't compress haddock files |
41 | %define _noautocompressdoc *.haddock | |
42 | ||
81442b1c JB |
43 | %description |
44 | This module defines 'Default' instances for the type 'DList'. | |
45 | ||
46 | %description -l pl.UTF-8 | |
47 | Ten moduł definiuje domyślne instancje ('Default') dla typu 'DList'. | |
48 | ||
49 | %package prof | |
50 | Summary: Profiling %{pkgname} library for GHC | |
51 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
52 | Group: Development/Libraries | |
53 | Requires: %{name} = %{version}-%{release} | |
9e0ec71a JB |
54 | Requires: ghc-base-prof >= 2 |
55 | Requires: ghc-base-prof < 5 | |
ac495cf9 JB |
56 | Requires: ghc-data-default-class-prof |
57 | Requires: ghc-dlist-prof | |
81442b1c JB |
58 | |
59 | %description prof | |
60 | Profiling %{pkgname} library for GHC. Should be installed when | |
61 | GHC's profiling subsystem is needed. | |
62 | ||
63 | %description prof -l pl.UTF-8 | |
64 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
65 | kiedy potrzebujemy systemu profilującego z GHC. | |
66 | ||
67 | %package doc | |
68 | Summary: HTML documentation for ghc %{pkgname} package | |
69 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
70 | Group: Documentation | |
71 | ||
72 | %description doc | |
73 | HTML documentation for ghc %{pkgname} package. | |
74 | ||
75 | %description doc -l pl.UTF-8 | |
76 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
77 | ||
78 | %prep | |
79 | %setup -q -n %{pkgname}-%{version} | |
80 | ||
81 | %build | |
82 | runhaskell Setup.lhs 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.lhs build | |
90 | runhaskell Setup.lhs 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.lhs 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}/html %{name}-%{version}-doc | |
101 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
102 | ||
103 | runhaskell Setup.lhs 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 LICENSE | |
118 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
119 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
08f75eba JR |
120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}-*.so |
121 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}-*.a | |
122 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}-*_p.a | |
81442b1c JB |
123 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data |
124 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default | |
125 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances | |
126 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/DList.hi | |
08f75eba | 127 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/DList.dyn_hi |
81442b1c JB |
128 | |
129 | %if %{with prof} | |
130 | %files prof | |
131 | %defattr(644,root,root,755) | |
08f75eba | 132 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}-*_p.a |
81442b1c JB |
133 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/DList.p_hi |
134 | %endif | |
135 | ||
136 | %files doc | |
137 | %defattr(644,root,root,755) | |
138 | %doc %{name}-%{version}-doc/* |