]>
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 | |
22 | %{?with_prof:BuildRequires: ghc-dlist} | |
23 | BuildRequires: rpmbuild(macros) >= 1.608 | |
24 | %requires_eq ghc | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | # debuginfo is not useful for ghc | |
28 | %define _enable_debug_packages 0 | |
29 | ||
30 | %description | |
31 | This module defines 'Default' instances for the type 'DList'. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | Ten moduł definiuje domyślne instancje ('Default') dla typu 'DList'. | |
35 | ||
36 | %package prof | |
37 | Summary: Profiling %{pkgname} library for GHC | |
38 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
39 | Group: Development/Libraries | |
40 | Requires: %{name} = %{version}-%{release} | |
41 | ||
42 | %description prof | |
43 | Profiling %{pkgname} library for GHC. Should be installed when | |
44 | GHC's profiling subsystem is needed. | |
45 | ||
46 | %description prof -l pl.UTF-8 | |
47 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
48 | kiedy potrzebujemy systemu profilującego z GHC. | |
49 | ||
50 | %package doc | |
51 | Summary: HTML documentation for ghc %{pkgname} package | |
52 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
53 | Group: Documentation | |
54 | ||
55 | %description doc | |
56 | HTML documentation for ghc %{pkgname} package. | |
57 | ||
58 | %description doc -l pl.UTF-8 | |
59 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
60 | ||
61 | %prep | |
62 | %setup -q -n %{pkgname}-%{version} | |
63 | ||
64 | %build | |
65 | runhaskell Setup.lhs configure -v2 \ | |
66 | %{?with_prof:--enable-library-profiling} \ | |
67 | --prefix=%{_prefix} \ | |
68 | --libdir=%{_libdir} \ | |
69 | --libexecdir=%{_libexecdir} \ | |
70 | --docdir=%{_docdir}/%{name}-%{version} | |
71 | ||
72 | runhaskell Setup.lhs build | |
73 | runhaskell Setup.lhs haddock --executables | |
74 | ||
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
78 | ||
79 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
80 | ||
81 | # work around automatic haddock docs installation | |
82 | %{__rm} -rf %{name}-%{version}-doc | |
83 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
84 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
85 | ||
86 | runhaskell Setup.lhs register \ | |
87 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %post | |
93 | %ghc_pkg_recache | |
94 | ||
95 | %postun | |
96 | %ghc_pkg_recache | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %doc LICENSE | |
101 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
102 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
103 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSdata-default-instances-dlist-%{version}.o | |
104 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}.a | |
105 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
106 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default | |
107 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances | |
108 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/DList.hi | |
109 | ||
110 | %if %{with prof} | |
111 | %files prof | |
112 | %defattr(644,root,root,755) | |
113 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-dlist-%{version}_p.a | |
114 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/DList.p_hi | |
115 | %endif | |
116 | ||
117 | %files doc | |
118 | %defattr(644,root,root,755) | |
119 | %doc %{name}-%{version}-doc/* |